From e4e5e7e4ad902f1166121beadd677ed234b08343 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 4 Jun 2024 11:09:54 +0800 Subject: [PATCH 01/17] update script --- eng/mgmt/automation/generate_utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/mgmt/automation/generate_utils.py b/eng/mgmt/automation/generate_utils.py index b41ef55cc7719..e0f3239b9c0c1 100644 --- a/eng/mgmt/automation/generate_utils.py +++ b/eng/mgmt/automation/generate_utils.py @@ -337,7 +337,7 @@ def generate_typespec_project( try: url_match = re.match( - r"^https://github.com/(?P[^/]*/azure-rest-api-specs(-pr)?)/blob/(?P[0-9a-f]{40})/(?P.*)/tspconfig.yaml$", + r"^https://github.com/(?P[^/]*/azure-rest-api-specs(-pr)?)/blob/(?P[^/]*)/(?P.*)/tspconfig.yaml$", tsp_project, re.IGNORECASE, ) @@ -367,7 +367,7 @@ def generate_typespec_project( ] if tspconfig_valid: - check_call(tsp_cmd, sdk_root) + check_call(tsp_cmd, sdk_root, shell=True) sdk_folder = find_sdk_folder(sdk_root) logging.info("SDK folder: " + sdk_folder) @@ -393,7 +393,7 @@ def generate_typespec_project( drop_changes(sdk_root) remove_generated_source_code(sdk_folder, f"{group_id}.{service}") # regenerate - check_call(tsp_cmd, sdk_root) + check_call(tsp_cmd, sdk_root, shell=True) succeeded = True except subprocess.CalledProcessError as error: error_message = ( @@ -406,9 +406,9 @@ def generate_typespec_project( return succeeded, require_sdk_integration, sdk_folder, service, module -def check_call(cmd: List[str], work_dir: str): +def check_call(cmd: List[str], work_dir: str, shell: bool = False): logging.info("Command line: " + " ".join(cmd)) - subprocess.check_call(cmd, cwd=work_dir) + subprocess.check_call(cmd, cwd=work_dir, shell=shell) def drop_changes(work_dir: str): From 6689c654eb8dbdb72c23305038ea61a0b7644fc7 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 4 Jun 2024 13:13:31 +0800 Subject: [PATCH 02/17] find python cmd --- eng/mgmt/automation/utils.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/eng/mgmt/automation/utils.py b/eng/mgmt/automation/utils.py index 3ab6b99ab9482..3eabca3962fee 100644 --- a/eng/mgmt/automation/utils.py +++ b/eng/mgmt/automation/utils.py @@ -177,18 +177,30 @@ def update_service_ci_and_pom(sdk_root: str, service: str, group: str, module: s def update_version(sdk_root: str, output_folder: str): + # find the python command + python_cmd = "python" + try: + subprocess.check_call([python_cmd, "--version"], shell=True) + except subprocess.CalledProcessError: + python_cmd = "python3" + try: + subprocess.check_call([python_cmd, "--version"], shell=True) + except subprocess.CalledProcessError: + raise Exception("python or python3 not found") + pwd = os.getcwd() try: os.chdir(sdk_root) print(os.getcwd()) subprocess.run( - "python3 eng/versioning/update_versions.py --ut library --bt client --sr", + "{0} eng/versioning/update_versions.py --ut library --bt client --sr".format(python_cmd), stdout=subprocess.DEVNULL, stderr=sys.stderr, shell=True, ) subprocess.run( - "python3 eng/versioning/update_versions.py --ut library --bt client --tf {0}/README.md".format( + "{0} eng/versioning/update_versions.py --ut library --bt client --tf {1}/README.md".format( + python_cmd, output_folder ), stdout=subprocess.DEVNULL, From 9ee2d5f1007bc7e9b46371a277ebedc41b343366 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 4 Jun 2024 13:24:09 +0800 Subject: [PATCH 03/17] black --- eng/mgmt/automation/generate_utils.py | 6 +++--- eng/mgmt/automation/utils.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/eng/mgmt/automation/generate_utils.py b/eng/mgmt/automation/generate_utils.py index e0f3239b9c0c1..389053695a5ab 100644 --- a/eng/mgmt/automation/generate_utils.py +++ b/eng/mgmt/automation/generate_utils.py @@ -100,13 +100,13 @@ def remove_generated_source_code(sdk_folder: str, namespace: str): test_folder = os.path.join(sdk_folder, "src/test/java", namespace.replace(".", "/"), "generated") sample_folder = os.path.join(sdk_folder, "src/samples/java", namespace.replace(".", "/"), "generated") - logging.info(f'Removing main source folder: {main_folder}') + logging.info(f"Removing main source folder: {main_folder}") shutil.rmtree(main_folder, ignore_errors=True) - logging.info(f'Removing generated test folder: {test_folder}') + logging.info(f"Removing generated test folder: {test_folder}") shutil.rmtree(test_folder, ignore_errors=True) - logging.info(f'Removing generated samples folder: {sample_folder}') + logging.info(f"Removing generated samples folder: {sample_folder}") shutil.rmtree(sample_folder, ignore_errors=True) diff --git a/eng/mgmt/automation/utils.py b/eng/mgmt/automation/utils.py index 3eabca3962fee..e2a339d7f354b 100644 --- a/eng/mgmt/automation/utils.py +++ b/eng/mgmt/automation/utils.py @@ -200,8 +200,7 @@ def update_version(sdk_root: str, output_folder: str): ) subprocess.run( "{0} eng/versioning/update_versions.py --ut library --bt client --tf {1}/README.md".format( - python_cmd, - output_folder + python_cmd, output_folder ), stdout=subprocess.DEVNULL, stderr=sys.stderr, From f5fba5f6fdc2d38ec308d6fcf6ce932309587ada Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 5 Jun 2024 10:49:56 +0800 Subject: [PATCH 04/17] regen --- eng/versioning/version_client.txt | 2 +- .../azure-resourcemanager-avs/CHANGELOG.md | 600 +- sdk/avs/azure-resourcemanager-avs/README.md | 8 +- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 2096 +-- sdk/avs/azure-resourcemanager-avs/pom.xml | 24 +- .../azure/resourcemanager/avs/AvsManager.java | 299 +- .../avs/fluent/AddonsClient.java | 118 +- .../avs/fluent/AuthorizationsClient.java | 142 +- .../resourcemanager/avs/fluent/AvsClient.java | 136 +- .../avs/fluent/CloudLinksClient.java | 134 +- .../avs/fluent/ClustersClient.java | 200 +- .../avs/fluent/DatastoresClient.java | 168 +- .../fluent/GlobalReachConnectionsClient.java | 136 +- .../avs/fluent/HcxEnterpriseSitesClient.java | 89 +- .../avs/fluent/IscsiPathsClient.java | 187 + .../avs/fluent/LocationsClient.java | 24 +- .../avs/fluent/OperationsClient.java | 20 +- .../avs/fluent/PlacementPoliciesClient.java | 263 +- .../avs/fluent/PrivateCloudsClient.java | 176 +- .../avs/fluent/ScriptCmdletsClient.java | 60 +- .../avs/fluent/ScriptExecutionsClient.java | 160 +- .../avs/fluent/ScriptPackagesClient.java | 38 +- .../avs/fluent/VirtualMachinesClient.java | 124 +- ...rkloadNetworkDhcpConfigurationsClient.java | 267 + .../WorkloadNetworkDnsServicesClient.java | 275 + .../fluent/WorkloadNetworkDnsZonesClient.java | 271 + .../fluent/WorkloadNetworkGatewaysClient.java | 75 + ...oadNetworkPortMirroringProfilesClient.java | 276 + .../WorkloadNetworkPublicIpsClient.java | 206 + .../fluent/WorkloadNetworkSegmentsClient.java | 271 + .../WorkloadNetworkVirtualMachinesClient.java | 78 + .../fluent/WorkloadNetworkVmGroupsClient.java | 270 + .../avs/fluent/WorkloadNetworksClient.java | 2019 +-- .../avs/fluent/models/AddonInner.java | 38 +- .../fluent/models/AdminCredentialsInner.java | 22 +- .../avs/fluent/models/CloudLinkInner.java | 50 +- .../fluent/models/CloudLinkProperties.java | 34 +- .../avs/fluent/models/ClusterInner.java | 100 +- .../avs/fluent/models/ClusterProperties.java | 125 +- .../models/ClusterUpdateProperties.java | 20 +- .../fluent/models/ClusterZoneListInner.java | 31 +- .../avs/fluent/models/DatastoreInner.java | 70 +- .../fluent/models/DatastoreProperties.java | 54 +- .../ExpressRouteAuthorizationInner.java | 50 +- .../ExpressRouteAuthorizationProperties.java | 24 +- .../models/GlobalReachConnectionInner.java | 52 +- .../GlobalReachConnectionProperties.java | 44 +- .../fluent/models/HcxEnterpriseSiteInner.java | 50 +- .../models/HcxEnterpriseSiteProperties.java | 32 +- .../avs/fluent/models/IscsiPathInner.java | 96 + .../fluent/models/IscsiPathProperties.java | 78 + .../avs/fluent/models/OperationInner.java | 124 +- .../fluent/models/PlacementPolicyInner.java | 38 +- .../PlacementPolicyUpdateProperties.java | 32 +- .../avs/fluent/models/PrivateCloudInner.java | 431 +- .../fluent/models/PrivateCloudProperties.java | 346 +- .../models/PrivateCloudUpdateProperties.java | 84 +- .../avs/fluent/models/QuotaInner.java | 18 +- .../avs/fluent/models/ScriptCmdletInner.java | 63 +- .../fluent/models/ScriptCmdletProperties.java | 53 +- .../fluent/models/ScriptExecutionInner.java | 88 +- .../models/ScriptExecutionProperties.java | 80 +- .../avs/fluent/models/ScriptPackageInner.java | 54 +- .../models/ScriptPackageProperties.java | 38 +- .../avs/fluent/models/TrialInner.java | 18 +- .../fluent/models/VirtualMachineInner.java | 54 +- .../models/VirtualMachineProperties.java | 38 +- .../models/WorkloadNetworkDhcpInner.java | 38 +- .../WorkloadNetworkDnsServiceInner.java | 62 +- .../WorkloadNetworkDnsServiceProperties.java | 40 +- .../models/WorkloadNetworkDnsZoneInner.java | 64 +- .../WorkloadNetworkDnsZoneProperties.java | 44 +- .../models/WorkloadNetworkGatewayInner.java | 68 +- .../WorkloadNetworkGatewayProperties.java | 49 +- .../fluent/models/WorkloadNetworkInner.java | 59 +- .../WorkloadNetworkPortMirroringInner.java | 58 +- ...orkloadNetworkPortMirroringProperties.java | 36 +- .../models/WorkloadNetworkProperties.java | 44 + .../models/WorkloadNetworkPublicIpInner.java | 62 +- .../WorkloadNetworkPublicIpProperties.java | 46 +- .../models/WorkloadNetworkSegmentInner.java | 56 +- .../WorkloadNetworkSegmentProperties.java | 34 +- .../models/WorkloadNetworkVMGroupInner.java | 50 +- .../WorkloadNetworkVMGroupProperties.java | 28 +- .../WorkloadNetworkVirtualMachineInner.java | 68 +- ...rkloadNetworkVirtualMachineProperties.java | 49 +- .../avs/fluent/models/package-info.java | 7 +- .../avs/fluent/package-info.java | 7 +- .../avs/implementation/AddonImpl.java | 65 +- .../avs/implementation/AddonsClientImpl.java | 769 +- .../avs/implementation/AddonsImpl.java | 119 +- .../implementation/AdminCredentialsImpl.java | 2 +- .../AuthorizationsClientImpl.java | 843 +- .../implementation/AuthorizationsImpl.java | 143 +- .../avs/implementation/AvsClientBuilder.java | 103 +- .../avs/implementation/AvsClientImpl.java | 390 +- .../avs/implementation/CloudLinkImpl.java | 70 +- .../implementation/CloudLinksClientImpl.java | 806 +- .../avs/implementation/CloudLinksImpl.java | 119 +- .../avs/implementation/ClusterImpl.java | 88 +- .../implementation/ClusterZoneListImpl.java | 2 +- .../implementation/ClustersClientImpl.java | 1151 +- .../avs/implementation/ClustersImpl.java | 134 +- .../avs/implementation/DatastoreImpl.java | 85 +- .../implementation/DatastoresClientImpl.java | 924 +- .../avs/implementation/DatastoresImpl.java | 176 +- .../ExpressRouteAuthorizationImpl.java | 76 +- .../GlobalReachConnectionImpl.java | 76 +- .../GlobalReachConnectionsClientImpl.java | 905 +- .../GlobalReachConnectionsImpl.java | 164 +- .../implementation/HcxEnterpriseSiteImpl.java | 86 +- .../HcxEnterpriseSitesClientImpl.java | 656 +- .../HcxEnterpriseSitesImpl.java | 149 +- .../avs/implementation/IscsiPathImpl.java | 53 + .../implementation/IscsiPathsClientImpl.java | 876 ++ .../avs/implementation/IscsiPathsImpl.java | 97 + .../implementation/LocationsClientImpl.java | 204 +- .../avs/implementation/LocationsImpl.java | 12 +- .../avs/implementation/OperationImpl.java | 19 +- .../implementation/OperationsClientImpl.java | 193 +- .../avs/implementation/OperationsImpl.java | 6 +- .../PlacementPoliciesClientImpl.java | 1322 +- .../implementation/PlacementPoliciesImpl.java | 206 +- .../implementation/PlacementPolicyImpl.java | 96 +- .../avs/implementation/PrivateCloudImpl.java | 211 +- .../PrivateCloudsClientImpl.java | 1458 +- .../avs/implementation/PrivateCloudsImpl.java | 104 +- .../avs/implementation/QuotaImpl.java | 2 +- .../{Utils.java => ResourceManagerUtils.java} | 45 +- .../avs/implementation/ScriptCmdletImpl.java | 17 +- .../ScriptCmdletsClientImpl.java | 423 +- .../avs/implementation/ScriptCmdletsImpl.java | 49 +- .../implementation/ScriptExecutionImpl.java | 81 +- .../ScriptExecutionsClientImpl.java | 983 +- .../implementation/ScriptExecutionsImpl.java | 164 +- .../avs/implementation/ScriptPackageImpl.java | 12 +- .../ScriptPackagesClientImpl.java | 369 +- .../implementation/ScriptPackagesImpl.java | 27 +- .../avs/implementation/TrialImpl.java | 2 +- .../implementation/VirtualMachineImpl.java | 12 +- .../VirtualMachinesClientImpl.java | 711 +- .../implementation/VirtualMachinesImpl.java | 76 +- ...adNetworkDhcpConfigurationsClientImpl.java | 1208 ++ ...WorkloadNetworkDhcpConfigurationsImpl.java | 159 + .../WorkloadNetworkDhcpImpl.java | 86 +- .../WorkloadNetworkDnsServiceImpl.java | 131 +- .../WorkloadNetworkDnsServicesClientImpl.java | 1225 ++ .../WorkloadNetworkDnsServicesImpl.java | 161 + .../WorkloadNetworkDnsZoneImpl.java | 135 +- .../WorkloadNetworkDnsZonesClientImpl.java | 1214 ++ .../WorkloadNetworkDnsZonesImpl.java | 160 + .../WorkloadNetworkGatewayImpl.java | 16 +- .../WorkloadNetworkGatewaysClientImpl.java | 429 + .../WorkloadNetworkGatewaysImpl.java | 72 + .../implementation/WorkloadNetworkImpl.java | 12 +- .../WorkloadNetworkPortMirroringImpl.java | 135 +- ...etworkPortMirroringProfilesClientImpl.java | 1244 ++ ...kloadNetworkPortMirroringProfilesImpl.java | 163 + .../WorkloadNetworkPublicIpImpl.java | 55 +- .../WorkloadNetworkPublicIpsClientImpl.java | 946 ++ .../WorkloadNetworkPublicIpsImpl.java | 160 + .../WorkloadNetworkSegmentImpl.java | 113 +- .../WorkloadNetworkSegmentsClientImpl.java | 1210 ++ .../WorkloadNetworkSegmentsImpl.java | 160 + .../WorkloadNetworkVMGroupImpl.java | 104 +- .../WorkloadNetworkVirtualMachineImpl.java | 16 +- ...kloadNetworkVirtualMachinesClientImpl.java | 438 + .../WorkloadNetworkVirtualMachinesImpl.java | 76 + .../WorkloadNetworkVmGroupsClientImpl.java | 1206 ++ .../WorkloadNetworkVmGroupsImpl.java | 160 + .../WorkloadNetworksClientImpl.java | 11078 +--------------- .../implementation/WorkloadNetworksImpl.java | 1247 +- .../models/AddonListResult.java | 69 + .../models/CloudLinkListResult.java | 69 + .../models/ClusterListResult.java | 69 + .../models/DatastoreListResult.java | 69 + .../ExpressRouteAuthorizationListResult.java | 70 + .../GlobalReachConnectionListResult.java | 70 + .../models/HcxEnterpriseSiteListResult.java | 70 + .../models/IscsiPathListResult.java | 69 + .../implementation/models/PagedOperation.java | 70 + .../models/PlacementPolicyListResult.java | 70 + .../models/PrivateCloudListResult.java | 69 + .../models/ScriptCmdletListResult.java | 69 + .../models/ScriptExecutionListResult.java | 70 + .../models/ScriptPackageListResult.java | 69 + .../models/VirtualMachineListResult.java | 69 + .../models/WorkloadNetworkDhcpListResult.java | 70 + .../WorkloadNetworkDnsServiceListResult.java | 70 + .../WorkloadNetworkDnsZoneListResult.java | 70 + .../WorkloadNetworkGatewayListResult.java | 70 + .../models/WorkloadNetworkListResult.java | 70 + ...orkloadNetworkPortMirroringListResult.java | 70 + .../WorkloadNetworkPublicIPListResult.java | 70 + .../WorkloadNetworkSegmentListResult.java | 70 + .../WorkloadNetworkVMGroupListResult.java | 70 + ...rkloadNetworkVirtualMachineListResult.java | 70 + .../avs/implementation/package-info.java | 7 +- .../avs/models/ActionType.java | 48 + .../resourcemanager/avs/models/Addon.java | 92 +- .../avs/models/AddonArcProperties.java | 40 +- .../avs/models/AddonHcxProperties.java | 45 +- .../resourcemanager/avs/models/AddonList.java | 59 - .../avs/models/AddonProperties.java | 40 +- .../avs/models/AddonProvisioningState.java | 44 +- .../avs/models/AddonSrmProperties.java | 40 +- .../resourcemanager/avs/models/AddonType.java | 28 +- .../avs/models/AddonVrProperties.java | 36 +- .../resourcemanager/avs/models/Addons.java | 72 +- .../avs/models/AdminCredentials.java | 16 +- .../avs/models/AffinityStrength.java | 20 +- .../avs/models/AffinityType.java | 20 +- .../avs/models/Authorizations.java | 74 +- .../avs/models/AvailabilityProperties.java | 24 +- .../avs/models/AvailabilityStrategy.java | 20 +- .../avs/models/AzureHybridBenefitType.java | 20 +- .../resourcemanager/avs/models/Circuit.java | 20 +- .../resourcemanager/avs/models/CloudLink.java | 89 +- .../avs/models/CloudLinkList.java | 59 - .../models/CloudLinkProvisioningState.java | 58 + .../avs/models/CloudLinkStatus.java | 32 +- .../avs/models/CloudLinks.java | 72 +- .../resourcemanager/avs/models/Cluster.java | 161 +- .../avs/models/ClusterList.java | 59 - .../avs/models/ClusterProvisioningState.java | 40 +- .../avs/models/ClusterUpdate.java | 51 +- .../avs/models/ClusterZone.java | 18 +- .../avs/models/ClusterZoneList.java | 10 +- .../resourcemanager/avs/models/Clusters.java | 84 +- .../avs/models/ClustersUpdateHeaders.java | 68 + .../avs/models/ClustersUpdateResponse.java | 39 + .../avs/models/CommonClusterProperties.java | 107 - .../resourcemanager/avs/models/Datastore.java | 137 +- .../avs/models/DatastoreList.java | 59 - .../models/DatastoreProvisioningState.java | 48 +- .../avs/models/DatastoreStatus.java | 40 +- .../avs/models/Datastores.java | 92 +- .../avs/models/DhcpTypeEnum.java | 20 +- .../avs/models/DiskPoolVolume.java | 47 +- .../avs/models/DnsServiceLogLevelEnum.java | 32 +- .../avs/models/DnsServiceStatusEnum.java | 20 +- .../avs/models/DnsZoneType.java | 53 + .../avs/models/ElasticSanVolume.java | 61 + .../avs/models/Encryption.java | 20 +- .../avs/models/EncryptionKeyStatus.java | 20 +- .../models/EncryptionKeyVaultProperties.java | 30 +- .../avs/models/EncryptionState.java | 20 +- .../avs/models/EncryptionVersionType.java | 20 +- .../resourcemanager/avs/models/Endpoints.java | 77 +- .../avs/models/ExpressRouteAuthorization.java | 103 +- .../models/ExpressRouteAuthorizationList.java | 59 - ...ssRouteAuthorizationProvisioningState.java | 32 +- .../avs/models/GlobalReachConnection.java | 159 +- .../avs/models/GlobalReachConnectionList.java | 59 - ...lobalReachConnectionProvisioningState.java | 32 +- .../models/GlobalReachConnectionStatus.java | 24 +- .../avs/models/GlobalReachConnections.java | 72 +- .../avs/models/HcxEnterpriseSite.java | 77 +- .../avs/models/HcxEnterpriseSiteList.java | 59 - .../HcxEnterpriseSiteProvisioningState.java | 58 + .../avs/models/HcxEnterpriseSiteStatus.java | 28 +- .../avs/models/HcxEnterpriseSites.java | 76 +- .../avs/models/IdentitySource.java | 74 +- .../avs/models/InternetEnum.java | 20 +- .../resourcemanager/avs/models/IscsiPath.java | 62 + .../models/IscsiPathProvisioningState.java | 78 + .../avs/models/IscsiPaths.java | 116 + .../resourcemanager/avs/models/Locations.java | 24 +- .../avs/models/LogSpecification.java | 102 - .../avs/models/ManagementCluster.java | 123 +- .../avs/models/MetricDimension.java | 130 - .../avs/models/MetricSpecification.java | 372 - .../avs/models/MountOptionEnum.java | 20 +- .../avs/models/NetAppVolume.java | 21 +- .../models/NsxPublicIpQuotaRaisedEnum.java | 18 +- .../resourcemanager/avs/models/Operation.java | 46 +- .../avs/models/OperationDisplay.java | 53 +- .../avs/models/OperationList.java | 59 - .../avs/models/OperationProperties.java | 53 - .../avs/models/Operations.java | 20 +- .../avs/models/OptionalParamEnum.java | 20 +- .../resourcemanager/avs/models/Origin.java | 59 + .../PSCredentialExecutionParameter.java | 48 +- .../avs/models/PlacementPolicies.java | 102 +- .../avs/models/PlacementPoliciesList.java | 59 - .../PlacementPoliciesUpdateHeaders.java | 68 + .../PlacementPoliciesUpdateResponse.java | 40 + .../avs/models/PlacementPolicy.java | 118 +- .../avs/models/PlacementPolicyProperties.java | 46 +- .../PlacementPolicyProvisioningState.java | 40 +- .../avs/models/PlacementPolicyState.java | 20 +- .../avs/models/PlacementPolicyType.java | 20 +- .../avs/models/PlacementPolicyUpdate.java | 34 +- .../models/PortMirroringDirectionEnum.java | 24 +- .../avs/models/PortMirroringStatusEnum.java | 20 +- .../avs/models/PrivateCloud.java | 591 +- .../avs/models/PrivateCloudIdentity.java | 69 +- .../avs/models/PrivateCloudList.java | 59 - .../models/PrivateCloudProvisioningState.java | 48 +- .../avs/models/PrivateCloudUpdate.java | 136 +- .../avs/models/PrivateClouds.java | 92 +- .../models/PrivateCloudsUpdateHeaders.java | 68 + .../models/PrivateCloudsUpdateResponse.java | 39 + .../resourcemanager/avs/models/Quota.java | 12 +- .../avs/models/QuotaEnabled.java | 20 +- .../avs/models/ResourceIdentityType.java | 23 +- .../avs/models/ScriptCmdlet.java | 43 +- .../avs/models/ScriptCmdletAudience.java | 53 + .../models/ScriptCmdletProvisioningState.java | 58 + .../avs/models/ScriptCmdlets.java | 60 +- .../avs/models/ScriptCmdletsList.java | 59 - .../avs/models/ScriptExecution.java | 254 +- .../avs/models/ScriptExecutionParameter.java | 45 +- .../models/ScriptExecutionParameterType.java | 24 +- .../ScriptExecutionProvisioningState.java | 56 +- .../avs/models/ScriptExecutions.java | 90 +- .../avs/models/ScriptExecutionsList.java | 59 - .../avs/models/ScriptOutputStreamType.java | 28 +- .../avs/models/ScriptPackage.java | 37 +- .../ScriptPackageProvisioningState.java | 58 + .../avs/models/ScriptPackages.java | 38 +- .../avs/models/ScriptPackagesList.java | 59 - .../avs/models/ScriptParameter.java | 52 +- .../avs/models/ScriptParameterTypes.java | 36 +- .../ScriptSecureStringExecutionParameter.java | 44 +- .../ScriptStringExecutionParameter.java | 44 +- .../avs/models/SegmentStatusEnum.java | 20 +- .../avs/models/ServiceSpecification.java | 83 - .../azure/resourcemanager/avs/models/Sku.java | 140 +- .../resourcemanager/avs/models/SkuTier.java | 71 + .../resourcemanager/avs/models/SslEnum.java | 20 +- .../resourcemanager/avs/models/Trial.java | 12 +- .../avs/models/TrialStatus.java | 24 +- .../avs/models/VMGroupStatusEnum.java | 20 +- .../avs/models/VMTypeEnum.java | 24 +- .../avs/models/VirtualMachine.java | 37 +- .../VirtualMachineProvisioningState.java | 58 + .../VirtualMachineRestrictMovement.java | 16 +- .../VirtualMachineRestrictMovementState.java | 20 +- .../avs/models/VirtualMachines.java | 87 +- .../avs/models/VirtualMachinesList.java | 59 - .../avs/models/VisibilityParameterEnum.java | 20 +- .../VmHostPlacementPolicyProperties.java | 85 +- .../models/VmPlacementPolicyProperties.java | 66 +- .../avs/models/WorkloadNetwork.java | 29 +- .../avs/models/WorkloadNetworkDhcp.java | 88 +- .../WorkloadNetworkDhcpConfigurations.java | 145 + .../avs/models/WorkloadNetworkDhcpEntity.java | 49 +- .../avs/models/WorkloadNetworkDhcpList.java | 59 - .../WorkloadNetworkDhcpProvisioningState.java | 40 +- .../avs/models/WorkloadNetworkDhcpRelay.java | 48 +- .../avs/models/WorkloadNetworkDhcpServer.java | 58 +- .../avs/models/WorkloadNetworkDhcpUpdate.java | 57 + .../avs/models/WorkloadNetworkDnsService.java | 170 +- ...oadNetworkDnsServiceProvisioningState.java | 40 +- .../WorkloadNetworkDnsServiceUpdate.java | 204 + .../models/WorkloadNetworkDnsServices.java | 147 + .../WorkloadNetworkDnsServicesList.java | 59 - .../avs/models/WorkloadNetworkDnsZone.java | 173 +- ...rkloadNetworkDnsZoneProvisioningState.java | 40 +- .../models/WorkloadNetworkDnsZoneUpdate.java | 195 + .../avs/models/WorkloadNetworkDnsZones.java | 145 + .../models/WorkloadNetworkDnsZonesList.java | 59 - .../avs/models/WorkloadNetworkGateway.java | 33 +- .../models/WorkloadNetworkGatewayList.java | 59 - .../avs/models/WorkloadNetworkGateways.java | 68 + .../avs/models/WorkloadNetworkList.java | 59 - .../avs/models/WorkloadNetworkName.java | 44 - .../models/WorkloadNetworkPortMirroring.java | 154 +- .../WorkloadNetworkPortMirroringList.java | 59 - .../WorkloadNetworkPortMirroringProfiles.java | 148 + ...NetworkPortMirroringProvisioningState.java | 40 +- .../WorkloadNetworkPortMirroringUpdate.java | 180 + .../WorkloadNetworkProvisioningState.java | 73 + .../models/WorkloadNetworkPublicIPsList.java | 59 - .../avs/models/WorkloadNetworkPublicIp.java | 74 +- ...kloadNetworkPublicIpProvisioningState.java | 40 +- .../avs/models/WorkloadNetworkPublicIps.java | 147 + .../avs/models/WorkloadNetworkSegment.java | 140 +- .../models/WorkloadNetworkSegmentPortVif.java | 31 +- ...rkloadNetworkSegmentProvisioningState.java | 40 +- .../models/WorkloadNetworkSegmentSubnet.java | 20 +- .../models/WorkloadNetworkSegmentUpdate.java | 167 + .../avs/models/WorkloadNetworkSegments.java | 145 + .../models/WorkloadNetworkSegmentsList.java | 59 - .../avs/models/WorkloadNetworkVMGroup.java | 110 +- ...rkloadNetworkVMGroupProvisioningState.java | 40 +- .../models/WorkloadNetworkVMGroupUpdate.java | 135 + .../models/WorkloadNetworkVMGroupsList.java | 59 - .../models/WorkloadNetworkVirtualMachine.java | 33 +- .../WorkloadNetworkVirtualMachines.java | 71 + .../WorkloadNetworkVirtualMachinesList.java | 59 - .../avs/models/WorkloadNetworkVmGroups.java | 145 + .../avs/models/WorkloadNetworks.java | 1069 +- .../avs/models/package-info.java | 7 +- .../resourcemanager/avs/package-info.java | 7 +- .../src/main/java/module-info.java | 15 +- .../proxy-config.json | 1 + .../reflect-config.json | 926 ++ .../AddonsCreateOrUpdateSamples.java | 77 +- .../avs/generated/AddonsDeleteSamples.java | 10 +- .../avs/generated/AddonsGetSamples.java | 46 +- .../avs/generated/AddonsListSamples.java | 10 +- .../AuthorizationsCreateOrUpdateSamples.java | 10 +- .../AuthorizationsDeleteSamples.java | 10 +- .../generated/AuthorizationsGetSamples.java | 13 +- .../generated/AuthorizationsListSamples.java | 10 +- .../CloudLinksCreateOrUpdateSamples.java | 13 +- .../generated/CloudLinksDeleteSamples.java | 10 +- .../avs/generated/CloudLinksGetSamples.java | 10 +- .../avs/generated/CloudLinksListSamples.java | 10 +- .../ClustersCreateOrUpdateSamples.java | 13 +- .../avs/generated/ClustersDeleteSamples.java | 10 +- .../avs/generated/ClustersGetSamples.java | 10 +- .../avs/generated/ClustersListSamples.java | 10 +- .../generated/ClustersListZonesSamples.java | 26 +- .../avs/generated/ClustersUpdateSamples.java | 18 +- .../DatastoresCreateOrUpdateSamples.java | 19 +- .../generated/DatastoresDeleteSamples.java | 10 +- .../avs/generated/DatastoresGetSamples.java | 13 +- .../avs/generated/DatastoresListSamples.java | 10 +- ...ReachConnectionsCreateOrUpdateSamples.java | 14 +- .../GlobalReachConnectionsDeleteSamples.java | 10 +- .../GlobalReachConnectionsGetSamples.java | 13 +- .../GlobalReachConnectionsListSamples.java | 10 +- ...xEnterpriseSitesCreateOrUpdateSamples.java | 10 +- .../HcxEnterpriseSitesDeleteSamples.java | 10 +- .../HcxEnterpriseSitesGetSamples.java | 10 +- .../HcxEnterpriseSitesListSamples.java | 10 +- .../IscsiPathsCreateOrUpdateSamples.java | 26 + .../generated/IscsiPathsDeleteSamples.java | 22 + .../avs/generated/IscsiPathsGetSamples.java | 22 + .../IscsiPathsListByPrivateCloudSamples.java | 22 + ...ocationsCheckQuotaAvailabilitySamples.java | 10 +- ...ocationsCheckTrialAvailabilitySamples.java | 27 +- .../avs/generated/OperationsListSamples.java | 10 +- ...lacementPoliciesCreateOrUpdateSamples.java | 37 +- .../PlacementPoliciesDeleteSamples.java | 10 +- .../PlacementPoliciesGetSamples.java | 13 +- .../PlacementPoliciesListSamples.java | 10 +- .../PlacementPoliciesUpdateSamples.java | 37 +- .../PrivateCloudsCreateOrUpdateSamples.java | 41 +- .../generated/PrivateCloudsDeleteSamples.java | 10 +- ...rivateCloudsGetByResourceGroupSamples.java | 22 +- ...vateCloudsListAdminCredentialsSamples.java | 11 +- ...ivateCloudsListByResourceGroupSamples.java | 22 +- .../generated/PrivateCloudsListSamples.java | 22 +- ...rivateCloudsRotateNsxtPasswordSamples.java | 10 +- ...ateCloudsRotateVcenterPasswordSamples.java | 11 +- .../generated/PrivateCloudsUpdateSamples.java | 50 +- .../generated/ScriptCmdletsGetSamples.java | 17 +- .../generated/ScriptCmdletsListSamples.java | 10 +- ...ScriptExecutionsCreateOrUpdateSamples.java | 34 +- .../ScriptExecutionsDeleteSamples.java | 10 +- ...riptExecutionsGetExecutionLogsSamples.java | 26 +- .../generated/ScriptExecutionsGetSamples.java | 13 +- .../ScriptExecutionsListSamples.java | 10 +- .../generated/ScriptPackagesGetSamples.java | 13 +- .../generated/ScriptPackagesListSamples.java | 10 +- .../generated/VirtualMachinesGetSamples.java | 17 +- .../generated/VirtualMachinesListSamples.java | 14 +- ...irtualMachinesRestrictMovementSamples.java | 23 +- ...etworkDhcpConfigurationsCreateSamples.java | 31 + ...etworkDhcpConfigurationsDeleteSamples.java | 23 + ...adNetworkDhcpConfigurationsGetSamples.java | 23 + ...gurationsListByWorkloadNetworkSamples.java | 23 + ...etworkDhcpConfigurationsUpdateSamples.java | 31 + ...kloadNetworkDnsServicesCreateSamples.java} | 17 +- ...rkloadNetworkDnsServicesDeleteSamples.java | 23 + .../WorkloadNetworkDnsServicesGetSamples.java | 23 + ...sServicesListByWorkloadNetworkSamples.java | 23 + ...kloadNetworkDnsServicesUpdateSamples.java} | 23 +- ...WorkloadNetworkDnsZonesCreateSamples.java} | 17 +- ...WorkloadNetworkDnsZonesDeleteSamples.java} | 14 +- .../WorkloadNetworkDnsZonesGetSamples.java | 23 + ...kDnsZonesListByWorkloadNetworkSamples.java | 22 + ...WorkloadNetworkDnsZonesUpdateSamples.java} | 23 +- .../WorkloadNetworkGatewaysGetSamples.java | 23 + ...kGatewaysListByWorkloadNetworkSamples.java | 22 + ...rkPortMirroringProfilesCreateSamples.java} | 18 +- ...orkPortMirroringProfilesDeleteSamples.java | 24 + ...etworkPortMirroringProfilesGetSamples.java | 23 + ...gProfilesListByWorkloadNetworkSamples.java | 24 + ...rkPortMirroringProfilesUpdateSamples.java} | 24 +- ...orkloadNetworkPublicIpsCreateSamples.java} | 17 +- ...orkloadNetworkPublicIpsDeleteSamples.java} | 14 +- .../WorkloadNetworkPublicIpsGetSamples.java | 23 + ...PublicIpsListByWorkloadNetworkSamples.java | 22 + ...WorkloadNetworkSegmentsCreateSamples.java} | 23 +- ...adNetworkSegmentsDeleteSegmentSamples.java | 23 + .../WorkloadNetworkSegmentsGetSamples.java | 23 + ...kSegmentsListByWorkloadNetworkSamples.java | 22 + .../WorkloadNetworkSegmentsUpdateSamples.java | 27 + ...kloadNetworkVirtualMachinesGetSamples.java | 24 + ...lMachinesListByWorkloadNetworkSamples.java | 24 + .../WorkloadNetworkVmGroupsCreateSamples.java | 22 + ...WorkloadNetworkVmGroupsDeleteSamples.java} | 14 +- .../WorkloadNetworkVmGroupsGetSamples.java | 23 + ...kVmGroupsListByWorkloadNetworkSamples.java | 22 + ...WorkloadNetworkVmGroupsUpdateSamples.java} | 20 +- .../WorkloadNetworksCreateDhcpSamples.java | 32 - .../WorkloadNetworksCreateVMGroupSamples.java | 29 - .../WorkloadNetworksDeleteDhcpSamples.java | 20 - ...rkloadNetworksDeleteDnsServiceSamples.java | 22 - ...oadNetworksDeletePortMirroringSamples.java | 22 - .../WorkloadNetworksDeleteSegmentSamples.java | 20 - .../WorkloadNetworksGetDhcpSamples.java | 20 - .../WorkloadNetworksGetDnsServiceSamples.java | 22 - .../WorkloadNetworksGetDnsZoneSamples.java | 22 - .../WorkloadNetworksGetGatewaySamples.java | 22 - ...rkloadNetworksGetPortMirroringSamples.java | 22 - .../WorkloadNetworksGetPublicIpSamples.java | 22 - .../generated/WorkloadNetworksGetSamples.java | 16 +- .../WorkloadNetworksGetSegmentSamples.java | 22 - .../WorkloadNetworksGetVMGroupSamples.java | 22 - ...kloadNetworksGetVirtualMachineSamples.java | 22 - ...loadNetworksListByPrivateCloudSamples.java | 22 + .../WorkloadNetworksListDhcpSamples.java | 20 - ...orkloadNetworksListDnsServicesSamples.java | 20 - .../WorkloadNetworksListDnsZonesSamples.java | 20 - .../WorkloadNetworksListGatewaysSamples.java | 20 - ...kloadNetworksListPortMirroringSamples.java | 20 - .../WorkloadNetworksListPublicIPsSamples.java | 20 - .../WorkloadNetworksListSamples.java | 20 - .../WorkloadNetworksListSegmentsSamples.java | 20 - .../WorkloadNetworksListVMGroupsSamples.java | 20 - ...oadNetworksListVirtualMachinesSamples.java | 20 - .../WorkloadNetworksUpdateDhcpSamples.java | 32 - ...WorkloadNetworksUpdateSegmentsSamples.java | 37 - .../generated/AddonArcPropertiesTests.java | 13 +- .../generated/AddonHcxPropertiesTests.java | 15 +- .../avs/generated/AddonInnerTests.java | 10 +- .../avs/generated/AddonListResultTests.java | 19 + .../avs/generated/AddonListTests.java | 25 - .../avs/generated/AddonPropertiesTests.java | 7 +- .../avs/generated/AddonVrPropertiesTests.java | 13 +- .../AddonsCreateOrUpdateMockTests.java | 60 +- .../avs/generated/AddonsDeleteMockTests.java | 46 +- .../AddonsGetWithResponseMockTests.java | 53 +- .../avs/generated/AddonsListMockTests.java | 51 +- .../AuthorizationsDeleteMockTests.java | 46 +- .../AvailabilityPropertiesTests.java | 23 +- .../avs/generated/CircuitTests.java | 10 +- .../avs/generated/CloudLinkInnerTests.java | 16 +- .../generated/CloudLinkListResultTests.java | 20 + .../avs/generated/CloudLinkListTests.java | 25 - .../generated/CloudLinkPropertiesTests.java | 15 +- .../CloudLinksCreateOrUpdateMockTests.java | 69 +- .../generated/CloudLinksDeleteMockTests.java | 46 +- .../CloudLinksGetWithResponseMockTests.java | 59 +- .../generated/CloudLinksListMockTests.java | 55 +- .../avs/generated/ClusterInnerTests.java | 47 +- .../avs/generated/ClusterListResultTests.java | 28 + .../avs/generated/ClusterListTests.java | 25 - .../avs/generated/ClusterPropertiesTests.java | 25 +- .../ClusterUpdatePropertiesTests.java | 22 +- .../avs/generated/ClusterUpdateTests.java | 36 +- .../generated/ClusterZoneListInnerTests.java | 20 +- .../avs/generated/ClusterZoneTests.java | 15 +- .../ClustersCreateOrUpdateMockTests.java | 88 +- .../generated/ClustersDeleteMockTests.java | 46 +- .../ClustersGetWithResponseMockTests.java | 75 +- .../avs/generated/ClustersListMockTests.java | 71 +- ...lustersListZonesWithResponseMockTests.java | 56 +- .../CommonClusterPropertiesTests.java | 32 - .../avs/generated/DatastoreInnerTests.java | 42 +- .../generated/DatastoreListResultTests.java | 25 + .../avs/generated/DatastoreListTests.java | 25 - .../generated/DatastorePropertiesTests.java | 43 +- .../DatastoresCreateOrUpdateMockTests.java | 83 +- .../generated/DatastoresDeleteMockTests.java | 47 +- .../DatastoresGetWithResponseMockTests.java | 72 +- .../generated/DatastoresListMockTests.java | 68 +- .../avs/generated/DiskPoolVolumeTests.java | 30 +- .../avs/generated/ElasticSanVolumeTests.java | 25 + .../avs/generated/EndpointsTests.java | 15 +- ...GlobalReachConnectionsDeleteMockTests.java | 46 +- ...priseSitesDeleteWithResponseMockTests.java | 49 +- .../avs/generated/IscsiPathInnerTests.java | 26 + .../generated/IscsiPathListResultTests.java | 20 + .../generated/IscsiPathPropertiesTests.java | 26 + .../IscsiPathsCreateOrUpdateMockTests.java | 40 + .../generated/IscsiPathsDeleteMockTests.java | 33 + .../IscsiPathsGetWithResponseMockTests.java | 38 + ...IscsiPathsListByPrivateCloudMockTests.java | 39 + ...uotaAvailabilityWithResponseMockTests.java | 56 +- ...rialAvailabilityWithResponseMockTests.java | 62 +- .../avs/generated/LogSpecificationTests.java | 32 - .../avs/generated/ManagementClusterTests.java | 25 +- .../avs/generated/MetricDimensionTests.java | 39 - .../generated/MetricSpecificationTests.java | 86 - .../avs/generated/NetAppVolumeTests.java | 10 +- .../avs/generated/OperationDisplayTests.java | 21 +- .../avs/generated/OperationInnerTests.java | 216 +- .../avs/generated/OperationListTests.java | 25 - .../generated/OperationPropertiesTests.java | 208 - .../generated/OperationsListMockTests.java | 203 +- .../avs/generated/PagedOperationTests.java | 25 + ...cementPoliciesCreateOrUpdateMockTests.java | 75 +- .../PlacementPoliciesDeleteMockTests.java | 48 +- ...ementPoliciesGetWithResponseMockTests.java | 68 +- .../PlacementPoliciesListMockTests.java | 59 +- .../generated/PlacementPoliciesListTests.java | 25 - .../generated/PlacementPolicyInnerTests.java | 22 +- .../PlacementPolicyListResultTests.java | 22 + .../PlacementPolicyPropertiesTests.java | 22 +- .../PlacementPolicyUpdatePropertiesTests.java | 37 +- .../generated/PlacementPolicyUpdateTests.java | 42 +- .../generated/PrivateCloudIdentityTests.java | 13 +- .../PrivateCloudsDeleteMockTests.java | 46 +- .../avs/generated/QuotaInnerTests.java | 14 +- .../avs/generated/ScriptCmdletInnerTests.java | 16 +- .../ScriptCmdletListResultTests.java | 19 + .../ScriptCmdletPropertiesTests.java | 16 +- ...ScriptCmdletsGetWithResponseMockTests.java | 56 +- .../generated/ScriptCmdletsListMockTests.java | 52 +- .../avs/generated/ScriptCmdletsListTests.java | 25 - .../generated/ScriptExecutionInnerTests.java | 64 +- .../ScriptExecutionListResultTests.java | 26 + .../ScriptExecutionParameterTests.java | 13 +- .../ScriptExecutionPropertiesTests.java | 63 +- ...riptExecutionsCreateOrUpdateMockTests.java | 94 +- .../ScriptExecutionsDeleteMockTests.java | 46 +- ...GetExecutionLogsWithResponseMockTests.java | 90 +- ...iptExecutionsGetWithResponseMockTests.java | 77 +- .../ScriptExecutionsListMockTests.java | 73 +- .../generated/ScriptExecutionsListTests.java | 25 - .../generated/ScriptPackageInnerTests.java | 16 +- .../ScriptPackageListResultTests.java | 19 + .../ScriptPackagePropertiesTests.java | 16 +- ...criptPackagesGetWithResponseMockTests.java | 56 +- .../ScriptPackagesListMockTests.java | 52 +- .../generated/ScriptPackagesListTests.java | 25 - .../avs/generated/ScriptParameterTests.java | 19 +- ...ptSecureStringExecutionParameterTests.java | 20 +- .../ScriptStringExecutionParameterTests.java | 19 +- .../generated/ServiceSpecificationTests.java | 215 - .../avs/generated/SkuTests.java | 25 +- .../avs/generated/TrialInnerTests.java | 14 +- .../generated/VirtualMachineInnerTests.java | 16 +- .../VirtualMachineListResultTests.java | 19 + .../VirtualMachinePropertiesTests.java | 16 +- .../VirtualMachineRestrictMovementTests.java | 10 +- ...rtualMachinesGetWithResponseMockTests.java | 56 +- .../VirtualMachinesListMockTests.java | 52 +- .../generated/VirtualMachinesListTests.java | 25 - .../VmHostPlacementPolicyPropertiesTests.java | 39 +- .../VmPlacementPolicyPropertiesTests.java | 28 +- ...workDhcpConfigurationsCreateMockTests.java | 43 + ...workDhcpConfigurationsDeleteMockTests.java | 34 + ...onfigurationsGetWithResponseMockTests.java | 40 + ...rationsListByWorkloadNetworkMockTests.java | 40 + .../WorkloadNetworkDhcpEntityTests.java | 22 +- .../WorkloadNetworkDhcpInnerTests.java | 24 +- .../WorkloadNetworkDhcpListResultTests.java | 21 + .../WorkloadNetworkDhcpListTests.java | 25 - .../WorkloadNetworkDhcpRelayTests.java | 30 +- .../WorkloadNetworkDhcpServerTests.java | 36 +- .../WorkloadNetworkDhcpUpdateTests.java | 30 + .../WorkloadNetworkDnsServiceInnerTests.java | 44 +- ...kloadNetworkDnsServiceListResultTests.java | 26 + ...kloadNetworkDnsServicePropertiesTests.java | 48 +- .../WorkloadNetworkDnsServiceUpdateTests.java | 43 + ...loadNetworkDnsServicesCreateMockTests.java | 53 + ...loadNetworkDnsServicesDeleteMockTests.java | 34 + ...rkDnsServicesGetWithResponseMockTests.java | 45 + ...ervicesListByWorkloadNetworkMockTests.java | 45 + .../WorkloadNetworkDnsServicesListTests.java | 25 - .../WorkloadNetworkDnsZoneInnerTests.java | 48 +- ...WorkloadNetworkDnsZoneListResultTests.java | 25 + ...WorkloadNetworkDnsZonePropertiesTests.java | 48 +- .../WorkloadNetworkDnsZoneUpdateTests.java | 42 + ...orkloadNetworkDnsZonesCreateMockTests.java | 52 + ...orkloadNetworkDnsZonesDeleteMockTests.java | 34 + ...tworkDnsZonesGetWithResponseMockTests.java | 44 + ...nsZonesListByWorkloadNetworkMockTests.java | 44 + .../WorkloadNetworkDnsZonesListTests.java | 25 - .../WorkloadNetworkGatewayInnerTests.java | 19 +- ...WorkloadNetworkGatewayListResultTests.java | 20 + .../WorkloadNetworkGatewayListTests.java | 25 - ...WorkloadNetworkGatewayPropertiesTests.java | 16 +- ...tworkGatewaysGetWithResponseMockTests.java | 39 + ...atewaysListByWorkloadNetworkMockTests.java | 39 + .../generated/WorkloadNetworkInnerTests.java | 15 +- .../WorkloadNetworkListResultTests.java | 19 + .../generated/WorkloadNetworkListTests.java | 25 - ...orkloadNetworkPortMirroringInnerTests.java | 42 +- ...adNetworkPortMirroringListResultTests.java | 25 + ...WorkloadNetworkPortMirroringListTests.java | 25 - ...kPortMirroringProfilesCreateMockTests.java | 50 + ...kPortMirroringProfilesDeleteMockTests.java | 34 + ...oringProfilesGetWithResponseMockTests.java | 44 + ...rofilesListByWorkloadNetworkMockTests.java | 44 + ...adNetworkPortMirroringPropertiesTests.java | 43 +- ...rkloadNetworkPortMirroringUpdateTests.java | 40 + .../WorkloadNetworkPropertiesTests.java | 16 + ...orkloadNetworkPublicIPListResultTests.java | 21 + .../WorkloadNetworkPublicIPsListTests.java | 25 - .../WorkloadNetworkPublicIpInnerTests.java | 24 +- ...orkloadNetworkPublicIpPropertiesTests.java | 31 +- ...rkloadNetworkPublicIpsCreateMockTests.java | 43 + ...rkloadNetworkPublicIpsDeleteMockTests.java | 33 + ...workPublicIpsGetWithResponseMockTests.java | 40 + ...blicIpsListByWorkloadNetworkMockTests.java | 40 + .../WorkloadNetworkSegmentInnerTests.java | 45 +- ...WorkloadNetworkSegmentListResultTests.java | 24 + .../WorkloadNetworkSegmentPortVifTests.java | 15 +- ...WorkloadNetworkSegmentPropertiesTests.java | 44 +- .../WorkloadNetworkSegmentSubnetTests.java | 21 +- .../WorkloadNetworkSegmentUpdateTests.java | 40 + ...orkloadNetworkSegmentsCreateMockTests.java | 52 + ...NetworkSegmentsDeleteSegmentMockTests.java | 34 + ...tworkSegmentsGetWithResponseMockTests.java | 43 + ...egmentsListByWorkloadNetworkMockTests.java | 43 + .../WorkloadNetworkSegmentsListTests.java | 25 - .../WorkloadNetworkVMGroupInnerTests.java | 30 +- ...WorkloadNetworkVMGroupListResultTests.java | 22 + ...WorkloadNetworkVMGroupPropertiesTests.java | 30 +- .../WorkloadNetworkVMGroupUpdateTests.java | 33 + .../WorkloadNetworkVMGroupsListTests.java | 25 - ...rkloadNetworkVirtualMachineInnerTests.java | 20 +- ...dNetworkVirtualMachineListResultTests.java | 20 + ...dNetworkVirtualMachinePropertiesTests.java | 19 +- ...rtualMachinesGetWithResponseMockTests.java | 39 + ...achinesListByWorkloadNetworkMockTests.java | 39 + ...rkloadNetworkVirtualMachinesListTests.java | 25 - ...orkloadNetworkVmGroupsCreateMockTests.java | 46 + ...orkloadNetworkVmGroupsDeleteMockTests.java | 33 + ...tworkVmGroupsGetWithResponseMockTests.java | 41 + ...mGroupsListByWorkloadNetworkMockTests.java | 41 + .../WorkloadNetworksCreateDhcpMockTests.java | 75 - ...loadNetworksCreateDnsServiceMockTests.java | 84 - ...orkloadNetworksCreateDnsZoneMockTests.java | 83 - ...dNetworksCreatePortMirroringMockTests.java | 81 - ...rkloadNetworksCreatePublicIpMockTests.java | 74 - ...rkloadNetworksCreateSegmentsMockTests.java | 84 - ...orkloadNetworksCreateVMGroupMockTests.java | 77 - .../WorkloadNetworksDeleteDhcpMockTests.java | 63 - ...loadNetworksDeleteDnsServiceMockTests.java | 63 - ...orkloadNetworksDeleteDnsZoneMockTests.java | 63 - ...dNetworksDeletePortMirroringMockTests.java | 61 - ...rkloadNetworksDeletePublicIpMockTests.java | 61 - ...orkloadNetworksDeleteSegmentMockTests.java | 63 - ...orkloadNetworksDeleteVMGroupMockTests.java | 63 - ...dNetworksGetDhcpWithResponseMockTests.java | 71 - ...rksGetDnsServiceWithResponseMockTests.java | 76 - ...tworksGetDnsZoneWithResponseMockTests.java | 75 - ...tworksGetGatewayWithResponseMockTests.java | 70 - ...GetPortMirroringWithResponseMockTests.java | 75 - ...worksGetPublicIpWithResponseMockTests.java | 71 - ...tworksGetSegmentWithResponseMockTests.java | 74 - ...tworksGetVMGroupWithResponseMockTests.java | 72 - ...etVirtualMachineWithResponseMockTests.java | 70 - ...kloadNetworksGetWithResponseMockTests.java | 56 +- ...adNetworksListByPrivateCloudMockTests.java | 37 + .../WorkloadNetworksListDhcpMockTests.java | 69 - ...kloadNetworksListDnsServicesMockTests.java | 74 - ...WorkloadNetworksListDnsZonesMockTests.java | 73 - ...WorkloadNetworksListGatewaysMockTests.java | 68 - .../WorkloadNetworksListMockTests.java | 64 - ...oadNetworksListPortMirroringMockTests.java | 73 - ...orkloadNetworksListPublicIPsMockTests.java | 69 - ...WorkloadNetworksListSegmentsMockTests.java | 72 - ...WorkloadNetworksListVMGroupsMockTests.java | 70 - ...dNetworksListVirtualMachinesMockTests.java | 70 - .../tsp-location.yaml | 4 + 766 files changed, 41042 insertions(+), 40727 deletions(-) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkGatewaysClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPublicIpsClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVirtualMachinesClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java rename sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/{Utils.java => ResourceManagerUtils.java} (79%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedOperation.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPolicyListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackageListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachineListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServiceListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZoneListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachineListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonList.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateResponse.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CommonClusterProperties.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationList.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionList.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LogSpecification.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricDimension.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricSpecification.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationList.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateResponse.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateHeaders.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateResponse.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletsList.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackagesList.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ServiceSpecification.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachinesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpConfigurations.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpUpdate.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceUpdate.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServices.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServicesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneUpdate.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZones.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZonesList.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateways.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkList.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkName.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProfiles.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringUpdate.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIPsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIps.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentUpdate.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegments.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupUpdate.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachines.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachinesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVmGroups.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksCreateDnsServiceSamples.java => WorkloadNetworkDnsServicesCreateSamples.java} (66%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkSamples.java rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksUpdateDnsServiceSamples.java => WorkloadNetworkDnsServicesUpdateSamples.java} (58%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksCreateDnsZoneSamples.java => WorkloadNetworkDnsZonesCreateSamples.java} (63%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksDeleteDnsZoneSamples.java => WorkloadNetworkDnsZonesDeleteSamples.java} (53%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkSamples.java rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksUpdateDnsZoneSamples.java => WorkloadNetworkDnsZonesUpdateSamples.java} (54%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkSamples.java rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksCreatePortMirroringSamples.java => WorkloadNetworkPortMirroringProfilesCreateSamples.java} (63%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkSamples.java rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksUpdatePortMirroringSamples.java => WorkloadNetworkPortMirroringProfilesUpdateSamples.java} (54%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksCreatePublicIpSamples.java => WorkloadNetworkPublicIpsCreateSamples.java} (57%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksDeletePublicIpSamples.java => WorkloadNetworkPublicIpsDeleteSamples.java} (53%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkSamples.java rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksCreateSegmentsSamples.java => WorkloadNetworkSegmentsCreateSamples.java} (53%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateSamples.java rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksDeleteVMGroupSamples.java => WorkloadNetworkVmGroupsDeleteSamples.java} (53%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkSamples.java rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksUpdateVMGroupSamples.java => WorkloadNetworkVmGroupsUpdateSamples.java} (52%) delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CommonClusterPropertiesTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ElasticSanVolumeTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathInnerTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathPropertiesTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LogSpecificationTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricDimensionTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricSpecificationTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationPropertiesTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PagedOperationTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ServiceSpecificationTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpUpdateTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceUpdateTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneUpdateTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringUpdateTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPropertiesTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPListResultTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentUpdateTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupUpdateTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/tsp-location.yaml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index ba09b0606f097..d603fe6589128 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -330,7 +330,7 @@ com.azure.resourcemanager:azure-resourcemanager-appconfiguration;1.0.0-beta.7;1. com.azure.resourcemanager:azure-resourcemanager-attestation;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-azurestack;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-azurestackhci;1.0.0-beta.4;1.0.0-beta.5 -com.azure.resourcemanager:azure-resourcemanager-avs;1.1.0;1.2.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-avs;1.1.0;1.2.0 com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-commerce;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0-beta.3;1.0.0-beta.4 diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index 350b612985f25..ba8c0fa3b199a 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,14 +1,606 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-06-04) -### Features Added +- Azure Resource Manager Avs client library for Java. This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. 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.DatastoreList` was removed + +* `models.ClusterList` was removed + +* `models.GlobalReachConnectionList` was removed + +* `models.ServiceSpecification` was removed + +* `models.MetricSpecification` was removed + +* `models.AddonList` was removed + +* `models.WorkloadNetworkName` was removed + +* `models.VirtualMachinesList` was removed + +* `models.WorkloadNetworkDhcpList` was removed + +* `models.ScriptCmdletsList` was removed + +* `models.CloudLinkList` was removed + +* `models.WorkloadNetworkVMGroupsList` was removed + +* `models.MetricDimension` was removed + +* `models.ScriptExecutionsList` was removed + +* `models.HcxEnterpriseSiteList` was removed + +* `models.WorkloadNetworkPortMirroringList` was removed + +* `models.WorkloadNetworkVirtualMachinesList` was removed + +* `models.OperationList` was removed + +* `models.LogSpecification` was removed + +* `models.WorkloadNetworkList` was removed + +* `models.PlacementPoliciesList` was removed + +* `models.WorkloadNetworkPublicIPsList` was removed + +* `models.WorkloadNetworkSegmentsList` was removed + +* `models.WorkloadNetworkDnsServicesList` was removed + +* `models.PrivateCloudList` was removed + +* `models.ExpressRouteAuthorizationList` was removed + +* `models.OperationProperties` was removed + +* `models.WorkloadNetworkDnsZonesList` was removed + +* `models.WorkloadNetworkGatewayList` was removed + +* `models.ScriptPackagesList` was removed + +* `models.CommonClusterProperties` was removed + +#### `models.WorkloadNetworkSegmentPortVif` was modified + +* `withPortName(java.lang.String)` was removed + +#### `models.WorkloadNetworkDnsZone$Update` was modified + +* `withDnsServices(java.lang.Long)` was removed + +#### `models.WorkloadNetworks` was modified + +* `listDnsServices(java.lang.String,java.lang.String)` was removed +* `getDnsZoneById(java.lang.String)` was removed +* `listDhcp(java.lang.String,java.lang.String)` was removed +* `getPortMirroringWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getPublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteSegment(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsServiceById(java.lang.String)` was removed +* `getDnsServiceById(java.lang.String)` was removed +* `listSegments(java.lang.String,java.lang.String)` was removed +* `deleteDnsZoneById(java.lang.String)` was removed +* `listVirtualMachines(java.lang.String,java.lang.String)` was removed +* `getVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed +* `list(java.lang.String,java.lang.String)` was removed +* `getWithResponse(java.lang.String,java.lang.String,models.WorkloadNetworkName,com.azure.core.util.Context)` was removed +* `definePortMirroring(java.lang.String)` was removed +* `getPortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `listPortMirroring(java.lang.String,java.lang.String)` was removed +* `getDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listVirtualMachines(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getGateway(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deletePortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `defineVMGroup(java.lang.String)` was removed +* `getSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsService(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deletePublicIpById(java.lang.String)` was removed +* `deletePortMirroringById(java.lang.String)` was removed +* `getVirtualMachineWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getVMGroupById(java.lang.String)` was removed +* `listDnsServices(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listDhcp(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deletePublicIp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getSegment(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getVMGroupWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDhcpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getGatewayWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `defineDnsService(java.lang.String)` was removed +* `listPublicIPs(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getPublicIpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deletePublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsZoneByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getPublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteVMGroupById(java.lang.String)` was removed +* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsServiceWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteDnsZoneByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getPublicIpById(java.lang.String)` was removed +* `listGateways(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsZoneWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getVirtualMachine(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getPortMirroringById(java.lang.String)` was removed +* `listDnsZones(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getSegmentWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listVMGroups(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `defineDhcp(java.lang.String)` was removed +* `getDhcpById(java.lang.String)` was removed +* `listDnsZones(java.lang.String,java.lang.String)` was removed +* `listGateways(java.lang.String,java.lang.String)` was removed +* `listSegments(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listVMGroups(java.lang.String,java.lang.String)` was removed +* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed +* `defineDnsZone(java.lang.String)` was removed +* `get(java.lang.String,java.lang.String,models.WorkloadNetworkName)` was removed +* `getPortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteSegment(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteDhcpById(java.lang.String)` was removed +* `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteSegmentById(java.lang.String)` was removed +* `listPublicIPs(java.lang.String,java.lang.String)` was removed +* `deletePublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `defineSegments(java.lang.String)` was removed +* `definePublicIp(java.lang.String)` was removed +* `listPortMirroring(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getSegmentById(java.lang.String)` was removed + +#### `models.Operation` was modified + +* `java.lang.String origin()` -> `models.Origin origin()` +* `properties()` was removed + +#### `models.WorkloadNetworkDnsZone` was modified + +* `java.lang.Long dnsServices()` -> `java.lang.Integer dnsServices()` + +#### `models.ScriptParameter` was modified + +* `withName(java.lang.String)` was removed + +#### `AvsManager` was modified + +* `fluent.AvsClient serviceClient()` -> `fluent.AVSClient serviceClient()` + +#### `models.WorkloadNetworkDnsZone$Definition` was modified + +* `withDnsServices(java.lang.Long)` was removed + +#### `models.ManagementCluster` was modified + +* `withHosts(java.util.List)` was removed +* `withClusterSize(java.lang.Integer)` was removed + +#### `models.WorkloadNetworkPublicIp` was modified + +* `publicIpBlock()` was removed + +#### `models.Addon$Update` was modified + +* `withProperties(models.AddonProperties)` was removed + +#### `models.WorkloadNetworkDhcpServer` was modified + +* `java.lang.Long leaseTime()` -> `java.lang.Integer leaseTime()` +* `withLeaseTime(java.lang.Long)` was removed + +### Features Added + +* `models.WorkloadNetworkVMGroupUpdate` was added + +* `implementation.models.WorkloadNetworkDhcpListResult` was added + +* `models.CloudLinkProvisioningState` was added + +* `implementation.models.WorkloadNetworkVMGroupListResult` was added + +* `implementation.models.VirtualMachineListResult` was added + +* `models.ClustersUpdateResponse` was added + +* `implementation.models.ClusterListResult` was added + +* `implementation.models.WorkloadNetworkPortMirroringListResult` was added + +* `implementation.models.AddonListResult` was added + +* `models.WorkloadNetworkPortMirroringProfiles` was added + +* `implementation.models.WorkloadNetworkPublicIPListResult` was added + +* `models.IscsiPath` was added + +* `models.WorkloadNetworkDnsServiceUpdate` was added + +* `models.PlacementPoliciesUpdateResponse` was added + +* `models.PrivateCloudsUpdateResponse` was added + +* `models.ClustersUpdateHeaders` was added + +* `implementation.models.WorkloadNetworkSegmentListResult` was added + +* `implementation.models.WorkloadNetworkVirtualMachineListResult` was added + +* `implementation.models.PrivateCloudListResult` was added + +* `implementation.models.CloudLinkListResult` was added + +* `models.IscsiPaths` was added + +* `implementation.models.HcxEnterpriseSiteListResult` was added + +* `implementation.models.WorkloadNetworkDnsZoneListResult` was added + +* `models.ScriptCmdletAudience` was added + +* `models.WorkloadNetworkPublicIps` was added + +* `models.VirtualMachineProvisioningState` was added + +* `models.WorkloadNetworkDnsZoneUpdate` was added + +* `models.HcxEnterpriseSiteProvisioningState` was added + +* `implementation.models.DatastoreListResult` was added + +* `models.WorkloadNetworkGateways` was added + +* `implementation.models.PlacementPolicyListResult` was added + +* `implementation.models.WorkloadNetworkGatewayListResult` was added + +* `models.ActionType` was added + +* `models.WorkloadNetworkDnsServices` was added + +* `models.WorkloadNetworkPortMirroringUpdate` was added + +* `implementation.models.ScriptPackageListResult` was added + +* `models.WorkloadNetworkDhcpUpdate` was added + +* `implementation.models.ExpressRouteAuthorizationListResult` was added + +* `models.WorkloadNetworkProvisioningState` was added + +* `models.WorkloadNetworkSegments` was added + +* `models.SkuTier` was added + +* `models.ScriptCmdletProvisioningState` was added + +* `models.DnsZoneType` was added + +* `implementation.models.PagedOperation` was added + +* `implementation.models.WorkloadNetworkListResult` was added + +* `models.WorkloadNetworkDhcpConfigurations` was added + +* `implementation.models.ScriptCmdletListResult` was added + +* `models.ElasticSanVolume` was added + +* `models.IscsiPathProvisioningState` was added + +* `models.WorkloadNetworkVirtualMachines` was added + +* `implementation.models.WorkloadNetworkDnsServiceListResult` was added + +* `models.ScriptPackageProvisioningState` was added + +* `models.PrivateCloudsUpdateHeaders` was added + +* `implementation.models.IscsiPathListResult` was added + +* `implementation.models.ScriptExecutionListResult` was added + +* `models.PlacementPoliciesUpdateHeaders` was added + +* `models.WorkloadNetworkVmGroups` was added + +* `implementation.models.GlobalReachConnectionListResult` was added + +* `models.WorkloadNetworkDnsZones` was added + +* `models.WorkloadNetworkSegmentUpdate` was added + +* `models.Origin` was added + +#### `models.Cluster$Definition` was modified + +* `withVsanDatastoreName(java.lang.String)` was added + +#### `models.ScriptStringExecutionParameter` was modified + +* `type()` was added + +#### `models.WorkloadNetworkDhcpRelay` was modified + +* `dhcpType()` was added + +#### `models.ScriptCmdlet` was modified + +* `audience()` was added +* `provisioningState()` was added +* `systemData()` was added + +#### `models.Cluster` was modified + +* `systemData()` was added +* `vsanDatastoreName()` was added + +#### `models.GlobalReachConnection` was modified + +* `systemData()` was added + +#### `models.WorkloadNetworkDnsZone$Update` was modified + +* `withDnsServices(java.lang.Integer)` was added + +#### `models.WorkloadNetworkDhcpEntity` was modified + +* `dhcpType()` was added + +#### `models.WorkloadNetworks` was modified + +* `get(java.lang.String,java.lang.String)` was added +* `listByPrivateCloud(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByPrivateCloud(java.lang.String,java.lang.String)` was added +* `getWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.Operation` was modified + +* `actionType()` was added + +#### `models.AddonArcProperties` was modified + +* `addonType()` was added + +#### `models.ExpressRouteAuthorization` was modified + +* `systemData()` was added + +#### `models.VmPlacementPolicyProperties` was modified + +* `type()` was added + +#### `models.VirtualMachine` was modified + +* `systemData()` was added +* `provisioningState()` was added + +#### `models.WorkloadNetworkDnsZone` was modified + +* `systemData()` was added + +#### `models.PlacementPolicy` was modified + +* `systemData()` was added + +#### `models.ScriptPackage` was modified + +* `provisioningState()` was added +* `systemData()` was added + +#### `models.Addon` was modified + +* `systemData()` was added + +#### `models.Datastore` was modified + +* `systemData()` was added +* `elasticSanVolume()` was added + +#### `models.WorkloadNetworkSegment` was modified + +* `systemData()` was added + +#### `models.Datastore$Definition` was modified + +* `withElasticSanVolume(models.ElasticSanVolume)` was added + +#### `models.PrivateCloud$Update` was modified + +* `withDnsZoneType(models.DnsZoneType)` was added +* `withSku(models.Sku)` was added + +#### `models.AddonVrProperties` was modified + +* `addonType()` was added + +#### `models.WorkloadNetworkVirtualMachine` was modified + +* `systemData()` was added +* `provisioningState()` was added + +#### `AvsManager` was modified + +* `workloadNetworkPortMirroringProfiles()` was added +* `workloadNetworkVmGroups()` was added +* `workloadNetworkPublicIps()` was added +* `workloadNetworkDnsServices()` was added +* `workloadNetworkDnsZones()` was added +* `workloadNetworkVirtualMachines()` was added +* `iscsiPaths()` was added +* `workloadNetworkGateways()` was added +* `workloadNetworkDhcpConfigurations()` was added +* `workloadNetworkSegments()` was added + +#### `models.AddonProperties` was modified + +* `addonType()` was added + +#### `models.CloudLink` was modified + +* `provisioningState()` was added +* `systemData()` was added + +#### `models.WorkloadNetwork` was modified + +* `systemData()` was added +* `provisioningState()` was added + +#### `models.WorkloadNetworkDnsZone$Definition` was modified + +* `withDnsServices(java.lang.Integer)` was added + +#### `models.ManagementCluster` was modified + +* `clusterSize()` was added +* `hosts()` was added +* `withVsanDatastoreName(java.lang.String)` was added +* `provisioningState()` was added +* `clusterId()` was added +* `vsanDatastoreName()` was added + +#### `models.VmHostPlacementPolicyProperties` was modified + +* `type()` was added + +#### `models.PrivateCloudUpdate` was modified + +* `sku()` was added +* `withSku(models.Sku)` was added +* `dnsZoneType()` was added +* `withDnsZoneType(models.DnsZoneType)` was added + +#### `models.ScriptSecureStringExecutionParameter` was modified + +* `type()` was added + +#### `models.WorkloadNetworkPortMirroring` was modified + +* `systemData()` was added + +#### `models.ScriptExecution` was modified + +* `systemData()` was added + +#### `models.WorkloadNetworkPublicIp` was modified + +* `publicIPBlock()` was added +* `systemData()` was added + +#### `models.PrivateCloud$Definition` was modified + +* `withVirtualNetworkId(java.lang.String)` was added +* `withDnsZoneType(models.DnsZoneType)` was added + +#### `models.WorkloadNetworkVMGroup` was modified + +* `systemData()` was added + +#### `models.ExpressRouteAuthorization$Definition` was modified + +* `withExpressRouteId(java.lang.String)` was added + +#### `models.ExpressRouteAuthorization$Update` was modified + +* `withExpressRouteId(java.lang.String)` was added + +#### `models.Cluster$Update` was modified + +* `withSku(models.Sku)` was added + +#### `models.AddonHcxProperties` was modified + +* `addonType()` was added + +#### `models.Endpoints` was modified + +* `hcxCloudManagerIp()` was added +* `nsxtManagerIp()` was added +* `vcenterIp()` was added + +#### `models.PlacementPolicyProperties` was modified + +* `type()` was added + +#### `models.PSCredentialExecutionParameter` was modified + +* `type()` was added + +#### `models.HcxEnterpriseSite` was modified + +* `systemData()` was added +* `provisioningState()` was added + +#### `models.Datastore$Update` was modified + +* `withElasticSanVolume(models.ElasticSanVolume)` was added + +#### `models.ClusterUpdate` was modified + +* `sku()` was added +* `withSku(models.Sku)` was added + +#### `models.Sku` was modified + +* `family()` was added +* `withFamily(java.lang.String)` was added +* `tier()` was added +* `withTier(models.SkuTier)` was added +* `size()` was added +* `withSize(java.lang.String)` was added +* `withCapacity(java.lang.Integer)` was added +* `capacity()` was added + +#### `models.ScriptExecutionParameter` was modified + +* `type()` was added + +#### `models.WorkloadNetworkGateway` was modified + +* `provisioningState()` was added +* `systemData()` was added + +#### `models.PrivateCloud` was modified + +* `systemData()` was added +* `dnsZoneType()` was added +* `virtualNetworkId()` was added + +#### `models.WorkloadNetworkDnsService` was modified + +* `systemData()` was added + +#### `models.AddonSrmProperties` was modified + +* `addonType()` was added + +#### `models.WorkloadNetworkDhcp` was modified + +* `systemData()` was added + +#### `models.WorkloadNetworkDhcpServer` was modified -### Other Changes +* `dhcpType()` was added +* `withLeaseTime(java.lang.Integer)` was added ## 1.1.0 (2023-08-22) diff --git a/sdk/avs/azure-resourcemanager-avs/README.md b/sdk/avs/azure-resourcemanager-avs/README.md index 5602eda11d66e..7e7e892205ec1 100644 --- a/sdk/avs/azure-resourcemanager-avs/README.md +++ b/sdk/avs/azure-resourcemanager-avs/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Avs client library for Java. -This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package tag package-2023-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-avs - 1.1.0 + 1.2.0 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -105,7 +105,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index 4c9da09c8472b..de911d669d098 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -52,6 +52,13 @@ - [Get](#hcxenterprisesites_get) - [List](#hcxenterprisesites_list) +## IscsiPaths + +- [CreateOrUpdate](#iscsipaths_createorupdate) +- [Delete](#iscsipaths_delete) +- [Get](#iscsipaths_get) +- [ListByPrivateCloud](#iscsipaths_listbyprivatecloud) + ## Locations - [CheckQuotaAvailability](#locations_checkquotaavailability) @@ -105,126 +112,98 @@ - [List](#virtualmachines_list) - [RestrictMovement](#virtualmachines_restrictmovement) +## WorkloadNetworkDhcpConfigurations + +- [Create](#workloadnetworkdhcpconfigurations_create) +- [Delete](#workloadnetworkdhcpconfigurations_delete) +- [Get](#workloadnetworkdhcpconfigurations_get) +- [ListByWorkloadNetwork](#workloadnetworkdhcpconfigurations_listbyworkloadnetwork) +- [Update](#workloadnetworkdhcpconfigurations_update) + +## WorkloadNetworkDnsServices + +- [Create](#workloadnetworkdnsservices_create) +- [Delete](#workloadnetworkdnsservices_delete) +- [Get](#workloadnetworkdnsservices_get) +- [ListByWorkloadNetwork](#workloadnetworkdnsservices_listbyworkloadnetwork) +- [Update](#workloadnetworkdnsservices_update) + +## WorkloadNetworkDnsZones + +- [Create](#workloadnetworkdnszones_create) +- [Delete](#workloadnetworkdnszones_delete) +- [Get](#workloadnetworkdnszones_get) +- [ListByWorkloadNetwork](#workloadnetworkdnszones_listbyworkloadnetwork) +- [Update](#workloadnetworkdnszones_update) + +## WorkloadNetworkGateways + +- [Get](#workloadnetworkgateways_get) +- [ListByWorkloadNetwork](#workloadnetworkgateways_listbyworkloadnetwork) + +## WorkloadNetworkPortMirroringProfiles + +- [Create](#workloadnetworkportmirroringprofiles_create) +- [Delete](#workloadnetworkportmirroringprofiles_delete) +- [Get](#workloadnetworkportmirroringprofiles_get) +- [ListByWorkloadNetwork](#workloadnetworkportmirroringprofiles_listbyworkloadnetwork) +- [Update](#workloadnetworkportmirroringprofiles_update) + +## WorkloadNetworkPublicIps + +- [Create](#workloadnetworkpublicips_create) +- [Delete](#workloadnetworkpublicips_delete) +- [Get](#workloadnetworkpublicips_get) +- [ListByWorkloadNetwork](#workloadnetworkpublicips_listbyworkloadnetwork) + +## WorkloadNetworkSegments + +- [Create](#workloadnetworksegments_create) +- [DeleteSegment](#workloadnetworksegments_deletesegment) +- [Get](#workloadnetworksegments_get) +- [ListByWorkloadNetwork](#workloadnetworksegments_listbyworkloadnetwork) +- [Update](#workloadnetworksegments_update) + +## WorkloadNetworkVirtualMachines + +- [Get](#workloadnetworkvirtualmachines_get) +- [ListByWorkloadNetwork](#workloadnetworkvirtualmachines_listbyworkloadnetwork) + +## WorkloadNetworkVmGroups + +- [Create](#workloadnetworkvmgroups_create) +- [Delete](#workloadnetworkvmgroups_delete) +- [Get](#workloadnetworkvmgroups_get) +- [ListByWorkloadNetwork](#workloadnetworkvmgroups_listbyworkloadnetwork) +- [Update](#workloadnetworkvmgroups_update) + ## WorkloadNetworks -- [CreateDhcp](#workloadnetworks_createdhcp) -- [CreateDnsService](#workloadnetworks_creatednsservice) -- [CreateDnsZone](#workloadnetworks_creatednszone) -- [CreatePortMirroring](#workloadnetworks_createportmirroring) -- [CreatePublicIp](#workloadnetworks_createpublicip) -- [CreateSegments](#workloadnetworks_createsegments) -- [CreateVMGroup](#workloadnetworks_createvmgroup) -- [DeleteDhcp](#workloadnetworks_deletedhcp) -- [DeleteDnsService](#workloadnetworks_deletednsservice) -- [DeleteDnsZone](#workloadnetworks_deletednszone) -- [DeletePortMirroring](#workloadnetworks_deleteportmirroring) -- [DeletePublicIp](#workloadnetworks_deletepublicip) -- [DeleteSegment](#workloadnetworks_deletesegment) -- [DeleteVMGroup](#workloadnetworks_deletevmgroup) - [Get](#workloadnetworks_get) -- [GetDhcp](#workloadnetworks_getdhcp) -- [GetDnsService](#workloadnetworks_getdnsservice) -- [GetDnsZone](#workloadnetworks_getdnszone) -- [GetGateway](#workloadnetworks_getgateway) -- [GetPortMirroring](#workloadnetworks_getportmirroring) -- [GetPublicIp](#workloadnetworks_getpublicip) -- [GetSegment](#workloadnetworks_getsegment) -- [GetVMGroup](#workloadnetworks_getvmgroup) -- [GetVirtualMachine](#workloadnetworks_getvirtualmachine) -- [List](#workloadnetworks_list) -- [ListDhcp](#workloadnetworks_listdhcp) -- [ListDnsServices](#workloadnetworks_listdnsservices) -- [ListDnsZones](#workloadnetworks_listdnszones) -- [ListGateways](#workloadnetworks_listgateways) -- [ListPortMirroring](#workloadnetworks_listportmirroring) -- [ListPublicIPs](#workloadnetworks_listpublicips) -- [ListSegments](#workloadnetworks_listsegments) -- [ListVMGroups](#workloadnetworks_listvmgroups) -- [ListVirtualMachines](#workloadnetworks_listvirtualmachines) -- [UpdateDhcp](#workloadnetworks_updatedhcp) -- [UpdateDnsService](#workloadnetworks_updatednsservice) -- [UpdateDnsZone](#workloadnetworks_updatednszone) -- [UpdatePortMirroring](#workloadnetworks_updateportmirroring) -- [UpdateSegments](#workloadnetworks_updatesegments) -- [UpdateVMGroup](#workloadnetworks_updatevmgroup) +- [ListByPrivateCloud](#workloadnetworks_listbyprivatecloud) ### 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 Addons CreateOrUpdate. + */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_HCX.json - */ - /** - * 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-03-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-03-01/examples/Addons_CreateOrUpdate_ArcReg.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Addons_CreateOrUpdate_ArcReg.json */ /** - * Sample code: Addons_CreateOrUpdate_Arc. - * + * Sample code: Addons_CreateOrUpdate_ArcReg. + * * @param manager Entry point to AvsManager. */ - public static void addonsCreateOrUpdateArc(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() + public static void addonsCreateOrUpdateArcReg(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons() .define("arc") .withExistingPrivateCloud("group1", "cloud1") - .withProperties( - new AddonArcProperties() - .withVCenter( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) - .create(); - } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_VR.json - */ - /** - * 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)) + .withProperties(new AddonArcProperties().withVCenter( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) .create(); } } @@ -233,14 +212,16 @@ public final class AddonsCreateOrUpdateSamples { ### Addons_Delete ```java -/** Samples for Addons Delete. */ +/** + * Samples for Addons Delete. + */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Addons_Delete.json */ /** * Sample code: Addons_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void addonsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -252,50 +233,16 @@ public final class AddonsDeleteSamples { ### Addons_Get ```java -/** Samples for Addons Get. */ +/** + * Samples for Addons Get. + */ public final class AddonsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_SRM.json - */ - /** - * 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-03-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-03-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); - } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_ArcReg.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Addons_Get_ArcReg.json */ /** * Sample code: Addons_Get_ArcReg. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { @@ -307,14 +254,16 @@ public final class AddonsGetSamples { ### Addons_List ```java -/** Samples for Addons List. */ +/** + * Samples for Addons List. + */ public final class AddonsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Addons_List.json */ /** * Sample code: Addons_List. - * + * * @param manager Entry point to AvsManager. */ public static void addonsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -326,14 +275,16 @@ public final class AddonsListSamples { ### Authorizations_CreateOrUpdate ```java -/** Samples for Authorizations CreateOrUpdate. */ +/** + * Samples for Authorizations CreateOrUpdate. + */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { @@ -345,14 +296,16 @@ public final class AuthorizationsCreateOrUpdateSamples { ### Authorizations_Delete ```java -/** Samples for Authorizations Delete. */ +/** + * Samples for Authorizations Delete. + */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -364,19 +317,20 @@ public final class AuthorizationsDeleteSamples { ### Authorizations_Get ```java -/** Samples for Authorizations Get. */ +/** + * Samples for Authorizations Get. + */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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() + manager.authorizations() .getWithResponse("group1", "cloud1", "authorization1", com.azure.core.util.Context.NONE); } } @@ -385,14 +339,16 @@ public final class AuthorizationsGetSamples { ### Authorizations_List ```java -/** Samples for Authorizations List. */ +/** + * Samples for Authorizations List. + */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Authorizations_List.json */ /** * Sample code: Authorizations_List. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -404,19 +360,20 @@ public final class AuthorizationsListSamples { ### CloudLinks_CreateOrUpdate ```java -/** Samples for CloudLinks CreateOrUpdate. */ +/** + * Samples for CloudLinks CreateOrUpdate. + */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .cloudLinks() + manager.cloudLinks() .define("cloudLink1") .withExistingPrivateCloud("group1", "cloud1") .withLinkedCloud( @@ -429,14 +386,16 @@ public final class CloudLinksCreateOrUpdateSamples { ### CloudLinks_Delete ```java -/** Samples for CloudLinks Delete. */ +/** + * Samples for CloudLinks Delete. + */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -448,14 +407,16 @@ public final class CloudLinksDeleteSamples { ### CloudLinks_Get ```java -/** Samples for CloudLinks Get. */ +/** + * Samples for CloudLinks Get. + */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksGet(com.azure.resourcemanager.avs.AvsManager manager) { @@ -467,14 +428,16 @@ public final class CloudLinksGetSamples { ### CloudLinks_List ```java -/** Samples for CloudLinks List. */ +/** + * Samples for CloudLinks List. + */ public final class CloudLinksListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -488,19 +451,20 @@ public final class CloudLinksListSamples { ```java import com.azure.resourcemanager.avs.models.Sku; -/** Samples for Clusters CreateOrUpdate. */ +/** + * Samples for Clusters CreateOrUpdate. + */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void clustersCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .clusters() + manager.clusters() .define("cluster1") .withExistingPrivateCloud("group1", "cloud1") .withSku(new Sku().withName("AV20")) @@ -513,14 +477,16 @@ public final class ClustersCreateOrUpdateSamples { ### Clusters_Delete ```java -/** Samples for Clusters Delete. */ +/** + * Samples for Clusters Delete. + */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void clustersDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -532,14 +498,16 @@ public final class ClustersDeleteSamples { ### Clusters_Get ```java -/** Samples for Clusters Get. */ +/** + * Samples for Clusters Get. + */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_Get.json */ /** * Sample code: Clusters_Get. - * + * * @param manager Entry point to AvsManager. */ public static void clustersGet(com.azure.resourcemanager.avs.AvsManager manager) { @@ -551,14 +519,16 @@ public final class ClustersGetSamples { ### Clusters_List ```java -/** Samples for Clusters List. */ +/** + * Samples for Clusters List. + */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_List.json */ /** * Sample code: Clusters_List. - * + * * @param manager Entry point to AvsManager. */ public static void clustersList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -570,29 +540,19 @@ public final class ClustersListSamples { ### Clusters_ListZones ```java -/** Samples for Clusters ListZones. */ +/** + * Samples for Clusters ListZones. + */ public final class ClustersListZonesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones_Stretched.json - */ - /** - * Sample code: Clusters_ListZoneData_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void clustersListZoneDataStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_ListZones.json */ /** - * Sample code: Clusters_ListZoneData. - * + * Sample code: Clusters_ListZones. + * * @param manager Entry point to AvsManager. */ - public static void clustersListZoneData(com.azure.resourcemanager.avs.AvsManager manager) { + public static void clustersListZones(com.azure.resourcemanager.avs.AvsManager manager) { manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } @@ -603,22 +563,22 @@ public final class ClustersListZonesSamples { ```java import com.azure.resourcemanager.avs.models.Cluster; -/** Samples for Clusters Update. */ +/** + * Samples for Clusters Update. + */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Update.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_Update.json */ /** * Sample code: Clusters_Update. - * + * * @param manager Entry point to AvsManager. */ public static void clustersUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - Cluster resource = - manager - .clusters() - .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); + Cluster resource = manager.clusters() + .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withClusterSize(4).apply(); } } @@ -629,25 +589,24 @@ public final class ClustersUpdateSamples { ```java import com.azure.resourcemanager.avs.models.NetAppVolume; -/** Samples for Datastores CreateOrUpdate. */ +/** + * Samples for Datastores CreateOrUpdate. + */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .datastores() + 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")) + .withNetAppVolume(new NetAppVolume().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1")) .create(); } } @@ -656,14 +615,16 @@ public final class DatastoresCreateOrUpdateSamples { ### Datastores_Delete ```java -/** Samples for Datastores Delete. */ +/** + * Samples for Datastores Delete. + */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -675,19 +636,20 @@ public final class DatastoresDeleteSamples { ### Datastores_Get ```java -/** Samples for Datastores Get. */ +/** + * Samples for Datastores Get. + */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Datastores_Get.json */ /** * Sample code: Datastores_Get. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .datastores() + manager.datastores() .getWithResponse("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); } } @@ -696,14 +658,16 @@ public final class DatastoresGetSamples { ### Datastores_List ```java -/** Samples for Datastores List. */ +/** + * Samples for Datastores List. + */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Datastores_List.json */ /** * Sample code: Datastores_List. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -715,19 +679,21 @@ public final class DatastoresListSamples { ### GlobalReachConnections_CreateOrUpdate ```java -/** Samples for GlobalReachConnections CreateOrUpdate. */ +/** + * Samples for GlobalReachConnections CreateOrUpdate. + */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .globalReachConnections() + manager.globalReachConnections() .define("connection1") .withExistingPrivateCloud("group1", "cloud1") .withAuthorizationKey("01010101-0101-0101-0101-010101010101") @@ -741,14 +707,16 @@ public final class GlobalReachConnectionsCreateOrUpdateSamples { ### GlobalReachConnections_Delete ```java -/** Samples for GlobalReachConnections Delete. */ +/** + * Samples for GlobalReachConnections Delete. + */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -760,19 +728,20 @@ public final class GlobalReachConnectionsDeleteSamples { ### GlobalReachConnections_Get ```java -/** Samples for GlobalReachConnections Get. */ +/** + * Samples for GlobalReachConnections Get. + */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .globalReachConnections() + manager.globalReachConnections() .getWithResponse("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); } } @@ -781,14 +750,16 @@ public final class GlobalReachConnectionsGetSamples { ### GlobalReachConnections_List ```java -/** Samples for GlobalReachConnections List. */ +/** + * Samples for GlobalReachConnections List. + */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -800,14 +771,16 @@ public final class GlobalReachConnectionsListSamples { ### HcxEnterpriseSites_CreateOrUpdate ```java -/** Samples for HcxEnterpriseSites CreateOrUpdate. */ +/** + * Samples for HcxEnterpriseSites CreateOrUpdate. + */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { @@ -819,14 +792,16 @@ public final class HcxEnterpriseSitesCreateOrUpdateSamples { ### HcxEnterpriseSites_Delete ```java -/** Samples for HcxEnterpriseSites Delete. */ +/** + * Samples for HcxEnterpriseSites Delete. + */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -838,14 +813,16 @@ public final class HcxEnterpriseSitesDeleteSamples { ### HcxEnterpriseSites_Get ```java -/** Samples for HcxEnterpriseSites Get. */ +/** + * Samples for HcxEnterpriseSites Get. + */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesGet(com.azure.resourcemanager.avs.AvsManager manager) { @@ -857,14 +834,16 @@ public final class HcxEnterpriseSitesGetSamples { ### HcxEnterpriseSites_List ```java -/** Samples for HcxEnterpriseSites List. */ +/** + * Samples for HcxEnterpriseSites List. + */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -873,17 +852,107 @@ public final class HcxEnterpriseSitesListSamples { } ``` +### IscsiPaths_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * Samples for IscsiPaths CreateOrUpdate. + */ +public final class IscsiPathsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/IscsiPaths_CreateOrUpdate.json + */ + /** + * Sample code: IscsiPaths_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths() + .createOrUpdate("group1", "cloud1", new IscsiPathInner().withNetworkBlock("192.168.0.0/24"), + com.azure.core.util.Context.NONE); + } +} +``` + +### IscsiPaths_Delete + +```java +/** + * Samples for IscsiPaths Delete. + */ +public final class IscsiPathsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/IscsiPaths_Delete.json + */ + /** + * Sample code: IscsiPaths_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().delete("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### IscsiPaths_Get + +```java +/** + * Samples for IscsiPaths Get. + */ +public final class IscsiPathsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/IscsiPaths_Get.json + */ + /** + * Sample code: IscsiPaths_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### IscsiPaths_ListByPrivateCloud + +```java +/** + * Samples for IscsiPaths ListByPrivateCloud. + */ +public final class IscsiPathsListByPrivateCloudSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/IscsiPaths_List.json + */ + /** + * Sample code: IscsiPaths_ListByPrivateCloud. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsListByPrivateCloud(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + ### Locations_CheckQuotaAvailability ```java -/** Samples for Locations CheckQuotaAvailability. */ +/** + * Samples for Locations CheckQuotaAvailability. + */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckQuotaAvailability.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Locations_CheckQuotaAvailability.json */ /** * Sample code: Locations_CheckQuotaAvailability. - * + * * @param manager Entry point to AvsManager. */ public static void locationsCheckQuotaAvailability(com.azure.resourcemanager.avs.AvsManager manager) { @@ -895,50 +964,38 @@ public final class LocationsCheckQuotaAvailabilitySamples { ### Locations_CheckTrialAvailability ```java -import com.azure.resourcemanager.avs.models.Sku; -/** Samples for Locations CheckTrialAvailability. */ +/** + * Samples for Locations CheckTrialAvailability. + */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailability.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Locations_CheckTrialAvailability.json */ /** * Sample code: Locations_CheckTrialAvailability. - * + * * @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); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailabilityWithSku.json - */ - /** - * Sample code: Locations_CheckTrialAvailabilityWithSku. - * - * @param manager Entry point to AvsManager. - */ - public static void locationsCheckTrialAvailabilityWithSku(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .locations() - .checkTrialAvailabilityWithResponse( - "eastus", new Sku().withName("avs52t"), com.azure.core.util.Context.NONE); - } } ``` ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Operations_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Operations_List.json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to AvsManager. */ public static void operationsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -956,37 +1013,30 @@ import com.azure.resourcemanager.avs.models.AzureHybridBenefitType; import com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties; import java.util.Arrays; -/** Samples for PlacementPolicies CreateOrUpdate. */ +/** + * Samples for PlacementPolicies CreateOrUpdate. + */ public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PlacementPolicies_CreateOrUpdate.json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .placementPolicies() + 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)) + .withProperties(new VmHostPlacementPolicyProperties().withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityType(AffinityType.ANTI_AFFINITY) + .withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) .create(); } } @@ -995,14 +1045,16 @@ public final class PlacementPoliciesCreateOrUpdateSamples { ### PlacementPolicies_Delete ```java -/** Samples for PlacementPolicies Delete. */ +/** + * Samples for PlacementPolicies Delete. + */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1014,19 +1066,20 @@ public final class PlacementPoliciesDeleteSamples { ### PlacementPolicies_Get ```java -/** Samples for PlacementPolicies Get. */ +/** + * Samples for PlacementPolicies Get. + */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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() + manager.placementPolicies() .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE); } } @@ -1035,14 +1088,16 @@ public final class PlacementPoliciesGetSamples { ### PlacementPolicies_List ```java -/** Samples for PlacementPolicies List. */ +/** + * Samples for PlacementPolicies List. + */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1060,36 +1115,29 @@ import com.azure.resourcemanager.avs.models.PlacementPolicy; import com.azure.resourcemanager.avs.models.PlacementPolicyState; import java.util.Arrays; -/** Samples for PlacementPolicies Update. */ +/** + * Samples for PlacementPolicies Update. + */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Update.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PlacementPolicy resource = - manager - .placementPolicies() - .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + 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")) + .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(); @@ -1100,8 +1148,6 @@ public final class PlacementPoliciesUpdateSamples { ### PrivateClouds_CreateOrUpdate ```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; @@ -1109,53 +1155,28 @@ import com.azure.resourcemanager.avs.models.Sku; import java.util.HashMap; import java.util.Map; -/** Samples for PrivateClouds CreateOrUpdate. */ +/** + * Samples for PrivateClouds CreateOrUpdate. + */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .privateClouds() + manager.privateClouds() .define("cloud1") .withRegion("eastus2") .withExistingResourceGroup("group1") .withSku(new Sku().withName("AV36")) .withTags(mapOf()) .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withNetworkBlock("192.168.48.0/22") .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .create(); - } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json - */ - /** - * Sample code: PrivateClouds_CreateOrUpdate_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsCreateOrUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .privateClouds() - .define("cloud1") - .withRegion("eastus2") - .withExistingResourceGroup("group1") - .withSku(new Sku().withName("AV36")) - .withTags(mapOf()) .withNetworkBlock("192.168.48.0/22") - .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withAvailability( - new AvailabilityProperties() - .withStrategy(AvailabilityStrategy.DUAL_ZONE) - .withZone(1) - .withSecondaryZone(2)) .create(); } @@ -1176,14 +1197,16 @@ public final class PrivateCloudsCreateOrUpdateSamples { ### PrivateClouds_Delete ```java -/** Samples for PrivateClouds Delete. */ +/** + * Samples for PrivateClouds Delete. + */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1195,76 +1218,59 @@ public final class PrivateCloudsDeleteSamples { ### PrivateClouds_GetByResourceGroup ```java -/** Samples for PrivateClouds GetByResourceGroup. */ +/** + * Samples for PrivateClouds GetByResourceGroup. + */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. - * + * * @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); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get_Stretched.json - */ - /** - * Sample code: PrivateClouds_Get_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsGetStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); - } } ``` ### PrivateClouds_List ```java -/** Samples for PrivateClouds List. */ +/** + * Samples for PrivateClouds List. + */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_ListInSubscription.json */ /** * Sample code: PrivateClouds_ListInSubscription. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { manager.privateClouds().list(com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription_Stretched.json - */ - /** - * Sample code: PrivateClouds_ListInSubscription_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsListInSubscriptionStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().list(com.azure.core.util.Context.NONE); - } } ``` ### PrivateClouds_ListAdminCredentials ```java -/** Samples for PrivateClouds ListAdminCredentials. */ +/** + * Samples for PrivateClouds ListAdminCredentials. + */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_ListAdminCredentials.json */ /** * Sample code: PrivateClouds_ListAdminCredentials. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListAdminCredentials(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1276,45 +1282,37 @@ public final class PrivateCloudsListAdminCredentialsSamples { ### PrivateClouds_ListByResourceGroup ```java -/** Samples for PrivateClouds ListByResourceGroup. */ +/** + * Samples for PrivateClouds ListByResourceGroup. + */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List_Stretched.json - */ - /** - * Sample code: PrivateClouds_List_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsListStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); - } } ``` ### PrivateClouds_RotateNsxtPassword ```java -/** Samples for PrivateClouds RotateNsxtPassword. */ +/** + * Samples for PrivateClouds RotateNsxtPassword. + */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_RotateNsxtPassword.json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsRotateNsxtPassword(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1326,14 +1324,17 @@ public final class PrivateCloudsRotateNsxtPasswordSamples { ### PrivateClouds_RotateVcenterPassword ```java -/** Samples for PrivateClouds RotateVcenterPassword. */ +/** + * Samples for PrivateClouds RotateVcenterPassword. + */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsRotateVcenterPassword(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1353,74 +1354,53 @@ 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 PrivateClouds Update. + */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = - manager - .privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + 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"))) + .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) + .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") + .withKeyVersion("fakeTokenPlaceholder") + .withKeyVaultUrl("fakeTokenPlaceholder"))) .apply(); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update_Stretched.json - */ - /** - * Sample code: PrivateClouds_Update_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = - manager - .privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withManagementCluster(new ManagementCluster().withClusterSize(4)).apply(); - } } ``` ### ScriptCmdlets_Get ```java -/** Samples for ScriptCmdlets Get. */ +/** + * Samples for ScriptCmdlets Get. + */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptCmdletsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptCmdlets() - .getWithResponse( - "group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", com.azure.core.util.Context.NONE); + manager.scriptCmdlets() + .getWithResponse("group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", + com.azure.core.util.Context.NONE); } } ``` @@ -1428,14 +1408,16 @@ public final class ScriptCmdletsGetSamples { ### ScriptCmdlets_List ```java -/** Samples for ScriptCmdlets List. */ +/** + * Samples for ScriptCmdlets List. + */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptCmdletsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1451,38 +1433,30 @@ import com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter import com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter; import java.util.Arrays; -/** Samples for ScriptExecutions CreateOrUpdate. */ +/** + * Samples for ScriptExecutions CreateOrUpdate. + */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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() + 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"))) + .withParameters(Arrays.asList( + new ScriptStringExecutionParameter().withName("DomainName").withValue("placeholderDomain.local"), + new ScriptStringExecutionParameter().withName("BaseUserDN") + .withValue("DC=placeholder, DC=placeholder"))) + .withHiddenParameters(Arrays.asList( + new ScriptSecureStringExecutionParameter().withName("Password").withSecureValue("PlaceholderPassword"))) .withTimeout("P0Y0M0DT0H60M60S") .withRetention("P0Y0M60DT0H60M60S") .create(); @@ -1493,14 +1467,16 @@ public final class ScriptExecutionsCreateOrUpdateSamples { ### ScriptExecutions_Delete ```java -/** Samples for ScriptExecutions Delete. */ +/** + * Samples for ScriptExecutions Delete. + */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1512,19 +1488,20 @@ public final class ScriptExecutionsDeleteSamples { ### ScriptExecutions_Get ```java -/** Samples for ScriptExecutions Get. */ +/** + * Samples for ScriptExecutions Get. + */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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() + manager.scriptExecutions() .getWithResponse("group1", "cloud1", "addSsoServer", com.azure.core.util.Context.NONE); } } @@ -1536,29 +1513,23 @@ public final class ScriptExecutionsGetSamples { import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; import java.util.Arrays; -/** Samples for ScriptExecutions GetExecutionLogs. */ +/** + * Samples for ScriptExecutions GetExecutionLogs. + */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptExecutions_GetExecutionLogs.json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsGetExecutionLogs(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptExecutions() - .getExecutionLogsWithResponse( - "group1", - "cloud1", - "addSsoServer", - Arrays - .asList( - ScriptOutputStreamType.INFORMATION, - ScriptOutputStreamType.fromString("Warnings"), - ScriptOutputStreamType.fromString("Errors"), - ScriptOutputStreamType.OUTPUT), + manager.scriptExecutions() + .getExecutionLogsWithResponse("group1", "cloud1", "addSsoServer", + Arrays.asList(ScriptOutputStreamType.INFORMATION, ScriptOutputStreamType.fromString("Warnings"), + ScriptOutputStreamType.fromString("Errors"), ScriptOutputStreamType.OUTPUT), com.azure.core.util.Context.NONE); } } @@ -1567,14 +1538,16 @@ public final class ScriptExecutionsGetExecutionLogsSamples { ### ScriptExecutions_List ```java -/** Samples for ScriptExecutions List. */ +/** + * Samples for ScriptExecutions List. + */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1586,19 +1559,20 @@ public final class ScriptExecutionsListSamples { ### ScriptPackages_Get ```java -/** Samples for ScriptPackages Get. */ +/** + * Samples for ScriptPackages Get. + */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptPackagesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptPackages() + manager.scriptPackages() .getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", com.azure.core.util.Context.NONE); } } @@ -1607,14 +1581,16 @@ public final class ScriptPackagesGetSamples { ### ScriptPackages_List ```java -/** Samples for ScriptPackages List. */ +/** + * Samples for ScriptPackages List. + */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptPackagesList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1626,19 +1602,20 @@ public final class ScriptPackagesListSamples { ### VirtualMachines_Get ```java -/** Samples for VirtualMachines Get. */ +/** + * Samples for VirtualMachines Get. + */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/VirtualMachines_Get.json */ /** - * Sample code: GetVirtualMachine. - * + * Sample code: VirtualMachines_Get. + * * @param manager Entry point to AvsManager. */ - public static void getVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .virtualMachines() + public static void virtualMachinesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.virtualMachines() .getWithResponse("group1", "cloud1", "cluster1", "vm-209", com.azure.core.util.Context.NONE); } } @@ -1647,17 +1624,19 @@ public final class VirtualMachinesGetSamples { ### VirtualMachines_List ```java -/** Samples for VirtualMachines List. */ +/** + * Samples for VirtualMachines List. + */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/VirtualMachines_List.json */ /** - * Sample code: ListClusterVirtualMachines. - * + * Sample code: VirtualMachines_List. + * * @param manager Entry point to AvsManager. */ - public static void listClusterVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { + public static void virtualMachinesList(com.azure.resourcemanager.avs.AvsManager manager) { manager.virtualMachines().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } @@ -1669,969 +1648,1000 @@ public final class VirtualMachinesListSamples { import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; -/** Samples for VirtualMachines RestrictMovement. */ +/** + * Samples for VirtualMachines RestrictMovement. + */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_RestrictMovement.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/VirtualMachines_RestrictMovement.json */ /** - * Sample code: VirtualMachine_RestrictMovement. - * + * Sample code: VirtualMachines_RestrictMovement. + * * @param manager Entry point to AvsManager. */ - public static void virtualMachineRestrictMovement(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .virtualMachines() - .restrictMovement( - "group1", - "cloud1", - "cluster1", - "vm-209", + 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); } } ``` -### WorkloadNetworks_CreateDhcp +### WorkloadNetworkDhcpConfigurations_Create ```java import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; -/** Samples for WorkloadNetworks CreateDhcp. */ -public final class WorkloadNetworksCreateDhcpSamples { +/** + * Samples for WorkloadNetworkDhcpConfigurations Create. + */ +public final class WorkloadNetworkDhcpConfigurationsCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDhcpConfigurations.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateDhcp.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDhcp("dhcp1") + manager.workloadNetworkDhcpConfigurations() + .define("dhcp1") .withExistingPrivateCloud("group1", "cloud1") - .withProperties( - new WorkloadNetworkDhcpServer() - .withDisplayName("dhcpConfigurations1") - .withRevision(1L) - .withServerAddress("40.1.5.1/24") - .withLeaseTime(86400L)) + .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") + .withRevision(1L) + .withServerAddress("40.1.5.1/24") + .withLeaseTime(86400)) .create(); } } ``` -### WorkloadNetworks_CreateDnsService +### WorkloadNetworkDhcpConfigurations_Delete ```java -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import java.util.Arrays; - -/** Samples for WorkloadNetworks CreateDnsService. */ -public final class WorkloadNetworksCreateDnsServiceSamples { +/** + * Samples for WorkloadNetworkDhcpConfigurations Delete. + */ +public final class WorkloadNetworkDhcpConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsServices.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteDhcp.json */ /** - * Sample code: WorkloadNetworks_CreateDnsService. - * + * Sample code: WorkloadNetworks_DeleteDhcp. + * * @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 workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDhcpConfigurations() + .delete("group1", "cloud1", "dhcp1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_CreateDnsZone +### WorkloadNetworkDhcpConfigurations_Get ```java -import java.util.Arrays; - -/** Samples for WorkloadNetworks CreateDnsZone. */ -public final class WorkloadNetworksCreateDnsZoneSamples { +/** + * Samples for WorkloadNetworkDhcpConfigurations Get. + */ +public final class WorkloadNetworkDhcpConfigurationsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsZones.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetDhcp.json */ /** - * Sample code: WorkloadNetworks_CreateDnsZone. - * + * Sample code: WorkloadNetworks_GetDhcp. + * * @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 workloadNetworksGetDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDhcpConfigurations() + .getWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_CreatePortMirroring +### WorkloadNetworkDhcpConfigurations_ListByWorkloadNetwork ```java -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; - -/** Samples for WorkloadNetworks CreatePortMirroring. */ -public final class WorkloadNetworksCreatePortMirroringSamples { +/** + * Samples for WorkloadNetworkDhcpConfigurations ListByWorkloadNetwork. + */ +public final class WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListDhcp.json */ /** - * Sample code: WorkloadNetworks_CreatePortMirroring. - * + * Sample code: WorkloadNetworks_ListDhcp. + * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .definePortMirroring("portMirroring1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("portMirroring1") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("vmGroup1") - .withDestination("vmGroup2") - .withRevision(1L) - .create(); + public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDhcpConfigurations() + .listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_CreatePublicIp +### WorkloadNetworkDhcpConfigurations_Update ```java -/** Samples for WorkloadNetworks CreatePublicIp. */ -public final class WorkloadNetworksCreatePublicIpSamples { +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; + +/** + * Samples for WorkloadNetworkDhcpConfigurations Update. + */ +public final class WorkloadNetworkDhcpConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePublicIPs.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdateDhcp.json */ /** - * Sample code: WorkloadNetworks_CreatePublicIP. - * + * Sample code: WorkloadNetworks_UpdateDhcp. + * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .definePublicIp("publicIP1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("publicIP1") - .withNumberOfPublicIPs(32L) - .create(); + public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkDhcp resource = manager.workloadNetworkDhcpConfigurations() + .getWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400)) + .apply(); } } ``` -### WorkloadNetworks_CreateSegments +### WorkloadNetworkDnsServices_Create ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; +import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import java.util.Arrays; -/** Samples for WorkloadNetworks CreateSegments. */ -public final class WorkloadNetworksCreateSegmentsSamples { +/** + * Samples for WorkloadNetworkDnsServices Create. + */ +public final class WorkloadNetworkDnsServicesCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateDnsService.json */ /** - * Sample code: WorkloadNetworks_CreateSegments. - * + * Sample code: WorkloadNetworks_CreateDnsService. + * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineSegments("segment1") + public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsServices() + .define("dnsService1") .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")) + .withDisplayName("dnsService1") + .withDnsServiceIp("5.5.5.5") + .withDefaultDnsZone("defaultDnsZone1") + .withFqdnZones(Arrays.asList("fqdnZone1")) + .withLogLevel(DnsServiceLogLevelEnum.INFO) .withRevision(1L) .create(); } } ``` -### WorkloadNetworks_CreateVMGroup +### WorkloadNetworkDnsServices_Delete ```java -import java.util.Arrays; - -/** Samples for WorkloadNetworks CreateVMGroup. */ -public final class WorkloadNetworksCreateVMGroupSamples { +/** + * Samples for WorkloadNetworkDnsServices Delete. + */ +public final class WorkloadNetworkDnsServicesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateVMGroups.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteDnsService.json */ /** - * Sample code: WorkloadNetworks_CreateVMGroup. - * + * Sample code: WorkloadNetworks_DeleteDnsService. + * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineVMGroup("vmGroup1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("vmGroup1") - .withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")) - .withRevision(1L) - .create(); + public static void workloadNetworksDeleteDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsServices() + .delete("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeleteDhcp +### WorkloadNetworkDnsServices_Get ```java -/** Samples for WorkloadNetworks DeleteDhcp. */ -public final class WorkloadNetworksDeleteDhcpSamples { +/** + * Samples for WorkloadNetworkDnsServices Get. + */ +public final class WorkloadNetworkDnsServicesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDhcpConfigurations.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetDnsService.json */ /** - * Sample code: WorkloadNetworks_DeleteDhcp. - * + * Sample code: WorkloadNetworks_GetDnsService. + * * @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 workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsServices() + .getWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeleteDnsService +### WorkloadNetworkDnsServices_ListByWorkloadNetwork ```java -/** Samples for WorkloadNetworks DeleteDnsService. */ -public final class WorkloadNetworksDeleteDnsServiceSamples { +/** + * Samples for WorkloadNetworkDnsServices ListByWorkloadNetwork. + */ +public final class WorkloadNetworkDnsServicesListByWorkloadNetworkSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsServices.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListDnsServices.json */ /** - * Sample code: WorkloadNetworks_DeleteDnsService. - * + * Sample code: WorkloadNetworks_ListDnsServices. + * * @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 workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsServices() + .listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeleteDnsZone +### WorkloadNetworkDnsServices_Update ```java -/** Samples for WorkloadNetworks DeleteDnsZone. */ -public final class WorkloadNetworksDeleteDnsZoneSamples { +import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; +import java.util.Arrays; + +/** + * Samples for WorkloadNetworkDnsServices Update. + */ +public final class WorkloadNetworkDnsServicesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsZones.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdateDnsService.json */ /** - * Sample code: WorkloadNetworks_DeleteDnsZone. - * + * Sample code: WorkloadNetworks_UpdateDnsService. + * * @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 workloadNetworksUpdateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkDnsService resource = manager.workloadNetworkDnsServices() + .getWithResponse("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(); } } ``` -### WorkloadNetworks_DeletePortMirroring +### WorkloadNetworkDnsZones_Create ```java -/** Samples for WorkloadNetworks DeletePortMirroring. */ -public final class WorkloadNetworksDeletePortMirroringSamples { +import java.util.Arrays; + +/** + * Samples for WorkloadNetworkDnsZones Create. + */ +public final class WorkloadNetworkDnsZonesCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateDnsZone.json */ /** - * Sample code: WorkloadNetworks_DeletePortMirroring. - * + * Sample code: WorkloadNetworks_CreateDnsZone. + * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .deletePortMirroring("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); + public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsZones() + .define("dnsZone1") + .withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("dnsZone1") + .withDomain(Arrays.asList()) + .withDnsServerIps(Arrays.asList("1.1.1.1")) + .withSourceIp("8.8.8.8") + .withRevision(1L) + .create(); } } ``` -### WorkloadNetworks_DeletePublicIp +### WorkloadNetworkDnsZones_Delete ```java -/** Samples for WorkloadNetworks DeletePublicIp. */ -public final class WorkloadNetworksDeletePublicIpSamples { +/** + * Samples for WorkloadNetworkDnsZones Delete. + */ +public final class WorkloadNetworkDnsZonesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePublicIPs.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteDnsZone.json */ /** - * Sample code: WorkloadNetworks_DeletePublicIP. - * + * Sample code: WorkloadNetworks_DeleteDnsZone. + * * @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 workloadNetworksDeleteDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsZones().delete("group1", "dnsZone1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeleteSegment +### WorkloadNetworkDnsZones_Get ```java -/** Samples for WorkloadNetworks DeleteSegment. */ -public final class WorkloadNetworksDeleteSegmentSamples { +/** + * Samples for WorkloadNetworkDnsZones Get. + */ +public final class WorkloadNetworkDnsZonesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteSegments.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetDnsZone.json */ /** - * Sample code: WorkloadNetworks_DeleteSegment. - * + * Sample code: WorkloadNetworks_GetDnsZone. + * * @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 workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsZones() + .getWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeleteVMGroup +### WorkloadNetworkDnsZones_ListByWorkloadNetwork ```java -/** Samples for WorkloadNetworks DeleteVMGroup. */ -public final class WorkloadNetworksDeleteVMGroupSamples { +/** + * Samples for WorkloadNetworkDnsZones ListByWorkloadNetwork. + */ +public final class WorkloadNetworkDnsZonesListByWorkloadNetworkSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteVMGroups.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListDnsZones.json */ /** - * Sample code: WorkloadNetworks_DeleteVMGroup. - * + * Sample code: WorkloadNetworks_ListDnsZones. + * * @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 workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsZones().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_Get +### WorkloadNetworkDnsZones_Update ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; +import java.util.Arrays; -/** Samples for WorkloadNetworks Get. */ -public final class WorkloadNetworksGetSamples { +/** + * Samples for WorkloadNetworkDnsZones Update. + */ +public final class WorkloadNetworkDnsZonesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdateDnsZone.json */ /** - * Sample code: WorkloadNetworks_Get. - * + * Sample code: WorkloadNetworks_UpdateDnsZone. + * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getWithResponse("group1", "cloud1", WorkloadNetworkName.DEFAULT, com.azure.core.util.Context.NONE); + public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkDnsZone resource = manager.workloadNetworkDnsZones() + .getWithResponse("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(); } } ``` -### WorkloadNetworks_GetDhcp +### WorkloadNetworkGateways_Get ```java -/** Samples for WorkloadNetworks GetDhcp. */ -public final class WorkloadNetworksGetDhcpSamples { +/** + * Samples for WorkloadNetworkGateways Get. + */ +public final class WorkloadNetworkGatewaysGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDhcpConfigurations.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetGateway.json */ /** - * Sample code: WorkloadNetworks_GetDhcp. - * + * Sample code: WorkloadNetworks_GetGateway. + * * @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 workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkGateways() + .getWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_GetDnsService +### WorkloadNetworkGateways_ListByWorkloadNetwork ```java -/** Samples for WorkloadNetworks GetDnsService. */ -public final class WorkloadNetworksGetDnsServiceSamples { +/** + * Samples for WorkloadNetworkGateways ListByWorkloadNetwork. + */ +public final class WorkloadNetworkGatewaysListByWorkloadNetworkSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsServices.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListGateways.json */ /** - * Sample code: WorkloadNetworks_GetDnsService. - * + * Sample code: WorkloadNetworks_ListGateways. + * * @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 workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkGateways().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_GetDnsZone +### WorkloadNetworkPortMirroringProfiles_Create ```java -/** Samples for WorkloadNetworks GetDnsZone. */ -public final class WorkloadNetworksGetDnsZoneSamples { +import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; + +/** + * Samples for WorkloadNetworkPortMirroringProfiles Create. + */ +public final class WorkloadNetworkPortMirroringProfilesCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsZones.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreatePortMirroring.json */ /** - * Sample code: WorkloadNetworks_GetDnsZone. - * + * Sample code: WorkloadNetworks_CreatePortMirroring. + * * @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 workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPortMirroringProfiles() + .define("portMirroring1") + .withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("portMirroring1") + .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) + .withSource("vmGroup1") + .withDestination("vmGroup2") + .withRevision(1L) + .create(); } } ``` -### WorkloadNetworks_GetGateway +### WorkloadNetworkPortMirroringProfiles_Delete ```java -/** Samples for WorkloadNetworks GetGateway. */ -public final class WorkloadNetworksGetGatewaySamples { +/** + * Samples for WorkloadNetworkPortMirroringProfiles Delete. + */ +public final class WorkloadNetworkPortMirroringProfilesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetGateway.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeletePortMirroring.json */ /** - * Sample code: WorkloadNetworks_GetGateway. - * + * Sample code: WorkloadNetworks_DeletePortMirroring. + * * @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 workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPortMirroringProfiles() + .delete("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_GetPortMirroring +### WorkloadNetworkPortMirroringProfiles_Get ```java -/** Samples for WorkloadNetworks GetPortMirroring. */ -public final class WorkloadNetworksGetPortMirroringSamples { +/** + * Samples for WorkloadNetworkPortMirroringProfiles Get. + */ +public final class WorkloadNetworkPortMirroringProfilesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPortMirroringProfiles.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetPortMirroring.json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); + manager.workloadNetworkPortMirroringProfiles() + .getWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_GetPublicIp +### WorkloadNetworkPortMirroringProfiles_ListByWorkloadNetwork ```java -/** Samples for WorkloadNetworks GetPublicIp. */ -public final class WorkloadNetworksGetPublicIpSamples { +/** + * Samples for WorkloadNetworkPortMirroringProfiles ListByWorkloadNetwork. + */ +public final class WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPublicIPs.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListPortMirroring.json */ /** - * Sample code: WorkloadNetworks_GetPublicIP. - * + * Sample code: WorkloadNetworks_ListPortMirroring. + * * @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 workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPortMirroringProfiles() + .listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_GetSegment +### WorkloadNetworkPortMirroringProfiles_Update ```java -/** Samples for WorkloadNetworks GetSegment. */ -public final class WorkloadNetworksGetSegmentSamples { +import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; + +/** + * Samples for WorkloadNetworkPortMirroringProfiles Update. + */ +public final class WorkloadNetworkPortMirroringProfilesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetSegments.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdatePortMirroring.json */ /** - * Sample code: WorkloadNetworks_GetSegment. - * + * Sample code: WorkloadNetworks_UpdatePortMirroring. + * * @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 workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkPortMirroring resource = manager.workloadNetworkPortMirroringProfiles() + .getWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) + .withSource("vmGroup1") + .withDestination("vmGroup2") + .withRevision(1L) + .apply(); } } ``` -### WorkloadNetworks_GetVMGroup +### WorkloadNetworkPublicIps_Create ```java -/** Samples for WorkloadNetworks GetVMGroup. */ -public final class WorkloadNetworksGetVMGroupSamples { +/** + * Samples for WorkloadNetworkPublicIps Create. + */ +public final class WorkloadNetworkPublicIpsCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVMGroups.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreatePublicIP.json */ /** - * Sample code: WorkloadNetworks_GetVMGroup. - * + * Sample code: WorkloadNetworks_CreatePublicIP. + * * @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 workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPublicIps() + .define("publicIP1") + .withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("publicIP1") + .withNumberOfPublicIPs(32L) + .create(); } } ``` -### WorkloadNetworks_GetVirtualMachine +### WorkloadNetworkPublicIps_Delete ```java -/** Samples for WorkloadNetworks GetVirtualMachine. */ -public final class WorkloadNetworksGetVirtualMachineSamples { +/** + * Samples for WorkloadNetworkPublicIps Delete. + */ +public final class WorkloadNetworkPublicIpsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeletePublicIP.json */ /** - * Sample code: WorkloadNetworks_GetVirtualMachine. - * + * Sample code: WorkloadNetworks_DeletePublicIP. + * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getVirtualMachineWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); + public static void workloadNetworksDeletePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPublicIps().delete("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_List +### WorkloadNetworkPublicIps_Get ```java -/** Samples for WorkloadNetworks List. */ -public final class WorkloadNetworksListSamples { +/** + * Samples for WorkloadNetworkPublicIps Get. + */ +public final class WorkloadNetworkPublicIpsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetPublicIP.json */ /** - * Sample code: WorkloadNetworks_List. - * + * Sample code: WorkloadNetworks_GetPublicIP. + * * @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 workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPublicIps() + .getWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListDhcp +### WorkloadNetworkPublicIps_ListByWorkloadNetwork ```java -/** Samples for WorkloadNetworks ListDhcp. */ -public final class WorkloadNetworksListDhcpSamples { +/** + * Samples for WorkloadNetworkPublicIps ListByWorkloadNetwork. + */ +public final class WorkloadNetworkPublicIpsListByWorkloadNetworkSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDhcpConfigurations.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListPublicIPs.json */ /** - * Sample code: WorkloadNetworks_ListDhcp. - * + * Sample code: WorkloadNetworks_ListPublicIPs. + * * @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 workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPublicIps().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListDnsServices +### WorkloadNetworkSegments_Create ```java -/** Samples for WorkloadNetworks ListDnsServices. */ -public final class WorkloadNetworksListDnsServicesSamples { +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; +import java.util.Arrays; + +/** + * Samples for WorkloadNetworkSegments Create. + */ +public final class WorkloadNetworkSegmentsCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateSegments.json */ /** - * Sample code: WorkloadNetworks_ListDnsServices. - * + * Sample code: WorkloadNetworks_CreateSegments. + * * @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 workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkSegments() + .define("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(); } } ``` -### WorkloadNetworks_ListDnsZones +### WorkloadNetworkSegments_DeleteSegment ```java -/** Samples for WorkloadNetworks ListDnsZones. */ -public final class WorkloadNetworksListDnsZonesSamples { +/** + * Samples for WorkloadNetworkSegments DeleteSegment. + */ +public final class WorkloadNetworkSegmentsDeleteSegmentSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteSegment.json */ /** - * Sample code: WorkloadNetworks_ListDnsZones. - * + * Sample code: WorkloadNetworks_DeleteSegment. + * * @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 workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkSegments() + .deleteSegment("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListGateways +### WorkloadNetworkSegments_Get ```java -/** Samples for WorkloadNetworks ListGateways. */ -public final class WorkloadNetworksListGatewaysSamples { +/** + * Samples for WorkloadNetworkSegments Get. + */ +public final class WorkloadNetworkSegmentsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListGateways.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetSegment.json */ /** - * Sample code: WorkloadNetworks_ListGateways. - * + * Sample code: WorkloadNetworks_GetSegment. + * * @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 workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkSegments() + .getWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListPortMirroring +### WorkloadNetworkSegments_ListByWorkloadNetwork ```java -/** Samples for WorkloadNetworks ListPortMirroring. */ -public final class WorkloadNetworksListPortMirroringSamples { +/** + * Samples for WorkloadNetworkSegments ListByWorkloadNetwork. + */ +public final class WorkloadNetworkSegmentsListByWorkloadNetworkSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListPortMirroringProfiles.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListSegments.json */ /** - * Sample code: WorkloadNetworks_ListPortMirroring. - * + * Sample code: WorkloadNetworks_ListSegments. + * * @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 workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkSegments().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListPublicIPs +### WorkloadNetworkSegments_Update ```java -/** Samples for WorkloadNetworks ListPublicIPs. */ -public final class WorkloadNetworksListPublicIPsSamples { +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; + +/** + * Samples for WorkloadNetworkSegments Update. + */ +public final class WorkloadNetworkSegmentsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdateSegments.json */ /** - * Sample code: WorkloadNetworks_ListPublicIPs. - * + * Sample code: WorkloadNetworks_UpdateSegments. + * * @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 workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkSegment resource = manager.workloadNetworkSegments() + .getWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); } } ``` -### WorkloadNetworks_ListSegments +### WorkloadNetworkVirtualMachines_Get ```java -/** Samples for WorkloadNetworks ListSegments. */ -public final class WorkloadNetworksListSegmentsSamples { +/** + * Samples for WorkloadNetworkVirtualMachines Get. + */ +public final class WorkloadNetworkVirtualMachinesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListSegments.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetVirtualMachine.json */ /** - * Sample code: WorkloadNetworks_ListSegments. - * + * Sample code: WorkloadNetworks_GetVirtualMachine. + * * @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 workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVirtualMachines() + .getWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListVMGroups +### WorkloadNetworkVirtualMachines_ListByWorkloadNetwork ```java -/** Samples for WorkloadNetworks ListVMGroups. */ -public final class WorkloadNetworksListVMGroupsSamples { +/** + * Samples for WorkloadNetworkVirtualMachines ListByWorkloadNetwork. + */ +public final class WorkloadNetworkVirtualMachinesListByWorkloadNetworkSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListVirtualMachines.json */ /** - * Sample code: WorkloadNetworks_ListVMGroups. - * + * Sample code: WorkloadNetworks_ListVirtualMachines. + * * @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 workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVirtualMachines() + .listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListVirtualMachines +### WorkloadNetworkVmGroups_Create ```java -/** Samples for WorkloadNetworks ListVirtualMachines. */ -public final class WorkloadNetworksListVirtualMachinesSamples { +/** + * Samples for WorkloadNetworkVmGroups Create. + */ +public final class WorkloadNetworkVmGroupsCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateVMGroup.json */ /** - * Sample code: WorkloadNetworks_ListVirtualMachines. - * + * Sample code: WorkloadNetworks_CreateVMGroup. + * * @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 workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVmGroups().define("vmGroup1").withExistingPrivateCloud("group1", "cloud1").create(); } } ``` -### WorkloadNetworks_UpdateDhcp +### WorkloadNetworkVmGroups_Delete ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; - -/** Samples for WorkloadNetworks UpdateDhcp. */ -public final class WorkloadNetworksUpdateDhcpSamples { +/** + * Samples for WorkloadNetworkVmGroups Delete. + */ +public final class WorkloadNetworkVmGroupsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDhcpConfigurations.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteVMGroup.json */ /** - * Sample code: WorkloadNetworks_UpdateDhcp. - * + * Sample code: WorkloadNetworks_DeleteVMGroup. + * * @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 workloadNetworksDeleteVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVmGroups().delete("group1", "vmGroup1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_UpdateDnsService +### WorkloadNetworkVmGroups_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 { +/** + * Samples for WorkloadNetworkVmGroups Get. + */ +public final class WorkloadNetworkVmGroupsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsServices.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetVMGroup.json */ /** - * Sample code: WorkloadNetworks_UpdateDnsService. - * + * Sample code: WorkloadNetworks_GetVMGroup. + * * @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 workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVmGroups() + .getWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_UpdateDnsZone +### WorkloadNetworkVmGroups_ListByWorkloadNetwork ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.util.Arrays; - -/** Samples for WorkloadNetworks UpdateDnsZone. */ -public final class WorkloadNetworksUpdateDnsZoneSamples { +/** + * Samples for WorkloadNetworkVmGroups ListByWorkloadNetwork. + */ +public final class WorkloadNetworkVmGroupsListByWorkloadNetworkSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsZones.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListVMGroups.json */ /** - * Sample code: WorkloadNetworks_UpdateDnsZone. - * + * Sample code: WorkloadNetworks_ListVMGroups. + * * @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 workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVmGroups().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_UpdatePortMirroring +### WorkloadNetworkVmGroups_Update ```java -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; +import java.util.Arrays; -/** Samples for WorkloadNetworks UpdatePortMirroring. */ -public final class WorkloadNetworksUpdatePortMirroringSamples { +/** + * Samples for WorkloadNetworkVmGroups Update. + */ +public final class WorkloadNetworkVmGroupsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdateVMGroup.json */ /** - * Sample code: WorkloadNetworks_UpdatePortMirroring. - * + * Sample code: WorkloadNetworks_UpdateVMGroup. + * * @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 workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkVMGroup resource = manager.workloadNetworkVmGroups() + .getWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } } ``` -### WorkloadNetworks_UpdateSegments +### WorkloadNetworks_Get ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.util.Arrays; - -/** Samples for WorkloadNetworks UpdateSegments. */ -public final class WorkloadNetworksUpdateSegmentsSamples { +/** + * Samples for WorkloadNetworks Get. + */ +public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_Get.json */ /** - * Sample code: WorkloadNetworks_UpdateSegments. - * + * Sample code: WorkloadNetworks_Get. + * * @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 workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_UpdateVMGroup +### WorkloadNetworks_ListByPrivateCloud ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.util.Arrays; - -/** Samples for WorkloadNetworks UpdateVMGroup. */ -public final class WorkloadNetworksUpdateVMGroupSamples { +/** + * Samples for WorkloadNetworks ListByPrivateCloud. + */ +public final class WorkloadNetworksListByPrivateCloudSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateVMGroups.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_List.json */ /** - * Sample code: WorkloadNetworks_UpdateVMGroup. - * + * Sample code: WorkloadNetworks_List. + * * @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 workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listByPrivateCloud("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 fc4ac12b7cff2..88a754f47d557 100644 --- a/sdk/avs/azure-resourcemanager-avs/pom.xml +++ b/sdk/avs/azure-resourcemanager-avs/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-avs - 1.2.0-beta.1 + 1.2.0 jar Microsoft Azure SDK for Avs Management - This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package tag package-2023-03-01. + This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. https://github.com/Azure/azure-sdk-for-java @@ -61,7 +61,7 @@ com.azure azure-core-test - 1.26.0-beta.1 + 1.25.0 test @@ -82,14 +82,18 @@ 5.9.3 test + + org.slf4j + slf4j-simple + 1.7.36 + test + org.mockito mockito-core 4.11.0 test - - net.bytebuddy byte-buddy @@ -102,12 +106,6 @@ 1.14.12 test - - org.slf4j - slf4j-simple - 1.7.36 - test - com.azure.resourcemanager azure-resourcemanager-resources diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java index 2ddd22520551f..80e777bcadc1c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs; @@ -11,8 +11,8 @@ 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.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -23,15 +23,16 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.avs.fluent.AvsClient; +import com.azure.resourcemanager.avs.fluent.AVSClient; import com.azure.resourcemanager.avs.implementation.AddonsImpl; import com.azure.resourcemanager.avs.implementation.AuthorizationsImpl; -import com.azure.resourcemanager.avs.implementation.AvsClientBuilder; +import com.azure.resourcemanager.avs.implementation.AVSClientBuilder; import com.azure.resourcemanager.avs.implementation.CloudLinksImpl; import com.azure.resourcemanager.avs.implementation.ClustersImpl; import com.azure.resourcemanager.avs.implementation.DatastoresImpl; import com.azure.resourcemanager.avs.implementation.GlobalReachConnectionsImpl; import com.azure.resourcemanager.avs.implementation.HcxEnterpriseSitesImpl; +import com.azure.resourcemanager.avs.implementation.IscsiPathsImpl; import com.azure.resourcemanager.avs.implementation.LocationsImpl; import com.azure.resourcemanager.avs.implementation.OperationsImpl; import com.azure.resourcemanager.avs.implementation.PlacementPoliciesImpl; @@ -40,7 +41,16 @@ import com.azure.resourcemanager.avs.implementation.ScriptExecutionsImpl; import com.azure.resourcemanager.avs.implementation.ScriptPackagesImpl; import com.azure.resourcemanager.avs.implementation.VirtualMachinesImpl; +import com.azure.resourcemanager.avs.implementation.WorkloadNetworkDhcpConfigurationsImpl; +import com.azure.resourcemanager.avs.implementation.WorkloadNetworkDnsServicesImpl; +import com.azure.resourcemanager.avs.implementation.WorkloadNetworkDnsZonesImpl; +import com.azure.resourcemanager.avs.implementation.WorkloadNetworkGatewaysImpl; +import com.azure.resourcemanager.avs.implementation.WorkloadNetworkPortMirroringProfilesImpl; +import com.azure.resourcemanager.avs.implementation.WorkloadNetworkPublicIpsImpl; +import com.azure.resourcemanager.avs.implementation.WorkloadNetworkSegmentsImpl; import com.azure.resourcemanager.avs.implementation.WorkloadNetworksImpl; +import com.azure.resourcemanager.avs.implementation.WorkloadNetworkVirtualMachinesImpl; +import com.azure.resourcemanager.avs.implementation.WorkloadNetworkVmGroupsImpl; import com.azure.resourcemanager.avs.models.Addons; import com.azure.resourcemanager.avs.models.Authorizations; import com.azure.resourcemanager.avs.models.CloudLinks; @@ -48,6 +58,7 @@ import com.azure.resourcemanager.avs.models.Datastores; import com.azure.resourcemanager.avs.models.GlobalReachConnections; import com.azure.resourcemanager.avs.models.HcxEnterpriseSites; +import com.azure.resourcemanager.avs.models.IscsiPaths; import com.azure.resourcemanager.avs.models.Locations; import com.azure.resourcemanager.avs.models.Operations; import com.azure.resourcemanager.avs.models.PlacementPolicies; @@ -56,7 +67,16 @@ import com.azure.resourcemanager.avs.models.ScriptExecutions; import com.azure.resourcemanager.avs.models.ScriptPackages; import com.azure.resourcemanager.avs.models.VirtualMachines; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpConfigurations; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServices; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZones; +import com.azure.resourcemanager.avs.models.WorkloadNetworkGateways; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProfiles; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIps; import com.azure.resourcemanager.avs.models.WorkloadNetworks; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegments; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachines; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVmGroups; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -64,7 +84,10 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to AvsManager. Azure VMware Solution API. */ +/** + * Entry point to AvsManager. + * Azure VMware Solution API. + */ public final class AvsManager { private Operations operations; @@ -84,6 +107,24 @@ public final class AvsManager { private WorkloadNetworks workloadNetworks; + private WorkloadNetworkSegments workloadNetworkSegments; + + private WorkloadNetworkDhcpConfigurations workloadNetworkDhcpConfigurations; + + private WorkloadNetworkGateways workloadNetworkGateways; + + private WorkloadNetworkPortMirroringProfiles workloadNetworkPortMirroringProfiles; + + private WorkloadNetworkVmGroups workloadNetworkVmGroups; + + private WorkloadNetworkVirtualMachines workloadNetworkVirtualMachines; + + private WorkloadNetworkDnsServices workloadNetworkDnsServices; + + private WorkloadNetworkDnsZones workloadNetworkDnsZones; + + private WorkloadNetworkPublicIps workloadNetworkPublicIps; + private CloudLinks cloudLinks; private Addons addons; @@ -98,23 +139,23 @@ public final class AvsManager { private ScriptExecutions scriptExecutions; - private final AvsClient clientObject; + private IscsiPaths iscsiPaths; + + private final AVSClient clientObject; private AvsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new AvsClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new AVSClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); } /** * Creates an instance of Avs service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the Avs service API instance. @@ -127,7 +168,7 @@ public static AvsManager authenticate(TokenCredential credential, AzureProfile p /** * Creates an instance of Avs service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the Avs service API instance. @@ -140,14 +181,16 @@ public static AvsManager authenticate(HttpPipeline httpPipeline, AzureProfile pr /** * Gets a Configurable instance that can be used to create AvsManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new AvsManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -219,8 +262,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

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

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -237,8 +280,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -258,15 +301,13 @@ public AvsManager authenticate(TokenCredential credential, AzureProfile profile) Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") + userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.avs") .append("/") - .append("1.1.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") + userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ") .append(Configuration.getGlobalConfiguration().get("os.name")) @@ -291,38 +332,28 @@ public AvsManager authenticate(TokenCredential credential, AzureProfile profile) policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); return new AvsManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -334,7 +365,7 @@ public Operations operations() { /** * Gets the resource collection API of Locations. - * + * * @return Resource collection API of Locations. */ public Locations locations() { @@ -346,7 +377,7 @@ public Locations locations() { /** * Gets the resource collection API of PrivateClouds. It manages PrivateCloud. - * + * * @return Resource collection API of PrivateClouds. */ public PrivateClouds privateClouds() { @@ -358,7 +389,7 @@ public PrivateClouds privateClouds() { /** * Gets the resource collection API of Clusters. It manages Cluster. - * + * * @return Resource collection API of Clusters. */ public Clusters clusters() { @@ -370,7 +401,7 @@ public Clusters clusters() { /** * Gets the resource collection API of Datastores. It manages Datastore. - * + * * @return Resource collection API of Datastores. */ public Datastores datastores() { @@ -382,7 +413,7 @@ public Datastores datastores() { /** * Gets the resource collection API of HcxEnterpriseSites. It manages HcxEnterpriseSite. - * + * * @return Resource collection API of HcxEnterpriseSites. */ public HcxEnterpriseSites hcxEnterpriseSites() { @@ -394,7 +425,7 @@ public HcxEnterpriseSites hcxEnterpriseSites() { /** * Gets the resource collection API of Authorizations. It manages ExpressRouteAuthorization. - * + * * @return Resource collection API of Authorizations. */ public Authorizations authorizations() { @@ -406,22 +437,20 @@ public Authorizations authorizations() { /** * Gets the resource collection API of GlobalReachConnections. It manages GlobalReachConnection. - * + * * @return Resource collection API of GlobalReachConnections. */ public GlobalReachConnections globalReachConnections() { if (this.globalReachConnections == null) { - this.globalReachConnections = - new GlobalReachConnectionsImpl(clientObject.getGlobalReachConnections(), this); + this.globalReachConnections + = new GlobalReachConnectionsImpl(clientObject.getGlobalReachConnections(), this); } return globalReachConnections; } /** - * Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkSegment, WorkloadNetworkDhcp, - * WorkloadNetworkPortMirroring, WorkloadNetworkVMGroup, WorkloadNetworkDnsService, WorkloadNetworkDnsZone, - * WorkloadNetworkPublicIp. - * + * Gets the resource collection API of WorkloadNetworks. + * * @return Resource collection API of WorkloadNetworks. */ public WorkloadNetworks workloadNetworks() { @@ -431,9 +460,127 @@ public WorkloadNetworks workloadNetworks() { return workloadNetworks; } + /** + * Gets the resource collection API of WorkloadNetworkSegments. It manages WorkloadNetworkSegment. + * + * @return Resource collection API of WorkloadNetworkSegments. + */ + public WorkloadNetworkSegments workloadNetworkSegments() { + if (this.workloadNetworkSegments == null) { + this.workloadNetworkSegments + = new WorkloadNetworkSegmentsImpl(clientObject.getWorkloadNetworkSegments(), this); + } + return workloadNetworkSegments; + } + + /** + * Gets the resource collection API of WorkloadNetworkDhcpConfigurations. It manages WorkloadNetworkDhcp. + * + * @return Resource collection API of WorkloadNetworkDhcpConfigurations. + */ + public WorkloadNetworkDhcpConfigurations workloadNetworkDhcpConfigurations() { + if (this.workloadNetworkDhcpConfigurations == null) { + this.workloadNetworkDhcpConfigurations + = new WorkloadNetworkDhcpConfigurationsImpl(clientObject.getWorkloadNetworkDhcpConfigurations(), this); + } + return workloadNetworkDhcpConfigurations; + } + + /** + * Gets the resource collection API of WorkloadNetworkGateways. + * + * @return Resource collection API of WorkloadNetworkGateways. + */ + public WorkloadNetworkGateways workloadNetworkGateways() { + if (this.workloadNetworkGateways == null) { + this.workloadNetworkGateways + = new WorkloadNetworkGatewaysImpl(clientObject.getWorkloadNetworkGateways(), this); + } + return workloadNetworkGateways; + } + + /** + * Gets the resource collection API of WorkloadNetworkPortMirroringProfiles. It manages + * WorkloadNetworkPortMirroring. + * + * @return Resource collection API of WorkloadNetworkPortMirroringProfiles. + */ + public WorkloadNetworkPortMirroringProfiles workloadNetworkPortMirroringProfiles() { + if (this.workloadNetworkPortMirroringProfiles == null) { + this.workloadNetworkPortMirroringProfiles = new WorkloadNetworkPortMirroringProfilesImpl( + clientObject.getWorkloadNetworkPortMirroringProfiles(), this); + } + return workloadNetworkPortMirroringProfiles; + } + + /** + * Gets the resource collection API of WorkloadNetworkVmGroups. It manages WorkloadNetworkVMGroup. + * + * @return Resource collection API of WorkloadNetworkVmGroups. + */ + public WorkloadNetworkVmGroups workloadNetworkVmGroups() { + if (this.workloadNetworkVmGroups == null) { + this.workloadNetworkVmGroups + = new WorkloadNetworkVmGroupsImpl(clientObject.getWorkloadNetworkVmGroups(), this); + } + return workloadNetworkVmGroups; + } + + /** + * Gets the resource collection API of WorkloadNetworkVirtualMachines. + * + * @return Resource collection API of WorkloadNetworkVirtualMachines. + */ + public WorkloadNetworkVirtualMachines workloadNetworkVirtualMachines() { + if (this.workloadNetworkVirtualMachines == null) { + this.workloadNetworkVirtualMachines + = new WorkloadNetworkVirtualMachinesImpl(clientObject.getWorkloadNetworkVirtualMachines(), this); + } + return workloadNetworkVirtualMachines; + } + + /** + * Gets the resource collection API of WorkloadNetworkDnsServices. It manages WorkloadNetworkDnsService. + * + * @return Resource collection API of WorkloadNetworkDnsServices. + */ + public WorkloadNetworkDnsServices workloadNetworkDnsServices() { + if (this.workloadNetworkDnsServices == null) { + this.workloadNetworkDnsServices + = new WorkloadNetworkDnsServicesImpl(clientObject.getWorkloadNetworkDnsServices(), this); + } + return workloadNetworkDnsServices; + } + + /** + * Gets the resource collection API of WorkloadNetworkDnsZones. It manages WorkloadNetworkDnsZone. + * + * @return Resource collection API of WorkloadNetworkDnsZones. + */ + public WorkloadNetworkDnsZones workloadNetworkDnsZones() { + if (this.workloadNetworkDnsZones == null) { + this.workloadNetworkDnsZones + = new WorkloadNetworkDnsZonesImpl(clientObject.getWorkloadNetworkDnsZones(), this); + } + return workloadNetworkDnsZones; + } + + /** + * Gets the resource collection API of WorkloadNetworkPublicIps. It manages WorkloadNetworkPublicIp. + * + * @return Resource collection API of WorkloadNetworkPublicIps. + */ + public WorkloadNetworkPublicIps workloadNetworkPublicIps() { + if (this.workloadNetworkPublicIps == null) { + this.workloadNetworkPublicIps + = new WorkloadNetworkPublicIpsImpl(clientObject.getWorkloadNetworkPublicIps(), this); + } + return workloadNetworkPublicIps; + } + /** * Gets the resource collection API of CloudLinks. It manages CloudLink. - * + * * @return Resource collection API of CloudLinks. */ public CloudLinks cloudLinks() { @@ -445,7 +592,7 @@ public CloudLinks cloudLinks() { /** * Gets the resource collection API of Addons. It manages Addon. - * + * * @return Resource collection API of Addons. */ public Addons addons() { @@ -457,7 +604,7 @@ public Addons addons() { /** * Gets the resource collection API of VirtualMachines. - * + * * @return Resource collection API of VirtualMachines. */ public VirtualMachines virtualMachines() { @@ -469,7 +616,7 @@ public VirtualMachines virtualMachines() { /** * Gets the resource collection API of PlacementPolicies. It manages PlacementPolicy. - * + * * @return Resource collection API of PlacementPolicies. */ public PlacementPolicies placementPolicies() { @@ -481,7 +628,7 @@ public PlacementPolicies placementPolicies() { /** * Gets the resource collection API of ScriptPackages. - * + * * @return Resource collection API of ScriptPackages. */ public ScriptPackages scriptPackages() { @@ -493,7 +640,7 @@ public ScriptPackages scriptPackages() { /** * Gets the resource collection API of ScriptCmdlets. - * + * * @return Resource collection API of ScriptCmdlets. */ public ScriptCmdlets scriptCmdlets() { @@ -505,7 +652,7 @@ public ScriptCmdlets scriptCmdlets() { /** * Gets the resource collection API of ScriptExecutions. It manages ScriptExecution. - * + * * @return Resource collection API of ScriptExecutions. */ public ScriptExecutions scriptExecutions() { @@ -516,12 +663,24 @@ public ScriptExecutions scriptExecutions() { } /** - * Gets wrapped service client AvsClient providing direct access to the underlying auto-generated API + * Gets the resource collection API of IscsiPaths. + * + * @return Resource collection API of IscsiPaths. + */ + public IscsiPaths iscsiPaths() { + if (this.iscsiPaths == null) { + this.iscsiPaths = new IscsiPathsImpl(clientObject.getIscsiPaths(), this); + } + return iscsiPaths; + } + + /** + * Gets wrapped service client AVSClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. - * - * @return Wrapped service client AvsClient. + * + * @return Wrapped service client AVSClient. */ - public AvsClient serviceClient() { + public AVSClient serviceClient() { return this.clientObject; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java index 56fcc5e42d491..c7fcac6a3974d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -13,88 +13,90 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.AddonInner; -/** An instance of this class provides access to all the operations defined in AddonsClient. */ +/** + * An instance of this class provides access to all the operations defined in AddonsClient. + */ public interface AddonsClient { /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String addonName, + Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud. + * @return a Addon. */ @ServiceMethod(returns = ReturnType.SINGLE) AddonInner get(String resourceGroupName, String privateCloudName, String addonName); /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AddonInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon); + SyncPoller, AddonInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon); /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -102,16 +104,16 @@ SyncPoller, AddonInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AddonInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context); + SyncPoller, AddonInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon, Context context); /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -121,12 +123,12 @@ SyncPoller, AddonInner> beginCreateOrUpdate( AddonInner createOrUpdate(String resourceGroupName, String privateCloudName, String addonName, AddonInner addon); /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -134,15 +136,15 @@ SyncPoller, AddonInner> beginCreateOrUpdate( * @return an addon resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - AddonInner createOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context); + AddonInner createOrUpdate(String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, + Context context); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -152,11 +154,11 @@ AddonInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, String addonName); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -164,15 +166,15 @@ AddonInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String addonName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, String addonName, + Context context); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -181,11 +183,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String addonName); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java index 9e2932349aa10..ff65cfeb48aef 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -13,73 +13,77 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; -/** An instance of this class provides access to all the operations defined in AuthorizationsClient. */ +/** + * An instance of this class provides access to all the operations defined in AuthorizationsClient. + */ public interface AuthorizationsClient { /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, + Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. + * @return a ExpressRouteAuthorization along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String authorizationName, Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ExpressRoute Circuit Authorization by name in a private cloud. + * @return a ExpressRouteAuthorization. */ @ServiceMethod(returns = ReturnType.SINGLE) ExpressRouteAuthorizationInner get(String resourceGroupName, String privateCloudName, String authorizationName); /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -87,18 +91,16 @@ Response getWithResponse( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, + String resourceGroupName, String privateCloudName, String authorizationName, ExpressRouteAuthorizationInner authorization); /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -107,38 +109,32 @@ SyncPoller, ExpressRouteAuthorization */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization, - Context context); + String resourceGroupName, String privateCloudName, String authorizationName, + ExpressRouteAuthorizationInner authorization, Context context); /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExpressRouteAuthorizationInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization); + ExpressRouteAuthorizationInner createOrUpdate(String resourceGroupName, String privateCloudName, + String authorizationName, ExpressRouteAuthorizationInner authorization); /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -146,34 +142,30 @@ ExpressRouteAuthorizationInner createOrUpdate( * @return expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExpressRouteAuthorizationInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization, - Context context); + ExpressRouteAuthorizationInner createOrUpdate(String resourceGroupName, String privateCloudName, + String authorizationName, ExpressRouteAuthorizationInner authorization, Context context); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String authorizationName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String authorizationName); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -181,15 +173,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String authorizationName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String authorizationName, Context context); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -198,11 +190,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String authorizationName); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java index ebb59f7de436d..a5fb6b2d39c54 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 @@ -1,158 +1,230 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for AvsClient class. */ -public interface AvsClient { +/** + * The interface for AVSClient class. + */ +public interface AVSClient { /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * + * Gets Server parameter. + * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. - * + * Gets Version parameter. + * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the LocationsClient object to access its operations. - * + * * @return the LocationsClient object. */ LocationsClient getLocations(); /** * Gets the PrivateCloudsClient object to access its operations. - * + * * @return the PrivateCloudsClient object. */ PrivateCloudsClient getPrivateClouds(); /** * Gets the ClustersClient object to access its operations. - * + * * @return the ClustersClient object. */ ClustersClient getClusters(); /** * Gets the DatastoresClient object to access its operations. - * + * * @return the DatastoresClient object. */ DatastoresClient getDatastores(); /** * Gets the HcxEnterpriseSitesClient object to access its operations. - * + * * @return the HcxEnterpriseSitesClient object. */ HcxEnterpriseSitesClient getHcxEnterpriseSites(); /** * Gets the AuthorizationsClient object to access its operations. - * + * * @return the AuthorizationsClient object. */ AuthorizationsClient getAuthorizations(); /** * Gets the GlobalReachConnectionsClient object to access its operations. - * + * * @return the GlobalReachConnectionsClient object. */ GlobalReachConnectionsClient getGlobalReachConnections(); /** * Gets the WorkloadNetworksClient object to access its operations. - * + * * @return the WorkloadNetworksClient object. */ WorkloadNetworksClient getWorkloadNetworks(); + /** + * Gets the WorkloadNetworkSegmentsClient object to access its operations. + * + * @return the WorkloadNetworkSegmentsClient object. + */ + WorkloadNetworkSegmentsClient getWorkloadNetworkSegments(); + + /** + * Gets the WorkloadNetworkDhcpConfigurationsClient object to access its operations. + * + * @return the WorkloadNetworkDhcpConfigurationsClient object. + */ + WorkloadNetworkDhcpConfigurationsClient getWorkloadNetworkDhcpConfigurations(); + + /** + * Gets the WorkloadNetworkGatewaysClient object to access its operations. + * + * @return the WorkloadNetworkGatewaysClient object. + */ + WorkloadNetworkGatewaysClient getWorkloadNetworkGateways(); + + /** + * Gets the WorkloadNetworkPortMirroringProfilesClient object to access its operations. + * + * @return the WorkloadNetworkPortMirroringProfilesClient object. + */ + WorkloadNetworkPortMirroringProfilesClient getWorkloadNetworkPortMirroringProfiles(); + + /** + * Gets the WorkloadNetworkVmGroupsClient object to access its operations. + * + * @return the WorkloadNetworkVmGroupsClient object. + */ + WorkloadNetworkVmGroupsClient getWorkloadNetworkVmGroups(); + + /** + * Gets the WorkloadNetworkVirtualMachinesClient object to access its operations. + * + * @return the WorkloadNetworkVirtualMachinesClient object. + */ + WorkloadNetworkVirtualMachinesClient getWorkloadNetworkVirtualMachines(); + + /** + * Gets the WorkloadNetworkDnsServicesClient object to access its operations. + * + * @return the WorkloadNetworkDnsServicesClient object. + */ + WorkloadNetworkDnsServicesClient getWorkloadNetworkDnsServices(); + + /** + * Gets the WorkloadNetworkDnsZonesClient object to access its operations. + * + * @return the WorkloadNetworkDnsZonesClient object. + */ + WorkloadNetworkDnsZonesClient getWorkloadNetworkDnsZones(); + + /** + * Gets the WorkloadNetworkPublicIpsClient object to access its operations. + * + * @return the WorkloadNetworkPublicIpsClient object. + */ + WorkloadNetworkPublicIpsClient getWorkloadNetworkPublicIps(); + /** * Gets the CloudLinksClient object to access its operations. - * + * * @return the CloudLinksClient object. */ CloudLinksClient getCloudLinks(); /** * Gets the AddonsClient object to access its operations. - * + * * @return the AddonsClient object. */ AddonsClient getAddons(); /** * Gets the VirtualMachinesClient object to access its operations. - * + * * @return the VirtualMachinesClient object. */ VirtualMachinesClient getVirtualMachines(); /** * Gets the PlacementPoliciesClient object to access its operations. - * + * * @return the PlacementPoliciesClient object. */ PlacementPoliciesClient getPlacementPolicies(); /** * Gets the ScriptPackagesClient object to access its operations. - * + * * @return the ScriptPackagesClient object. */ ScriptPackagesClient getScriptPackages(); /** * Gets the ScriptCmdletsClient object to access its operations. - * + * * @return the ScriptCmdletsClient object. */ ScriptCmdletsClient getScriptCmdlets(); /** * Gets the ScriptExecutionsClient object to access its operations. - * + * * @return the ScriptExecutionsClient object. */ ScriptExecutionsClient getScriptExecutions(); + + /** + * Gets the IscsiPathsClient object to access its operations. + * + * @return the IscsiPathsClient object. + */ + IscsiPathsClient getIscsiPaths(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java index 026c015c4d458..c6a3a980d869d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -13,88 +13,90 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; -/** An instance of this class provides access to all the operations defined in CloudLinksClient. */ +/** + * An instance of this class provides access to all the operations defined in CloudLinksClient. + */ public interface CloudLinksClient { /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, + Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud. + * @return a CloudLink. */ @ServiceMethod(returns = ReturnType.SINGLE) CloudLinkInner get(String resourceGroupName, String privateCloudName, String cloudLinkName); /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudLinkInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink); + SyncPoller, CloudLinkInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink); /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -102,36 +104,32 @@ SyncPoller, CloudLinkInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudLinkInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context); + SyncPoller, CloudLinkInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink, Context context); /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cloud link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudLinkInner createOrUpdate( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink); + CloudLinkInner createOrUpdate(String resourceGroupName, String privateCloudName, String cloudLinkName, + CloudLinkInner cloudLink); /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -139,34 +137,30 @@ CloudLinkInner createOrUpdate( * @return a cloud link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudLinkInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context); + CloudLinkInner createOrUpdate(String resourceGroupName, String privateCloudName, String cloudLinkName, + CloudLinkInner cloudLink, Context context); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String cloudLinkName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String cloudLinkName); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -174,15 +168,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -191,11 +185,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String cloudLinkName); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ClustersClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ClustersClient.java index 83152c1de1ef6..b797c9dc509ba 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -13,90 +13,93 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; +import com.azure.resourcemanager.avs.models.ClustersUpdateResponse; import com.azure.resourcemanager.avs.models.ClusterUpdate; -/** An instance of this class provides access to all the operations defined in ClustersClient. */ +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ public interface ClustersClient { /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud. + * @return a Cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner get(String resourceGroupName, String privateCloudName, String clusterName); /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster); + SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster); /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -104,32 +107,32 @@ SyncPoller, ClusterInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context); + SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster, Context context); /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner createOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster); + ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + ClusterInner cluster); /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -137,104 +140,63 @@ ClusterInner createOrUpdate( * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner createOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context); - - /** - * Update a cluster in a private cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param clusterUpdate The cluster properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + ClusterInner cluster, Context context); /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context); - - /** - * Update a cluster in a private cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param clusterUpdate The cluster properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + ClustersUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate, Context context); /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context); + ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -242,15 +204,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, Context context); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -259,11 +221,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String clusterName); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -274,10 +236,10 @@ SyncPoller, Void> beginDelete( /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -285,15 +247,15 @@ SyncPoller, Void> beginDelete( * @return list of all zones and associated hosts for a cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listZonesWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + Response listZonesWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, Context context); /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java index e295cc467074b..0e7ccac05a542 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -13,99 +13,97 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; -/** An instance of this class provides access to all the operations defined in DatastoresClient. */ +/** + * An instance of this class provides access to all the operations defined in DatastoresClient. + */ public interface DatastoresClient { /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a datastore in a private cloud cluster along with {@link Response}. + * @return a Datastore along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a datastore in a private cloud cluster. + * @return a Datastore. */ @ServiceMethod(returns = ReturnType.SINGLE) DatastoreInner get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatastoreInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore); + SyncPoller, DatastoreInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore); /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -113,43 +111,34 @@ SyncPoller, DatastoreInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatastoreInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore, - Context context); + SyncPoller, DatastoreInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore, Context context); /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a datastore resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore); + DatastoreInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, DatastoreInner datastore); /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -157,37 +146,32 @@ DatastoreInner createOrUpdate( * @return a datastore resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore, - Context context); + DatastoreInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, DatastoreInner datastore, Context context); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -195,16 +179,16 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName, Context context); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -213,18 +197,18 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, + Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java index 96c635ed10c7a..937d58ed91480 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -13,72 +13,74 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; -/** An instance of this class provides access to all the operations defined in GlobalReachConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in GlobalReachConnectionsClient. + */ public interface GlobalReachConnectionsClient { /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a global reach connection by name in a private cloud along with {@link Response}. + * @return a GlobalReachConnection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a global reach connection by name in a private cloud. + * @return a GlobalReachConnection. */ @ServiceMethod(returns = ReturnType.SINGLE) GlobalReachConnectionInner get(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -86,18 +88,16 @@ Response getWithResponse( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, + String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection); /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -106,38 +106,32 @@ SyncPoller, GlobalReachConnectionInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection, - Context context); + String resourceGroupName, String privateCloudName, String globalReachConnectionName, + GlobalReachConnectionInner globalReachConnection, Context context); /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a global reach connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - GlobalReachConnectionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection); + GlobalReachConnectionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection); /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -145,34 +139,30 @@ GlobalReachConnectionInner createOrUpdate( * @return a global reach connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - GlobalReachConnectionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection, - Context context); + GlobalReachConnectionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection, Context context); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String globalReachConnectionName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String globalReachConnectionName); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -180,15 +170,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -197,11 +187,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java index c5259dc758d7e..d9e88bc7c1d72 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -11,72 +11,74 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; -/** An instance of this class provides access to all the operations defined in HcxEnterpriseSitesClient. */ +/** + * An instance of this class provides access to all the operations defined in HcxEnterpriseSitesClient. + */ public interface HcxEnterpriseSitesClient { /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud. + * @return a HcxEnterpriseSite. */ @ServiceMethod(returns = ReturnType.SINGLE) HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -84,38 +86,31 @@ Response getWithResponse( * @return an HCX Enterprise Site resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite, Context context); /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an HCX Enterprise Site resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - HcxEnterpriseSiteInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite); + HcxEnterpriseSiteInner createOrUpdate(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -123,15 +118,15 @@ HcxEnterpriseSiteInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + Response deleteWithResponse(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, + Context context); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java new file mode 100644 index 0000000000000..d0e7c433ad7bb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * An instance of this class provides access to all the operations defined in IscsiPathsClient. + */ +public interface IscsiPathsClient { + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName); + + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a IscsiPath along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a IscsiPath. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IscsiPathInner get(String resourceGroupName, String privateCloudName); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, IscsiPathInner resource); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, IscsiPathInner resource, Context context); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, Context context); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateCloudName); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateCloudName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java index 949b1697d0c74..86fb94fb5162f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -12,13 +12,15 @@ import com.azure.resourcemanager.avs.fluent.models.TrialInner; import com.azure.resourcemanager.avs.models.Sku; -/** An instance of this class provides access to all the operations defined in LocationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LocationsClient. + */ public interface LocationsClient { /** * Return trial status for subscription by region. - * - * @param location Azure region. - * @param sku The sku to check for trial availability. + * + * @param location A location in a subscription. + * @param sku Optionally, check for a specific SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,8 +32,8 @@ public interface LocationsClient { /** * Return trial status for subscription by region. - * - * @param location Azure region. + * + * @param location A location in a subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -42,8 +44,8 @@ public interface LocationsClient { /** * Return quota for subscription by region. - * - * @param location Azure region. + * + * @param location A location in a subscription. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,8 +57,8 @@ public interface LocationsClient { /** * Return quota for subscription by region. - * - * @param location Azure region. + * + * @param location A location in a subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java index 9161726093afc..87310fdf3cebe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -10,26 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java index 906606c62608a..2a3abb00f47e6 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -12,106 +12,101 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; +import com.azure.resourcemanager.avs.models.PlacementPoliciesUpdateResponse; import com.azure.resourcemanager.avs.models.PlacementPolicyUpdate; -/** An instance of this class provides access to all the operations defined in PlacementPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in PlacementPoliciesClient. + */ public interface PlacementPoliciesClient { /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster. + * @return a PlacementPolicy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); + PlacementPolicyInner get(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName); /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy); + SyncPoller, PlacementPolicyInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy); /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,43 +114,35 @@ SyncPoller, PlacementPolicyInner> beginCreateOr * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, + SyncPoller, PlacementPolicyInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy, Context context); /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy); + PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyInner placementPolicy); /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -163,125 +150,67 @@ PlacementPolicyInner createOrUpdate( * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context); - - /** - * Update a placement policy in a private cloud cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PlacementPolicyInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate); + PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyInner placementPolicy, Context context); /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PlacementPolicyInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context); - - /** - * Update a placement policy in a private cloud cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate); + PlacementPoliciesUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context); /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. - * @param context The context to associate with this operation. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context); + PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -289,20 +218,16 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -311,22 +236,18 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + void delete(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java index 35bb4483977c2..98b879dfd418c 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -13,106 +13,109 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.azure.resourcemanager.avs.models.PrivateCloudsUpdateResponse; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; -/** An instance of this class provides access to all the operations defined in PrivateCloudsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateCloudsClient. + */ public interface PrivateCloudsClient { /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud. + * @return a PrivateCloud. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateCloudInner getByResourceGroup(String resourceGroupName, String privateCloudName); /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateCloudInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud); + SyncPoller, PrivateCloudInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud); /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -120,15 +123,15 @@ SyncPoller, PrivateCloudInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateCloudInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context); + SyncPoller, PrivateCloudInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud, Context context); /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -138,11 +141,11 @@ SyncPoller, PrivateCloudInner> beginCreateOrUpdate PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud); /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -150,27 +153,12 @@ SyncPoller, PrivateCloudInner> beginCreateOrUpdate * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateCloudInner createOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context); + PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, + Context context); /** - * Update a private cloud. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a private cloud resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateCloudInner> beginUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); - - /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -178,45 +166,29 @@ SyncPoller, PrivateCloudInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a private cloud resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateCloudInner> beginUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context); - - /** - * Update a private cloud. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateCloudInner update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + PrivateCloudsUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate, Context context); /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateCloudInner update( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context); + PrivateCloudInner update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -228,8 +200,8 @@ PrivateCloudInner update( SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -242,8 +214,8 @@ PrivateCloudInner update( SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, Context context); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,8 +226,8 @@ PrivateCloudInner update( void delete(String resourceGroupName, String privateCloudName); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -268,7 +240,7 @@ PrivateCloudInner update( /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -281,7 +253,7 @@ PrivateCloudInner update( /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -291,12 +263,12 @@ PrivateCloudInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateVcenterPassword( - String resourceGroupName, String privateCloudName, Context context); + SyncPoller, Void> beginRotateVcenterPassword(String resourceGroupName, String privateCloudName, + Context context); /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -308,7 +280,7 @@ SyncPoller, Void> beginRotateVcenterPassword( /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -321,7 +293,7 @@ SyncPoller, Void> beginRotateVcenterPassword( /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -334,7 +306,7 @@ SyncPoller, Void> beginRotateVcenterPassword( /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -344,12 +316,12 @@ SyncPoller, Void> beginRotateVcenterPassword( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateNsxtPassword( - String resourceGroupName, String privateCloudName, Context context); + SyncPoller, Void> beginRotateNsxtPassword(String resourceGroupName, String privateCloudName, + Context context); /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -361,7 +333,7 @@ SyncPoller, Void> beginRotateNsxtPassword( /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -374,7 +346,7 @@ SyncPoller, Void> beginRotateNsxtPassword( /** * List the admin credentials for the private cloud. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -384,12 +356,12 @@ SyncPoller, Void> beginRotateNsxtPassword( * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context); + Response listAdminCredentialsWithResponse(String resourceGroupName, String privateCloudName, + Context context); /** * List the admin credentials for the private cloud. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java index dcd10a29ff642..904c45b9afd4d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -11,74 +11,70 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; -/** An instance of this class provides access to all the operations defined in ScriptCmdletsClient. */ +/** + * An instance of this class provides access to all the operations defined in ScriptCmdletsClient. + */ public interface ScriptCmdletsClient { /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName); /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName, + Context context); /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cmdlet available for script execution along with {@link Response}. + * @return a ScriptCmdlet along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptPackageName, String scriptCmdletName, Context context); /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cmdlet available for script execution. + * @return a ScriptCmdlet. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptCmdletInner get( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName); + ScriptCmdletInner get(String resourceGroupName, String privateCloudName, String scriptPackageName, + String scriptCmdletName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java index 3771d9787c94f..063951a11565d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -15,91 +15,90 @@ import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; import java.util.List; -/** An instance of this class provides access to all the operations defined in ScriptExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ScriptExecutionsClient. + */ public interface ScriptExecutionsClient { /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an script execution by name in a private cloud along with {@link Response}. + * @return a ScriptExecution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an script execution by name in a private cloud. + * @return a ScriptExecution. */ @ServiceMethod(returns = ReturnType.SINGLE) ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution); + SyncPoller, ScriptExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution); /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -107,39 +106,32 @@ SyncPoller, ScriptExecutionInner> beginCreateOr * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution, - Context context); + SyncPoller, ScriptExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context); /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, + ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution); /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -147,34 +139,30 @@ ScriptExecutionInner createOrUpdate( * @return an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution, - Context context); + ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution, Context context); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String scriptExecutionName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -182,15 +170,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -199,11 +187,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -214,12 +202,12 @@ SyncPoller, Void> beginDelete( /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. + * empty array will return nothing. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -227,25 +215,21 @@ SyncPoller, Void> beginDelete( * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getExecutionLogsWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType, - Context context); + Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, List scriptOutputStreamType, Context context); /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner getExecutionLogs( - String resourceGroupName, String privateCloudName, String scriptExecutionName); + ScriptExecutionInner getExecutionLogs(String resourceGroupName, String privateCloudName, + String scriptExecutionName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java index fc101fbe0aee8..cc7a294c98ef9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -11,61 +11,63 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; -/** An instance of this class provides access to all the operations defined in ScriptPackagesClient. */ +/** + * An instance of this class provides access to all the operations defined in ScriptPackagesClient. + */ public interface ScriptPackagesClient { /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a script package available to run on a private cloud along with {@link Response}. + * @return a ScriptPackage along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptPackageName, Context context); /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a script package available to run on a private cloud. + * @return a ScriptPackage. */ @ServiceMethod(returns = ReturnType.SINGLE) ScriptPackageInner get(String resourceGroupName, String privateCloudName, String scriptPackageName); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/VirtualMachinesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/VirtualMachinesClient.java index fc52260fdceed..46aa47741da45 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -14,104 +14,98 @@ import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; -/** An instance of this class provides access to all the operations defined in VirtualMachinesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualMachinesClient. + */ public interface VirtualMachinesClient { /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud cluster along with {@link Response}. + * @return a VirtualMachine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, Context context); /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud cluster. + * @return a VirtualMachine. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineInner get( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId); + VirtualMachineInner get(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement); + SyncPoller, Void> beginRestrictMovement(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,53 +113,39 @@ SyncPoller, Void> beginRestrictMovement( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context); + SyncPoller, Void> beginRestrictMovement(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement); + void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context); + void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java new file mode 100644 index 0000000000000..725e3be3dc4ca --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDhcpInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkDhcpConfigurationsClient. + */ +public interface WorkloadNetworkDhcpConfigurationsClient { + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String dhcpId, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner get(String resourceGroupName, String dhcpId, String privateCloudName); + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDhcpInner> beginCreate(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDhcpInner> beginCreate(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner create(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp); + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner create(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDhcpInner> beginUpdate(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp); + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDhcpInner> beginUpdate(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context); + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp); + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, String dhcpId); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, String dhcpId, + Context context); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateCloudName, String dhcpId); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateCloudName, String dhcpId, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java new file mode 100644 index 0000000000000..a6c469b03d525 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsServiceInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkDnsServicesClient. + */ +public interface WorkloadNetworkDnsServicesClient { + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName); + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String dnsServiceId, Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner get(String resourceGroupName, String privateCloudName, String dnsServiceId); + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsServiceInner> beginCreate( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsServiceInner> beginCreate( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner create(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner create(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService); + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context); + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService); + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 dnsServiceId, + String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 dnsServiceId, + String privateCloudName, Context context); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 dnsServiceId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 dnsServiceId, String privateCloudName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java new file mode 100644 index 0000000000000..329de69fdf1b3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsZoneInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkDnsZonesClient. + */ +public interface WorkloadNetworkDnsZonesClient { + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String dnsZoneId, Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner get(String resourceGroupName, String privateCloudName, String dnsZoneId); + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginCreate( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginCreate( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner create(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner create(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone); + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context); + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone); + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String dnsZoneId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String dnsZoneId, String privateCloudName, + Context context); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String dnsZoneId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkGatewaysClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkGatewaysClient.java new file mode 100644 index 0000000000000..008611aa06c48 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkGatewaysClient.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkGatewayInner; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkGatewaysClient. + */ +public interface WorkloadNetworkGatewaysClient { + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String gatewayId, Context context); + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkGatewayInner get(String resourceGroupName, String privateCloudName, String gatewayId); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java new file mode 100644 index 0000000000000..01c94b95ac07d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPortMirroringInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; + +/** + * An instance of this class provides access to all the operations defined in + * WorkloadNetworkPortMirroringProfilesClient. + */ +public interface WorkloadNetworkPortMirroringProfilesClient { + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName); + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String portMirroringId, Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner get(String resourceGroupName, String privateCloudName, String portMirroringId); + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPortMirroringInner> beginCreate( + String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPortMirroringInner> beginCreate( + String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner create(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner create(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( + String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring); + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( + String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context); + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring); + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String portMirroringId, + String privateCloudName); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String portMirroringId, + String privateCloudName, Context context); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String portMirroringId, String privateCloudName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPublicIpsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPublicIpsClient.java new file mode 100644 index 0000000000000..8a36df0026c25 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPublicIpsClient.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPublicIpInner; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkPublicIpsClient. + */ +public interface WorkloadNetworkPublicIpsClient { + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName); + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String publicIPId, Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPublicIpInner get(String resourceGroupName, String privateCloudName, String publicIPId); + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPublicIpInner> beginCreate( + String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP); + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPublicIpInner> beginCreate( + String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPublicIpInner create(String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP); + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPublicIpInner create(String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String publicIPId, + String privateCloudName); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String publicIPId, String privateCloudName, + Context context); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String publicIPId, String privateCloudName); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String publicIPId, String privateCloudName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java new file mode 100644 index 0000000000000..4fa8508ff90e3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkSegmentInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkSegmentsClient. + */ +public interface WorkloadNetworkSegmentsClient { + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String segmentId, Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner get(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginCreate( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment); + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginCreate( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner create(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment); + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner create(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties); + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties, + Context context); + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate properties); + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate properties, Context context); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String segmentId); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String segmentId, Context context); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVirtualMachinesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVirtualMachinesClient.java new file mode 100644 index 0000000000000..ad16624b09636 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVirtualMachinesClient.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVirtualMachineInner; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkVirtualMachinesClient. + */ +public interface WorkloadNetworkVirtualMachinesClient { + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName); + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String virtualMachineId, Context context); + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVirtualMachineInner get(String resourceGroupName, String privateCloudName, String virtualMachineId); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java new file mode 100644 index 0000000000000..d1681eef28bcd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVMGroupInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkVmGroupsClient. + */ +public interface WorkloadNetworkVmGroupsClient { + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String vmGroupId, Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner get(String resourceGroupName, String privateCloudName, String vmGroupId); + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginCreate( + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource); + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginCreate( + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, + Context context); + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner create(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner resource); + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner create(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner resource, Context context); + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup); + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context); + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup); + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String vmGroupId, String privateCloudName, + Context context); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java index 51ede42b52bc2..a5b26aa3cf309 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent; @@ -8,2044 +8,65 @@ 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.WorkloadNetworkDhcpInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; -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.WorkloadNetworkVMGroupInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; -/** An instance of this class provides access to all the operations defined in WorkloadNetworksClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworksClient. + */ public interface WorkloadNetworksClient { /** - * Get a private cloud workload network. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud workload network along with {@link Response}. + * @return a WorkloadNetwork along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); /** - * Get a private cloud workload network. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud workload network. + * @return a WorkloadNetwork. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkInner get( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName); + WorkloadNetworkInner get(String resourceGroupName, String privateCloudName); /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName); /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSegments(String resourceGroupName, String privateCloudName); - - /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSegments( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context); - - /** - * Get a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId); - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context); - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner createSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner createSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context); - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context); - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner updateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner updateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context); - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteSegment( - String resourceGroupName, String privateCloudName, String segmentId); - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteSegment( - String resourceGroupName, String privateCloudName, String segmentId, Context context); - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDhcp(String resourceGroupName, String privateCloudName); - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDhcp( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context); - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context); - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner createDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner createDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context); - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context); - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner updateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner updateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context); - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDhcp( - String resourceGroupName, String privateCloudName, String dhcpId); - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, Context context); - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGateways(String resourceGroupName, String privateCloudName); - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGateways( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a gateway by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context); - - /** - * Get a gateway by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId); - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName); - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context); - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId); - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner createPortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner createPortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner updatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner updatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName); - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context); - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context); - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVMGroups( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context); - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context); - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner createVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner createVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context); - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context); - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner updateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner updateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context); - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteVMGroup( - String resourceGroupName, String vmGroupId, String privateCloudName); - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteVMGroup( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context); - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName); - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a virtual machine by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine 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 virtual machine by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context); - - /** - * Get a virtual machine by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine 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 virtual machine by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVirtualMachineInner getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId); - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context); - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner getDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId); - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context); - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner createDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner createDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context); - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context); - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner updateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner updateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context); - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName); - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName); - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsZones( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context); - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner createDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner createDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner updateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner updateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDnsZone( - String resourceGroupName, String dnsZoneId, String privateCloudName); - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDnsZone( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName); - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context); - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp); - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context); - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner createPublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp); - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner createPublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, Context context); - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePublicIp( - String resourceGroupName, String publicIpId, String privateCloudName); - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePublicIp( - String resourceGroupName, String publicIpId, String privateCloudName, Context context); - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName); - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java index 2d3bd1b34ce8f..ea2ee3c0f3064 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java @@ -1,30 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.AddonProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** An addon resource. */ +/** + * An addon resource. + */ @Fluent public final class AddonInner extends ProxyResource { /* - * The properties of an addon resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private AddonProperties properties; - /** Creates an instance of AddonInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AddonInner class. + */ public AddonInner() { } /** - * Get the properties property: The properties of an addon resource. - * + * Get the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ public AddonProperties properties() { @@ -32,8 +43,8 @@ public AddonProperties properties() { } /** - * Set the properties property: The properties of an addon resource. - * + * Set the properties property: The resource-specific properties for this resource. + * * @param properties the properties value to set. * @return the AddonInner object itself. */ @@ -42,9 +53,18 @@ public AddonInner withProperties(AddonProperties properties) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java index f08bbd7362a6c..f8136d1ed10cf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Administrative credentials for accessing vCenter and NSX-T. */ +/** + * Administrative credentials for accessing vCenter and NSX-T. + */ @Immutable public final class AdminCredentialsInner { /* @@ -34,13 +36,15 @@ public final class AdminCredentialsInner { @JsonProperty(value = "vcenterPassword", access = JsonProperty.Access.WRITE_ONLY) private String vcenterPassword; - /** Creates an instance of AdminCredentialsInner class. */ - public AdminCredentialsInner() { + /** + * Creates an instance of AdminCredentialsInner class. + */ + private AdminCredentialsInner() { } /** * Get the nsxtUsername property: NSX-T Manager username. - * + * * @return the nsxtUsername value. */ public String nsxtUsername() { @@ -49,7 +53,7 @@ public String nsxtUsername() { /** * Get the nsxtPassword property: NSX-T Manager password. - * + * * @return the nsxtPassword value. */ public String nsxtPassword() { @@ -58,7 +62,7 @@ public String nsxtPassword() { /** * Get the vcenterUsername property: vCenter admin username. - * + * * @return the vcenterUsername value. */ public String vcenterUsername() { @@ -67,7 +71,7 @@ public String vcenterUsername() { /** * Get the vcenterPassword property: vCenter admin password. - * + * * @return the vcenterPassword value. */ public String vcenterPassword() { @@ -76,7 +80,7 @@ public String vcenterPassword() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java index 9375349cf0369..21b28939a759d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java @@ -1,39 +1,69 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.CloudLinkProvisioningState; import com.azure.resourcemanager.avs.models.CloudLinkStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** A cloud link resource. */ +/** + * A cloud link resource. + */ @Fluent public final class CloudLinkInner extends ProxyResource { /* - * The properties of a cloud link. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private CloudLinkProperties innerProperties; - /** Creates an instance of CloudLinkInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of CloudLinkInner class. + */ public CloudLinkInner() { } /** - * Get the innerProperties property: The properties of a cloud link. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private CloudLinkProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public CloudLinkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the status property: The state of the cloud link. - * + * * @return the status value. */ public CloudLinkStatus status() { @@ -42,7 +72,7 @@ public CloudLinkStatus status() { /** * Get the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @return the linkedCloud value. */ public String linkedCloud() { @@ -51,7 +81,7 @@ public String linkedCloud() { /** * Set the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @param linkedCloud the linkedCloud value to set. * @return the CloudLinkInner object itself. */ @@ -65,7 +95,7 @@ public CloudLinkInner withLinkedCloud(String linkedCloud) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java index 7fe8859f78a73..55059a5326e7b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java @@ -1,16 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.models.CloudLinkProvisioningState; import com.azure.resourcemanager.avs.models.CloudLinkStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a cloud link. */ +/** + * The properties of a cloud link. + */ @Fluent public final class CloudLinkProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private CloudLinkProvisioningState provisioningState; + /* * The state of the cloud link. */ @@ -23,13 +32,24 @@ public final class CloudLinkProperties { @JsonProperty(value = "linkedCloud") private String linkedCloud; - /** Creates an instance of CloudLinkProperties class. */ + /** + * Creates an instance of CloudLinkProperties class. + */ public CloudLinkProperties() { } + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public CloudLinkProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the status property: The state of the cloud link. - * + * * @return the status value. */ public CloudLinkStatus status() { @@ -38,7 +58,7 @@ public CloudLinkStatus status() { /** * Get the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @return the linkedCloud value. */ public String linkedCloud() { @@ -47,7 +67,7 @@ public String linkedCloud() { /** * Set the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @param linkedCloud the linkedCloud value to set. * @return the CloudLinkProperties object itself. */ @@ -58,7 +78,7 @@ public CloudLinkProperties withLinkedCloud(String linkedCloud) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java index f3a74f1742417..f11aa6a6530d8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java @@ -1,39 +1,59 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.ClusterProvisioningState; import com.azure.resourcemanager.avs.models.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A cluster resource. */ +/** + * A cluster resource. + */ @Fluent public final class ClusterInner extends ProxyResource { /* - * The cluster SKU + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private ClusterProperties innerProperties; + + /* + * The SKU (Stock Keeping Unit) assigned to this resource. */ @JsonProperty(value = "sku", required = true) private Sku sku; /* - * The properties of a cluster resource + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "properties") - private ClusterProperties innerProperties; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /** Creates an instance of ClusterInner class. */ + /** + * Creates an instance of ClusterInner class. + */ public ClusterInner() { } /** - * Get the sku property: The cluster SKU. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private ClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @return the sku value. */ public Sku sku() { @@ -41,8 +61,8 @@ public Sku sku() { } /** - * Set the sku property: The cluster SKU. - * + * Set the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @param sku the sku value to set. * @return the ClusterInner object itself. */ @@ -52,17 +72,17 @@ public ClusterInner withSku(Sku sku) { } /** - * Get the innerProperties property: The properties of a cluster resource. - * - * @return the innerProperties value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - private ClusterProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** * Get the clusterSize property: The cluster size. - * + * * @return the clusterSize value. */ public Integer clusterSize() { @@ -71,7 +91,7 @@ public Integer clusterSize() { /** * Set the clusterSize property: The cluster size. - * + * * @param clusterSize the clusterSize value to set. * @return the ClusterInner object itself. */ @@ -85,7 +105,7 @@ public ClusterInner withClusterSize(Integer clusterSize) { /** * Get the provisioningState property: The state of the cluster provisioning. - * + * * @return the provisioningState value. */ public ClusterProvisioningState provisioningState() { @@ -94,7 +114,7 @@ public ClusterProvisioningState provisioningState() { /** * Get the clusterId property: The identity. - * + * * @return the clusterId value. */ public Integer clusterId() { @@ -103,7 +123,7 @@ public Integer clusterId() { /** * Get the hosts property: The hosts. - * + * * @return the hosts value. */ public List hosts() { @@ -112,7 +132,7 @@ public List hosts() { /** * Set the hosts property: The hosts. - * + * * @param hosts the hosts value to set. * @return the ClusterInner object itself. */ @@ -124,22 +144,44 @@ public ClusterInner withHosts(List hosts) { return this; } + /** + * Get the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @return the vsanDatastoreName value. + */ + public String vsanDatastoreName() { + return this.innerProperties() == null ? null : this.innerProperties().vsanDatastoreName(); + } + + /** + * Set the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @param vsanDatastoreName the vsanDatastoreName value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withVsanDatastoreName(String vsanDatastoreName) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withVsanDatastoreName(vsanDatastoreName); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (sku() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model ClusterInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sku in model ClusterInner")); } else { sku().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(ClusterInner.class); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java index 4d8593001660e..5ad678724dfb4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java @@ -1,41 +1,138 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.avs.models.CommonClusterProperties; +import com.azure.resourcemanager.avs.models.ClusterProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a cluster. */ +/** + * The properties of a cluster. + */ @Fluent -public final class ClusterProperties extends CommonClusterProperties { - /** Creates an instance of ClusterProperties class. */ +public final class ClusterProperties { + /* + * The cluster size + */ + @JsonProperty(value = "clusterSize") + private Integer clusterSize; + + /* + * The state of the cluster provisioning + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClusterProvisioningState provisioningState; + + /* + * The identity + */ + @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) + private Integer clusterId; + + /* + * The hosts + */ + @JsonProperty(value = "hosts") + private List hosts; + + /* + * Name of the vsan datastore associated with the cluster + */ + @JsonProperty(value = "vsanDatastoreName") + private String vsanDatastoreName; + + /** + * Creates an instance of ClusterProperties class. + */ public ClusterProperties() { } - /** {@inheritDoc} */ - @Override + /** + * Get the clusterSize property: The cluster size. + * + * @return the clusterSize value. + */ + public Integer clusterSize() { + return this.clusterSize; + } + + /** + * Set the clusterSize property: The cluster size. + * + * @param clusterSize the clusterSize value to set. + * @return the ClusterProperties object itself. + */ public ClusterProperties withClusterSize(Integer clusterSize) { - super.withClusterSize(clusterSize); + this.clusterSize = clusterSize; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the provisioningState property: The state of the cluster provisioning. + * + * @return the provisioningState value. + */ + public ClusterProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the clusterId property: The identity. + * + * @return the clusterId value. + */ + public Integer clusterId() { + return this.clusterId; + } + + /** + * Get the hosts property: The hosts. + * + * @return the hosts value. + */ + public List hosts() { + return this.hosts; + } + + /** + * Set the hosts property: The hosts. + * + * @param hosts the hosts value to set. + * @return the ClusterProperties object itself. + */ public ClusterProperties withHosts(List hosts) { - super.withHosts(hosts); + this.hosts = hosts; + return this; + } + + /** + * Get the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @return the vsanDatastoreName value. + */ + public String vsanDatastoreName() { + return this.vsanDatastoreName; + } + + /** + * Set the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @param vsanDatastoreName the vsanDatastoreName value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withVsanDatastoreName(String vsanDatastoreName) { + this.vsanDatastoreName = vsanDatastoreName; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java index 122bc7b0f6833..572da8ad9322d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a cluster that may be updated. */ +/** + * The properties of a cluster that may be updated. + */ @Fluent public final class ClusterUpdateProperties { /* @@ -23,13 +25,15 @@ public final class ClusterUpdateProperties { @JsonProperty(value = "hosts") private List hosts; - /** Creates an instance of ClusterUpdateProperties class. */ + /** + * Creates an instance of ClusterUpdateProperties class. + */ public ClusterUpdateProperties() { } /** * Get the clusterSize property: The cluster size. - * + * * @return the clusterSize value. */ public Integer clusterSize() { @@ -38,7 +42,7 @@ public Integer clusterSize() { /** * Set the clusterSize property: The cluster size. - * + * * @param clusterSize the clusterSize value to set. * @return the ClusterUpdateProperties object itself. */ @@ -49,7 +53,7 @@ public ClusterUpdateProperties withClusterSize(Integer clusterSize) { /** * Get the hosts property: The hosts. - * + * * @return the hosts value. */ public List hosts() { @@ -58,7 +62,7 @@ public List hosts() { /** * Set the hosts property: The hosts. - * + * * @param hosts the hosts value to set. * @return the ClusterUpdateProperties object itself. */ @@ -69,7 +73,7 @@ public ClusterUpdateProperties withHosts(List hosts) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java index 3b054fcb974d1..c5bd59ac21010 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java @@ -1,16 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.avs.models.ClusterZone; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of all zones and associated hosts for a cluster. */ -@Fluent +/** + * List of all zones and associated hosts for a cluster. + */ +@Immutable public final class ClusterZoneListInner { /* * Zone and associated hosts info @@ -18,33 +20,24 @@ public final class ClusterZoneListInner { @JsonProperty(value = "zones") private List zones; - /** Creates an instance of ClusterZoneListInner class. */ - public ClusterZoneListInner() { + /** + * Creates an instance of ClusterZoneListInner class. + */ + private ClusterZoneListInner() { } /** * Get the zones property: Zone and associated hosts info. - * + * * @return the zones value. */ public List zones() { return this.zones; } - /** - * Set the zones property: Zone and associated hosts info. - * - * @param zones the zones value to set. - * @return the ClusterZoneListInner object itself. - */ - public ClusterZoneListInner withZones(List zones) { - this.zones = zones; - return this; - } - /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java index 2f28c024df6f1..2e54bfe47af22 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 @@ -1,42 +1,63 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.DatastoreProvisioningState; import com.azure.resourcemanager.avs.models.DatastoreStatus; import com.azure.resourcemanager.avs.models.DiskPoolVolume; +import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; import com.fasterxml.jackson.annotation.JsonProperty; -/** A datastore resource. */ +/** + * A datastore resource. + */ @Fluent public final class DatastoreInner extends ProxyResource { /* - * The properties of a datastore resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private DatastoreProperties innerProperties; - /** Creates an instance of DatastoreInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DatastoreInner class. + */ public DatastoreInner() { } /** - * Get the innerProperties property: The properties of a datastore resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private DatastoreProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the provisioningState property: The state of the datastore provisioning. - * + * * @return the provisioningState value. */ public DatastoreProvisioningState provisioningState() { @@ -45,7 +66,7 @@ public DatastoreProvisioningState provisioningState() { /** * Get the netAppVolume property: An Azure NetApp Files volume. - * + * * @return the netAppVolume value. */ public NetAppVolume netAppVolume() { @@ -54,7 +75,7 @@ public NetAppVolume netAppVolume() { /** * Set the netAppVolume property: An Azure NetApp Files volume. - * + * * @param netAppVolume the netAppVolume value to set. * @return the DatastoreInner object itself. */ @@ -68,7 +89,7 @@ public DatastoreInner withNetAppVolume(NetAppVolume netAppVolume) { /** * Get the diskPoolVolume property: An iSCSI volume. - * + * * @return the diskPoolVolume value. */ public DiskPoolVolume diskPoolVolume() { @@ -77,7 +98,7 @@ public DiskPoolVolume diskPoolVolume() { /** * Set the diskPoolVolume property: An iSCSI volume. - * + * * @param diskPoolVolume the diskPoolVolume value to set. * @return the DatastoreInner object itself. */ @@ -89,9 +110,32 @@ public DatastoreInner withDiskPoolVolume(DiskPoolVolume diskPoolVolume) { return this; } + /** + * Get the elasticSanVolume property: An Elastic SAN volume. + * + * @return the elasticSanVolume value. + */ + public ElasticSanVolume elasticSanVolume() { + return this.innerProperties() == null ? null : this.innerProperties().elasticSanVolume(); + } + + /** + * Set the elasticSanVolume property: An Elastic SAN volume. + * + * @param elasticSanVolume the elasticSanVolume value to set. + * @return the DatastoreInner object itself. + */ + public DatastoreInner withElasticSanVolume(ElasticSanVolume elasticSanVolume) { + if (this.innerProperties() == null) { + this.innerProperties = new DatastoreProperties(); + } + this.innerProperties().withElasticSanVolume(elasticSanVolume); + return this; + } + /** * Get the status property: The operational status of the datastore. - * + * * @return the status value. */ public DatastoreStatus status() { @@ -100,7 +144,7 @@ public DatastoreStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java index 6971f37da436a..9d70476cb22c5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -8,10 +8,13 @@ import com.azure.resourcemanager.avs.models.DatastoreProvisioningState; import com.azure.resourcemanager.avs.models.DatastoreStatus; import com.azure.resourcemanager.avs.models.DiskPoolVolume; +import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a datastore. */ +/** + * The properties of a datastore. + */ @Fluent public final class DatastoreProperties { /* @@ -32,19 +35,27 @@ public final class DatastoreProperties { @JsonProperty(value = "diskPoolVolume") private DiskPoolVolume diskPoolVolume; + /* + * An Elastic SAN volume + */ + @JsonProperty(value = "elasticSanVolume") + private ElasticSanVolume elasticSanVolume; + /* * The operational status of the datastore */ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private DatastoreStatus status; - /** Creates an instance of DatastoreProperties class. */ + /** + * Creates an instance of DatastoreProperties class. + */ public DatastoreProperties() { } /** * Get the provisioningState property: The state of the datastore provisioning. - * + * * @return the provisioningState value. */ public DatastoreProvisioningState provisioningState() { @@ -53,7 +64,7 @@ public DatastoreProvisioningState provisioningState() { /** * Get the netAppVolume property: An Azure NetApp Files volume. - * + * * @return the netAppVolume value. */ public NetAppVolume netAppVolume() { @@ -62,7 +73,7 @@ public NetAppVolume netAppVolume() { /** * Set the netAppVolume property: An Azure NetApp Files volume. - * + * * @param netAppVolume the netAppVolume value to set. * @return the DatastoreProperties object itself. */ @@ -73,7 +84,7 @@ public DatastoreProperties withNetAppVolume(NetAppVolume netAppVolume) { /** * Get the diskPoolVolume property: An iSCSI volume. - * + * * @return the diskPoolVolume value. */ public DiskPoolVolume diskPoolVolume() { @@ -82,7 +93,7 @@ public DiskPoolVolume diskPoolVolume() { /** * Set the diskPoolVolume property: An iSCSI volume. - * + * * @param diskPoolVolume the diskPoolVolume value to set. * @return the DatastoreProperties object itself. */ @@ -91,9 +102,29 @@ public DatastoreProperties withDiskPoolVolume(DiskPoolVolume diskPoolVolume) { return this; } + /** + * Get the elasticSanVolume property: An Elastic SAN volume. + * + * @return the elasticSanVolume value. + */ + public ElasticSanVolume elasticSanVolume() { + return this.elasticSanVolume; + } + + /** + * Set the elasticSanVolume property: An Elastic SAN volume. + * + * @param elasticSanVolume the elasticSanVolume value to set. + * @return the DatastoreProperties object itself. + */ + public DatastoreProperties withElasticSanVolume(ElasticSanVolume elasticSanVolume) { + this.elasticSanVolume = elasticSanVolume; + return this; + } + /** * Get the status property: The operational status of the datastore. - * + * * @return the status value. */ public DatastoreStatus status() { @@ -102,7 +133,7 @@ public DatastoreStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -112,5 +143,8 @@ public void validate() { if (diskPoolVolume() != null) { diskPoolVolume().validate(); } + if (elasticSanVolume() != null) { + elasticSanVolume().validate(); + } } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java index 6cfe9af0432b1..df115276314d0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java @@ -1,39 +1,59 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** ExpressRoute Circuit Authorization. */ -@Immutable +/** + * ExpressRoute Circuit Authorization. + */ +@Fluent public final class ExpressRouteAuthorizationInner extends ProxyResource { /* - * The properties of an ExpressRoute Circuit Authorization resource + * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties") private ExpressRouteAuthorizationProperties innerProperties; - /** Creates an instance of ExpressRouteAuthorizationInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ExpressRouteAuthorizationInner class. + */ public ExpressRouteAuthorizationInner() { } /** - * Get the innerProperties property: The properties of an ExpressRoute Circuit Authorization resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private ExpressRouteAuthorizationProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ public ExpressRouteAuthorizationProvisioningState provisioningState() { @@ -42,7 +62,7 @@ public ExpressRouteAuthorizationProvisioningState provisioningState() { /** * Get the expressRouteAuthorizationId property: The ID of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationId value. */ public String expressRouteAuthorizationId() { @@ -51,7 +71,7 @@ public String expressRouteAuthorizationId() { /** * Get the expressRouteAuthorizationKey property: The key of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationKey value. */ public String expressRouteAuthorizationKey() { @@ -60,7 +80,7 @@ public String expressRouteAuthorizationKey() { /** * Get the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -69,7 +89,7 @@ public String expressRouteId() { /** * Set the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @param expressRouteId the expressRouteId value to set. * @return the ExpressRouteAuthorizationInner object itself. */ @@ -83,7 +103,7 @@ public ExpressRouteAuthorizationInner withExpressRouteId(String expressRouteId) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java index 282f0e6c2e860..a533f3df560ed 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -8,11 +8,13 @@ import com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of an ExpressRoute Circuit Authorization resource. */ +/** + * The properties of an ExpressRoute Circuit Authorization resource. + */ @Fluent public final class ExpressRouteAuthorizationProperties { /* - * The state of the ExpressRoute Circuit Authorization provisioning + * The state of the ExpressRoute Circuit Authorization provisioning */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ExpressRouteAuthorizationProvisioningState provisioningState; @@ -35,13 +37,15 @@ public final class ExpressRouteAuthorizationProperties { @JsonProperty(value = "expressRouteId") private String expressRouteId; - /** Creates an instance of ExpressRouteAuthorizationProperties class. */ + /** + * Creates an instance of ExpressRouteAuthorizationProperties class. + */ public ExpressRouteAuthorizationProperties() { } /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ public ExpressRouteAuthorizationProvisioningState provisioningState() { @@ -50,7 +54,7 @@ public ExpressRouteAuthorizationProvisioningState provisioningState() { /** * Get the expressRouteAuthorizationId property: The ID of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationId value. */ public String expressRouteAuthorizationId() { @@ -59,7 +63,7 @@ public String expressRouteAuthorizationId() { /** * Get the expressRouteAuthorizationKey property: The key of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationKey value. */ public String expressRouteAuthorizationKey() { @@ -68,7 +72,7 @@ public String expressRouteAuthorizationKey() { /** * Get the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -77,7 +81,7 @@ public String expressRouteId() { /** * Set the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @param expressRouteId the expressRouteId value to set. * @return the ExpressRouteAuthorizationProperties object itself. */ @@ -88,7 +92,7 @@ public ExpressRouteAuthorizationProperties withExpressRouteId(String expressRout /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java index 649dfe6debbe3..bd4f507c60a25 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java @@ -1,40 +1,60 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.GlobalReachConnectionProvisioningState; import com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** A global reach connection resource. */ +/** + * A global reach connection resource. + */ @Fluent public final class GlobalReachConnectionInner extends ProxyResource { /* - * The properties of a global reach connection resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private GlobalReachConnectionProperties innerProperties; - /** Creates an instance of GlobalReachConnectionInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of GlobalReachConnectionInner class. + */ public GlobalReachConnectionInner() { } /** - * Get the innerProperties property: The properties of a global reach connection resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private GlobalReachConnectionProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ public GlobalReachConnectionProvisioningState provisioningState() { @@ -44,7 +64,7 @@ public GlobalReachConnectionProvisioningState provisioningState() { /** * Get the addressPrefix property: The network used for global reach carved out from the original network block * provided for the private cloud. - * + * * @return the addressPrefix value. */ public String addressPrefix() { @@ -54,7 +74,7 @@ public String addressPrefix() { /** * Get the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @return the authorizationKey value. */ public String authorizationKey() { @@ -64,7 +84,7 @@ public String authorizationKey() { /** * Set the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @param authorizationKey the authorizationKey value to set. * @return the GlobalReachConnectionInner object itself. */ @@ -78,7 +98,7 @@ public GlobalReachConnectionInner withAuthorizationKey(String authorizationKey) /** * Get the circuitConnectionStatus property: The connection status of the global reach connection. - * + * * @return the circuitConnectionStatus value. */ public GlobalReachConnectionStatus circuitConnectionStatus() { @@ -88,7 +108,7 @@ public GlobalReachConnectionStatus circuitConnectionStatus() { /** * Get the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global reach * connection. - * + * * @return the peerExpressRouteCircuit value. */ public String peerExpressRouteCircuit() { @@ -98,7 +118,7 @@ public String peerExpressRouteCircuit() { /** * Set the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global reach * connection. - * + * * @param peerExpressRouteCircuit the peerExpressRouteCircuit value to set. * @return the GlobalReachConnectionInner object itself. */ @@ -113,7 +133,7 @@ public GlobalReachConnectionInner withPeerExpressRouteCircuit(String peerExpress /** * Get the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -123,7 +143,7 @@ public String expressRouteId() { /** * Set the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @param expressRouteId the expressRouteId value to set. * @return the GlobalReachConnectionInner object itself. */ @@ -137,7 +157,7 @@ public GlobalReachConnectionInner withExpressRouteId(String expressRouteId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java index dc4b9d3e5761d..ce3ab7ec2f1dc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -9,23 +9,27 @@ import com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a global reach connection. */ +/** + * The properties of a global reach connection. + */ @Fluent public final class GlobalReachConnectionProperties { /* - * The state of the ExpressRoute Circuit Authorization provisioning + * The state of the ExpressRoute Circuit Authorization provisioning */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private GlobalReachConnectionProvisioningState provisioningState; /* - * The network used for global reach carved out from the original network block provided for the private cloud + * The network used for global reach carved out from the original network block + * provided for the private cloud */ @JsonProperty(value = "addressPrefix", access = JsonProperty.Access.WRITE_ONLY) private String addressPrefix; /* - * Authorization key from the peer express route used for the global reach connection + * Authorization key from the peer express route used for the global reach + * connection */ @JsonProperty(value = "authorizationKey") private String authorizationKey; @@ -37,24 +41,28 @@ public final class GlobalReachConnectionProperties { private GlobalReachConnectionStatus circuitConnectionStatus; /* - * Identifier of the ExpressRoute Circuit to peer with in the global reach connection + * Identifier of the ExpressRoute Circuit to peer with in the global reach + * connection */ @JsonProperty(value = "peerExpressRouteCircuit") private String peerExpressRouteCircuit; /* - * The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection + * The ID of the Private Cloud's ExpressRoute Circuit that is participating in the + * global reach connection */ @JsonProperty(value = "expressRouteId") private String expressRouteId; - /** Creates an instance of GlobalReachConnectionProperties class. */ + /** + * Creates an instance of GlobalReachConnectionProperties class. + */ public GlobalReachConnectionProperties() { } /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ public GlobalReachConnectionProvisioningState provisioningState() { @@ -64,7 +72,7 @@ public GlobalReachConnectionProvisioningState provisioningState() { /** * Get the addressPrefix property: The network used for global reach carved out from the original network block * provided for the private cloud. - * + * * @return the addressPrefix value. */ public String addressPrefix() { @@ -74,7 +82,7 @@ public String addressPrefix() { /** * Get the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @return the authorizationKey value. */ public String authorizationKey() { @@ -84,7 +92,7 @@ public String authorizationKey() { /** * Set the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @param authorizationKey the authorizationKey value to set. * @return the GlobalReachConnectionProperties object itself. */ @@ -95,7 +103,7 @@ public GlobalReachConnectionProperties withAuthorizationKey(String authorization /** * Get the circuitConnectionStatus property: The connection status of the global reach connection. - * + * * @return the circuitConnectionStatus value. */ public GlobalReachConnectionStatus circuitConnectionStatus() { @@ -105,7 +113,7 @@ public GlobalReachConnectionStatus circuitConnectionStatus() { /** * Get the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global reach * connection. - * + * * @return the peerExpressRouteCircuit value. */ public String peerExpressRouteCircuit() { @@ -115,7 +123,7 @@ public String peerExpressRouteCircuit() { /** * Set the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global reach * connection. - * + * * @param peerExpressRouteCircuit the peerExpressRouteCircuit value to set. * @return the GlobalReachConnectionProperties object itself. */ @@ -127,7 +135,7 @@ public GlobalReachConnectionProperties withPeerExpressRouteCircuit(String peerEx /** * Get the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -137,7 +145,7 @@ public String expressRouteId() { /** * Set the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @param expressRouteId the expressRouteId value to set. * @return the GlobalReachConnectionProperties object itself. */ @@ -148,7 +156,7 @@ public GlobalReachConnectionProperties withExpressRouteId(String expressRouteId) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java index 6dfdcec76d4b7..d4df2fcecfbf6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java @@ -1,39 +1,69 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** An HCX Enterprise Site resource. */ +/** + * An HCX Enterprise Site resource. + */ @Immutable public final class HcxEnterpriseSiteInner extends ProxyResource { /* - * The properties of an HCX Enterprise Site resource + * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties") private HcxEnterpriseSiteProperties innerProperties; - /** Creates an instance of HcxEnterpriseSiteInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of HcxEnterpriseSiteInner class. + */ public HcxEnterpriseSiteInner() { } /** - * Get the innerProperties property: The properties of an HCX Enterprise Site resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private HcxEnterpriseSiteProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public HcxEnterpriseSiteProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the activationKey property: The activation key. - * + * * @return the activationKey value. */ public String activationKey() { @@ -42,7 +72,7 @@ public String activationKey() { /** * Get the status property: The status of the HCX Enterprise Site. - * + * * @return the status value. */ public HcxEnterpriseSiteStatus status() { @@ -51,7 +81,7 @@ public HcxEnterpriseSiteStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java index 76db6e83e6b31..3bb0c1a2a3c2d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java @@ -1,16 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of an HCX Enterprise Site. */ +/** + * The properties of an HCX Enterprise Site. + */ @Immutable public final class HcxEnterpriseSiteProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private HcxEnterpriseSiteProvisioningState provisioningState; + /* * The activation key */ @@ -23,13 +32,24 @@ public final class HcxEnterpriseSiteProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private HcxEnterpriseSiteStatus status; - /** Creates an instance of HcxEnterpriseSiteProperties class. */ + /** + * Creates an instance of HcxEnterpriseSiteProperties class. + */ public HcxEnterpriseSiteProperties() { } + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public HcxEnterpriseSiteProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the activationKey property: The activation key. - * + * * @return the activationKey value. */ public String activationKey() { @@ -38,7 +58,7 @@ public String activationKey() { /** * Get the status property: The status of the HCX Enterprise Site. - * + * * @return the status value. */ public HcxEnterpriseSiteStatus status() { @@ -47,7 +67,7 @@ public HcxEnterpriseSiteStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java new file mode 100644 index 0000000000000..a9415c7a0322b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.IscsiPathProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An iSCSI path resource. + */ +@Fluent +public final class IscsiPathInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private IscsiPathProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of IscsiPathInner class. + */ + public IscsiPathInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private IscsiPathProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The state of the iSCSI path provisioning. + * + * @return the provisioningState value. + */ + public IscsiPathProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the networkBlock property: CIDR Block for iSCSI path. + * + * @return the networkBlock value. + */ + public String networkBlock() { + return this.innerProperties() == null ? null : this.innerProperties().networkBlock(); + } + + /** + * Set the networkBlock property: CIDR Block for iSCSI path. + * + * @param networkBlock the networkBlock value to set. + * @return the IscsiPathInner object itself. + */ + public IscsiPathInner withNetworkBlock(String networkBlock) { + if (this.innerProperties() == null) { + this.innerProperties = new IscsiPathProperties(); + } + this.innerProperties().withNetworkBlock(networkBlock); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java new file mode 100644 index 0000000000000..9805121d8885f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.models.IscsiPathProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of an iSCSI path resource. + */ +@Fluent +public final class IscsiPathProperties { + /* + * The state of the iSCSI path provisioning + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private IscsiPathProvisioningState provisioningState; + + /* + * CIDR Block for iSCSI path. + */ + @JsonProperty(value = "networkBlock", required = true) + private String networkBlock; + + /** + * Creates an instance of IscsiPathProperties class. + */ + public IscsiPathProperties() { + } + + /** + * Get the provisioningState property: The state of the iSCSI path provisioning. + * + * @return the provisioningState value. + */ + public IscsiPathProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the networkBlock property: CIDR Block for iSCSI path. + * + * @return the networkBlock value. + */ + public String networkBlock() { + return this.networkBlock; + } + + /** + * Set the networkBlock property: CIDR Block for iSCSI path. + * + * @param networkBlock the networkBlock value to set. + * @return the IscsiPathProperties object itself. + */ + public IscsiPathProperties withNetworkBlock(String networkBlock) { + this.networkBlock = networkBlock; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkBlock() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property networkBlock in model IscsiPathProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiPathProperties.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java index 464fbc7dc373e..27cf8fe769159 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java @@ -1,54 +1,63 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.ActionType; import com.azure.resourcemanager.avs.models.OperationDisplay; -import com.azure.resourcemanager.avs.models.OperationProperties; +import com.azure.resourcemanager.avs.models.Origin; import com.fasterxml.jackson.annotation.JsonProperty; -/** A REST API operation. */ -@Fluent +/** + * Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Immutable public final class OperationInner { /* - * Name of the operation being performed on this object + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* - * Contains the localized display information for this operation + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. */ - @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) - private OperationDisplay display; + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; /* - * Gets or sets a value indicating whether the operation is a data action or not + * Localized display information for this particular operation. */ - @JsonProperty(value = "isDataAction") - private Boolean isDataAction; + @JsonProperty(value = "display") + private OperationDisplay display; /* - * Origin of the operation + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" */ - @JsonProperty(value = "origin") - private String origin; + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; /* - * Properties of the operation + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ - @JsonProperty(value = "properties") - private OperationProperties properties; + @JsonProperty(value = "actionType") + private ActionType actionType; - /** Creates an instance of OperationInner class. */ - public OperationInner() { + /** + * Creates an instance of OperationInner class. + */ + private OperationInner() { } /** - * Get the name property: Name of the operation being performed on this object. - * + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * * @return the name value. */ public String name() { @@ -56,17 +65,9 @@ public String name() { } /** - * Get the display property: Contains the localized display information for this operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Get the isDataAction property: Gets or sets a value indicating whether the operation is a data action or not. - * + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for Azure Resource Manager/control-plane operations. + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -74,67 +75,42 @@ public Boolean isDataAction() { } /** - * Set the isDataAction property: Gets or sets a value indicating whether the operation is a data action or not. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationInner object itself. + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. */ - public OperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; + public OperationDisplay display() { + return this.display; } /** - * Get the origin property: Origin of the operation. - * + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * * @return the origin value. */ - public String origin() { + public Origin origin() { return this.origin; } /** - * Set the origin property: Origin of the operation. - * - * @param origin the origin value to set. - * @return the OperationInner object itself. - */ - public OperationInner withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Get the properties property: Properties of the operation. - * - * @return the properties value. - */ - public OperationProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the operation. - * - * @param properties the properties value to set. - * @return the OperationInner object itself. + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + * + * @return the actionType value. */ - public OperationInner withProperties(OperationProperties properties) { - this.properties = properties; - return this; + public ActionType actionType() { + return this.actionType; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (display() != null) { display().validate(); } - if (properties() != null) { - properties().validate(); - } } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java index ce6268027f373..84d9a97e866e4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java @@ -1,30 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.PlacementPolicyProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A vSphere Distributed Resource Scheduler (DRS) placement policy. */ +/** + * A vSphere Distributed Resource Scheduler (DRS) placement policy. + */ @Fluent public final class PlacementPolicyInner extends ProxyResource { /* - * placement policy properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private PlacementPolicyProperties properties; - /** Creates an instance of PlacementPolicyInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PlacementPolicyInner class. + */ public PlacementPolicyInner() { } /** - * Get the properties property: placement policy properties. - * + * Get the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ public PlacementPolicyProperties properties() { @@ -32,8 +43,8 @@ public PlacementPolicyProperties properties() { } /** - * Set the properties property: placement policy properties. - * + * Set the properties property: The resource-specific properties for this resource. + * * @param properties the properties value to set. * @return the PlacementPolicyInner object itself. */ @@ -42,9 +53,18 @@ public PlacementPolicyInner withProperties(PlacementPolicyProperties properties) return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java index f1380c8a70d1f..28a2b7a2c78e8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a placement policy resource that may be updated. */ +/** + * The properties of a placement policy resource that may be updated. + */ @Fluent public final class PlacementPolicyUpdateProperties { /* @@ -44,13 +46,15 @@ public final class PlacementPolicyUpdateProperties { @JsonProperty(value = "azureHybridBenefitType") private AzureHybridBenefitType azureHybridBenefitType; - /** Creates an instance of PlacementPolicyUpdateProperties class. */ + /** + * Creates an instance of PlacementPolicyUpdateProperties class. + */ public PlacementPolicyUpdateProperties() { } /** * Get the state property: Whether the placement policy is enabled or disabled. - * + * * @return the state value. */ public PlacementPolicyState state() { @@ -59,7 +63,7 @@ public PlacementPolicyState state() { /** * Set the state property: Whether the placement policy is enabled or disabled. - * + * * @param state the state value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -70,7 +74,7 @@ public PlacementPolicyUpdateProperties withState(PlacementPolicyState state) { /** * Get the vmMembers property: Virtual machine members list. - * + * * @return the vmMembers value. */ public List vmMembers() { @@ -79,7 +83,7 @@ public List vmMembers() { /** * Set the vmMembers property: Virtual machine members list. - * + * * @param vmMembers the vmMembers value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -90,7 +94,7 @@ public PlacementPolicyUpdateProperties withVmMembers(List vmMembers) { /** * Get the hostMembers property: Host members list. - * + * * @return the hostMembers value. */ public List hostMembers() { @@ -99,7 +103,7 @@ public List hostMembers() { /** * Set the hostMembers property: Host members list. - * + * * @param hostMembers the hostMembers value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -110,7 +114,7 @@ public PlacementPolicyUpdateProperties withHostMembers(List hostMembers) /** * Get the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @return the affinityStrength value. */ public AffinityStrength affinityStrength() { @@ -119,7 +123,7 @@ public AffinityStrength affinityStrength() { /** * Set the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @param affinityStrength the affinityStrength value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -130,7 +134,7 @@ public PlacementPolicyUpdateProperties withAffinityStrength(AffinityStrength aff /** * Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @return the azureHybridBenefitType value. */ public AzureHybridBenefitType azureHybridBenefitType() { @@ -139,7 +143,7 @@ public AzureHybridBenefitType azureHybridBenefitType() { /** * Set the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @param azureHybridBenefitType the azureHybridBenefitType value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -150,7 +154,7 @@ public PlacementPolicyUpdateProperties withAzureHybridBenefitType(AzureHybridBen /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java index 59d8a03d26aa4..2c929ef1c84ff 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 @@ -1,14 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; +import com.azure.resourcemanager.avs.models.DnsZoneType; import com.azure.resourcemanager.avs.models.Encryption; import com.azure.resourcemanager.avs.models.Endpoints; import com.azure.resourcemanager.avs.models.IdentitySource; @@ -22,34 +24,53 @@ import java.util.List; import java.util.Map; -/** A private cloud resource. */ +/** + * A private cloud resource. + */ @Fluent public final class PrivateCloudInner extends Resource { /* - * The private cloud SKU + * The resource-specific properties for this resource. */ - @JsonProperty(value = "sku", required = true) - private Sku sku; + @JsonProperty(value = "properties") + private PrivateCloudProperties innerProperties; /* - * The properties of a private cloud resource + * The SKU (Stock Keeping Unit) assigned to this resource. */ - @JsonProperty(value = "properties") - private PrivateCloudProperties innerProperties; + @JsonProperty(value = "sku", required = true) + private Sku sku; /* - * The identity of the private cloud, if configured. + * The managed service identities assigned to this resource. */ @JsonProperty(value = "identity") private PrivateCloudIdentity identity; - /** Creates an instance of PrivateCloudInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PrivateCloudInner class. + */ public PrivateCloudInner() { } /** - * Get the sku property: The private cloud SKU. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private PrivateCloudProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @return the sku value. */ public Sku sku() { @@ -57,8 +78,8 @@ public Sku sku() { } /** - * Set the sku property: The private cloud SKU. - * + * Set the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @param sku the sku value to set. * @return the PrivateCloudInner object itself. */ @@ -68,17 +89,8 @@ public PrivateCloudInner withSku(Sku sku) { } /** - * Get the innerProperties property: The properties of a private cloud resource. - * - * @return the innerProperties value. - */ - private PrivateCloudProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identity of the private cloud, if configured. - * + * Get the identity property: The managed service identities assigned to this resource. + * * @return the identity value. */ public PrivateCloudIdentity identity() { @@ -86,8 +98,8 @@ public PrivateCloudIdentity identity() { } /** - * Set the identity property: The identity of the private cloud, if configured. - * + * Set the identity property: The managed service identities assigned to this resource. + * * @param identity the identity value to set. * @return the PrivateCloudInner object itself. */ @@ -96,23 +108,182 @@ public PrivateCloudInner withIdentity(PrivateCloudIdentity identity) { return this; } - /** {@inheritDoc} */ + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ @Override public PrivateCloudInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PrivateCloudInner withTags(Map tags) { super.withTags(tags); return this; } + /** + * Get the managementCluster property: The default cluster used for management. + * + * @return the managementCluster value. + */ + public ManagementCluster managementCluster() { + return this.innerProperties() == null ? null : this.innerProperties().managementCluster(); + } + + /** + * Set the managementCluster property: The default cluster used for management. + * + * @param managementCluster the managementCluster value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withManagementCluster(ManagementCluster managementCluster) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withManagementCluster(managementCluster); + return this; + } + + /** + * Get the internet property: Connectivity to internet is enabled or disabled. + * + * @return the internet value. + */ + public InternetEnum internet() { + return this.innerProperties() == null ? null : this.innerProperties().internet(); + } + + /** + * Set the internet property: Connectivity to internet is enabled or disabled. + * + * @param internet the internet value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withInternet(InternetEnum internet) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withInternet(internet); + return this; + } + + /** + * Get the identitySources property: vCenter Single Sign On Identity Sources. + * + * @return the identitySources value. + */ + public List identitySources() { + return this.innerProperties() == null ? null : this.innerProperties().identitySources(); + } + + /** + * Set the identitySources property: vCenter Single Sign On Identity Sources. + * + * @param identitySources the identitySources value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withIdentitySources(List identitySources) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withIdentitySources(identitySources); + return this; + } + + /** + * Get the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @return the availability value. + */ + public AvailabilityProperties availability() { + return this.innerProperties() == null ? null : this.innerProperties().availability(); + } + + /** + * Set the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @param availability the availability value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withAvailability(AvailabilityProperties availability) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withAvailability(availability); + return this; + } + + /** + * Get the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @return the encryption value. + */ + public Encryption encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); + } + + /** + * Set the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @param encryption the encryption value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withEncryption(Encryption encryption) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withEncryption(encryption); + return this; + } + + /** + * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @return the extendedNetworkBlocks value. + */ + public List extendedNetworkBlocks() { + return this.innerProperties() == null ? null : this.innerProperties().extendedNetworkBlocks(); + } + + /** + * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withExtendedNetworkBlocks(List extendedNetworkBlocks) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withExtendedNetworkBlocks(extendedNetworkBlocks); + return this; + } + /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public PrivateCloudProvisioningState provisioningState() { @@ -121,7 +292,7 @@ public PrivateCloudProvisioningState provisioningState() { /** * Get the circuit property: An ExpressRoute Circuit. - * + * * @return the circuit value. */ public Circuit circuit() { @@ -130,7 +301,7 @@ public Circuit circuit() { /** * Set the circuit property: An ExpressRoute Circuit. - * + * * @param circuit the circuit value to set. * @return the PrivateCloudInner object itself. */ @@ -144,7 +315,7 @@ public PrivateCloudInner withCircuit(Circuit circuit) { /** * Get the endpoints property: The endpoints. - * + * * @return the endpoints value. */ public Endpoints endpoints() { @@ -152,10 +323,10 @@ public Endpoints endpoints() { } /** - * Get the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Get the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @return the networkBlock value. */ public String networkBlock() { @@ -163,10 +334,10 @@ public String networkBlock() { } /** - * Set the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Set the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @param networkBlock the networkBlock value to set. * @return the PrivateCloudInner object itself. */ @@ -180,7 +351,7 @@ public PrivateCloudInner withNetworkBlock(String networkBlock) { /** * Get the managementNetwork property: Network used to access vCenter Server and NSX-T Manager. - * + * * @return the managementNetwork value. */ public String managementNetwork() { @@ -189,7 +360,7 @@ public String managementNetwork() { /** * Get the provisioningNetwork property: Used for virtual machine cold migration, cloning, and snapshot migration. - * + * * @return the provisioningNetwork value. */ public String provisioningNetwork() { @@ -198,7 +369,7 @@ public String provisioningNetwork() { /** * Get the vmotionNetwork property: Used for live migration of virtual machines. - * + * * @return the vmotionNetwork value. */ public String vmotionNetwork() { @@ -207,7 +378,7 @@ public String vmotionNetwork() { /** * Get the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @return the vcenterPassword value. */ public String vcenterPassword() { @@ -216,7 +387,7 @@ public String vcenterPassword() { /** * Set the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @param vcenterPassword the vcenterPassword value to set. * @return the PrivateCloudInner object itself. */ @@ -230,7 +401,7 @@ public PrivateCloudInner withVcenterPassword(String vcenterPassword) { /** * Get the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @return the nsxtPassword value. */ public String nsxtPassword() { @@ -239,7 +410,7 @@ public String nsxtPassword() { /** * Set the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @param nsxtPassword the nsxtPassword value to set. * @return the PrivateCloudInner object itself. */ @@ -253,7 +424,7 @@ public PrivateCloudInner withNsxtPassword(String nsxtPassword) { /** * Get the vcenterCertificateThumbprint property: Thumbprint of the vCenter Server SSL certificate. - * + * * @return the vcenterCertificateThumbprint value. */ public String vcenterCertificateThumbprint() { @@ -262,7 +433,7 @@ public String vcenterCertificateThumbprint() { /** * Get the nsxtCertificateThumbprint property: Thumbprint of the NSX-T Manager SSL certificate. - * + * * @return the nsxtCertificateThumbprint value. */ public String nsxtCertificateThumbprint() { @@ -271,7 +442,7 @@ public String nsxtCertificateThumbprint() { /** * Get the externalCloudLinks property: Array of cloud link IDs from other clouds that connect to this one. - * + * * @return the externalCloudLinks value. */ public List externalCloudLinks() { @@ -281,7 +452,7 @@ public List externalCloudLinks() { /** * Get the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @return the secondaryCircuit value. */ public Circuit secondaryCircuit() { @@ -291,7 +462,7 @@ public Circuit secondaryCircuit() { /** * Set the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @param secondaryCircuit the secondaryCircuit value to set. * @return the PrivateCloudInner object itself. */ @@ -305,8 +476,9 @@ public PrivateCloudInner withSecondaryCircuit(Circuit secondaryCircuit) { /** * Get the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for provisioned - * NSX Public IP count raised from 64 to 1024. - * + * NSX + * Public IP count raised from 64 to 1024. + * * @return the nsxPublicIpQuotaRaised value. */ public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { @@ -314,163 +486,66 @@ public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { } /** - * Get the managementCluster property: The default cluster used for management. - * - * @return the managementCluster value. + * Get the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @return the virtualNetworkId value. */ - public ManagementCluster managementCluster() { - return this.innerProperties() == null ? null : this.innerProperties().managementCluster(); + public String virtualNetworkId() { + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkId(); } /** - * Set the managementCluster property: The default cluster used for management. - * - * @param managementCluster the managementCluster value to set. + * Set the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @param virtualNetworkId the virtualNetworkId value to set. * @return the PrivateCloudInner object itself. */ - public PrivateCloudInner withManagementCluster(ManagementCluster managementCluster) { + public PrivateCloudInner withVirtualNetworkId(String virtualNetworkId) { if (this.innerProperties() == null) { this.innerProperties = new PrivateCloudProperties(); } - this.innerProperties().withManagementCluster(managementCluster); + this.innerProperties().withVirtualNetworkId(virtualNetworkId); return this; } /** - * Get the internet property: Connectivity to internet is enabled or disabled. - * - * @return the internet value. + * Get the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. */ - public InternetEnum internet() { - return this.innerProperties() == null ? null : this.innerProperties().internet(); + public DnsZoneType dnsZoneType() { + return this.innerProperties() == null ? null : this.innerProperties().dnsZoneType(); } /** - * Set the internet property: Connectivity to internet is enabled or disabled. - * - * @param internet the internet value to set. + * Set the dnsZoneType property: The type of DNS zone to use. + * + * @param dnsZoneType the dnsZoneType value to set. * @return the PrivateCloudInner object itself. */ - public PrivateCloudInner withInternet(InternetEnum internet) { + public PrivateCloudInner withDnsZoneType(DnsZoneType dnsZoneType) { if (this.innerProperties() == null) { this.innerProperties = new PrivateCloudProperties(); } - this.innerProperties().withInternet(internet); - return this; - } - - /** - * Get the identitySources property: vCenter Single Sign On Identity Sources. - * - * @return the identitySources value. - */ - public List identitySources() { - return this.innerProperties() == null ? null : this.innerProperties().identitySources(); - } - - /** - * Set the identitySources property: vCenter Single Sign On Identity Sources. - * - * @param identitySources the identitySources value to set. - * @return the PrivateCloudInner object itself. - */ - public PrivateCloudInner withIdentitySources(List identitySources) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); - } - this.innerProperties().withIdentitySources(identitySources); - return this; - } - - /** - * Get the availability property: Properties describing how the cloud is distributed across availability zones. - * - * @return the availability value. - */ - public AvailabilityProperties availability() { - return this.innerProperties() == null ? null : this.innerProperties().availability(); - } - - /** - * Set the availability property: Properties describing how the cloud is distributed across availability zones. - * - * @param availability the availability value to set. - * @return the PrivateCloudInner object itself. - */ - public PrivateCloudInner withAvailability(AvailabilityProperties availability) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); - } - this.innerProperties().withAvailability(availability); - return this; - } - - /** - * Get the encryption property: Customer managed key encryption, can be enabled or disabled. - * - * @return the encryption value. - */ - public Encryption encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: Customer managed key encryption, can be enabled or disabled. - * - * @param encryption the encryption value to set. - * @return the PrivateCloudInner object itself. - */ - public PrivateCloudInner withEncryption(Encryption encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); - } - this.innerProperties().withEncryption(encryption); - return this; - } - - /** - * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * - * @return the extendedNetworkBlocks value. - */ - public List extendedNetworkBlocks() { - return this.innerProperties() == null ? null : this.innerProperties().extendedNetworkBlocks(); - } - - /** - * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * - * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. - * @return the PrivateCloudInner object itself. - */ - public PrivateCloudInner withExtendedNetworkBlocks(List extendedNetworkBlocks) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); - } - this.innerProperties().withExtendedNetworkBlocks(extendedNetworkBlocks); + this.innerProperties().withDnsZoneType(dnsZoneType); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (sku() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model PrivateCloudInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sku in model PrivateCloudInner")); } else { sku().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java index 2382f43dd7b22..24e51a75a3961 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -8,6 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; +import com.azure.resourcemanager.avs.models.DnsZoneType; import com.azure.resourcemanager.avs.models.Encryption; import com.azure.resourcemanager.avs.models.Endpoints; import com.azure.resourcemanager.avs.models.IdentitySource; @@ -18,9 +19,50 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a private cloud resource. */ +/** + * The properties of a private cloud resource. + */ @Fluent -public final class PrivateCloudProperties extends PrivateCloudUpdateProperties { +public final class PrivateCloudProperties { + /* + * The default cluster used for management + */ + @JsonProperty(value = "managementCluster", required = true) + private ManagementCluster managementCluster; + + /* + * Connectivity to internet is enabled or disabled + */ + @JsonProperty(value = "internet") + private InternetEnum internet; + + /* + * vCenter Single Sign On Identity Sources + */ + @JsonProperty(value = "identitySources") + private List identitySources; + + /* + * Properties describing how the cloud is distributed across availability zones + */ + @JsonProperty(value = "availability") + private AvailabilityProperties availability; + + /* + * Customer managed key encryption, can be enabled or disabled + */ + @JsonProperty(value = "encryption") + private Encryption encryption; + + /* + * Array of additional networks noncontiguous with networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + */ + @JsonProperty(value = "extendedNetworkBlocks") + private List extendedNetworkBlocks; + /* * The provisioning state */ @@ -40,8 +82,9 @@ public final class PrivateCloudProperties extends PrivateCloudUpdateProperties { private Endpoints endpoints; /* - * The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the - * CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22 + * The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22 */ @JsonProperty(value = "networkBlock", required = true) private String networkBlock; @@ -95,25 +138,168 @@ public final class PrivateCloudProperties extends PrivateCloudUpdateProperties { private List externalCloudLinks; /* - * A secondary expressRoute circuit from a separate AZ. Only present in a stretched private cloud + * A secondary expressRoute circuit from a separate AZ. Only present in a + * stretched private cloud */ @JsonProperty(value = "secondaryCircuit") private Circuit secondaryCircuit; /* - * Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to - * 1024 + * Flag to indicate whether the private cloud has the quota for provisioned NSX + * Public IP count raised from 64 to 1024 */ @JsonProperty(value = "nsxPublicIpQuotaRaised", access = JsonProperty.Access.WRITE_ONLY) private NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised; - /** Creates an instance of PrivateCloudProperties class. */ + /* + * Azure resource ID of the virtual network + */ + @JsonProperty(value = "virtualNetworkId") + private String virtualNetworkId; + + /* + * The type of DNS zone to use. + */ + @JsonProperty(value = "dnsZoneType") + private DnsZoneType dnsZoneType; + + /** + * Creates an instance of PrivateCloudProperties class. + */ public PrivateCloudProperties() { } + /** + * Get the managementCluster property: The default cluster used for management. + * + * @return the managementCluster value. + */ + public ManagementCluster managementCluster() { + return this.managementCluster; + } + + /** + * Set the managementCluster property: The default cluster used for management. + * + * @param managementCluster the managementCluster value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withManagementCluster(ManagementCluster managementCluster) { + this.managementCluster = managementCluster; + return this; + } + + /** + * Get the internet property: Connectivity to internet is enabled or disabled. + * + * @return the internet value. + */ + public InternetEnum internet() { + return this.internet; + } + + /** + * Set the internet property: Connectivity to internet is enabled or disabled. + * + * @param internet the internet value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withInternet(InternetEnum internet) { + this.internet = internet; + return this; + } + + /** + * Get the identitySources property: vCenter Single Sign On Identity Sources. + * + * @return the identitySources value. + */ + public List identitySources() { + return this.identitySources; + } + + /** + * Set the identitySources property: vCenter Single Sign On Identity Sources. + * + * @param identitySources the identitySources value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withIdentitySources(List identitySources) { + this.identitySources = identitySources; + return this; + } + + /** + * Get the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @return the availability value. + */ + public AvailabilityProperties availability() { + return this.availability; + } + + /** + * Set the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @param availability the availability value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withAvailability(AvailabilityProperties availability) { + this.availability = availability; + return this; + } + + /** + * Get the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @return the encryption value. + */ + public Encryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @param encryption the encryption value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withEncryption(Encryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @return the extendedNetworkBlocks value. + */ + public List extendedNetworkBlocks() { + return this.extendedNetworkBlocks; + } + + /** + * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withExtendedNetworkBlocks(List extendedNetworkBlocks) { + this.extendedNetworkBlocks = extendedNetworkBlocks; + return this; + } + /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public PrivateCloudProvisioningState provisioningState() { @@ -122,7 +308,7 @@ public PrivateCloudProvisioningState provisioningState() { /** * Get the circuit property: An ExpressRoute Circuit. - * + * * @return the circuit value. */ public Circuit circuit() { @@ -131,7 +317,7 @@ public Circuit circuit() { /** * Set the circuit property: An ExpressRoute Circuit. - * + * * @param circuit the circuit value to set. * @return the PrivateCloudProperties object itself. */ @@ -142,7 +328,7 @@ public PrivateCloudProperties withCircuit(Circuit circuit) { /** * Get the endpoints property: The endpoints. - * + * * @return the endpoints value. */ public Endpoints endpoints() { @@ -150,10 +336,10 @@ public Endpoints endpoints() { } /** - * Get the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Get the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @return the networkBlock value. */ public String networkBlock() { @@ -161,10 +347,10 @@ public String networkBlock() { } /** - * Set the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Set the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @param networkBlock the networkBlock value to set. * @return the PrivateCloudProperties object itself. */ @@ -175,7 +361,7 @@ public PrivateCloudProperties withNetworkBlock(String networkBlock) { /** * Get the managementNetwork property: Network used to access vCenter Server and NSX-T Manager. - * + * * @return the managementNetwork value. */ public String managementNetwork() { @@ -184,7 +370,7 @@ public String managementNetwork() { /** * Get the provisioningNetwork property: Used for virtual machine cold migration, cloning, and snapshot migration. - * + * * @return the provisioningNetwork value. */ public String provisioningNetwork() { @@ -193,7 +379,7 @@ public String provisioningNetwork() { /** * Get the vmotionNetwork property: Used for live migration of virtual machines. - * + * * @return the vmotionNetwork value. */ public String vmotionNetwork() { @@ -202,7 +388,7 @@ public String vmotionNetwork() { /** * Get the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @return the vcenterPassword value. */ public String vcenterPassword() { @@ -211,7 +397,7 @@ public String vcenterPassword() { /** * Set the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @param vcenterPassword the vcenterPassword value to set. * @return the PrivateCloudProperties object itself. */ @@ -222,7 +408,7 @@ public PrivateCloudProperties withVcenterPassword(String vcenterPassword) { /** * Get the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @return the nsxtPassword value. */ public String nsxtPassword() { @@ -231,7 +417,7 @@ public String nsxtPassword() { /** * Set the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @param nsxtPassword the nsxtPassword value to set. * @return the PrivateCloudProperties object itself. */ @@ -242,7 +428,7 @@ public PrivateCloudProperties withNsxtPassword(String nsxtPassword) { /** * Get the vcenterCertificateThumbprint property: Thumbprint of the vCenter Server SSL certificate. - * + * * @return the vcenterCertificateThumbprint value. */ public String vcenterCertificateThumbprint() { @@ -251,7 +437,7 @@ public String vcenterCertificateThumbprint() { /** * Get the nsxtCertificateThumbprint property: Thumbprint of the NSX-T Manager SSL certificate. - * + * * @return the nsxtCertificateThumbprint value. */ public String nsxtCertificateThumbprint() { @@ -260,7 +446,7 @@ public String nsxtCertificateThumbprint() { /** * Get the externalCloudLinks property: Array of cloud link IDs from other clouds that connect to this one. - * + * * @return the externalCloudLinks value. */ public List externalCloudLinks() { @@ -270,7 +456,7 @@ public List externalCloudLinks() { /** * Get the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @return the secondaryCircuit value. */ public Circuit secondaryCircuit() { @@ -280,7 +466,7 @@ public Circuit secondaryCircuit() { /** * Set the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @param secondaryCircuit the secondaryCircuit value to set. * @return the PrivateCloudProperties object itself. */ @@ -291,64 +477,77 @@ public PrivateCloudProperties withSecondaryCircuit(Circuit secondaryCircuit) { /** * Get the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for provisioned - * NSX Public IP count raised from 64 to 1024. - * + * NSX + * Public IP count raised from 64 to 1024. + * * @return the nsxPublicIpQuotaRaised value. */ public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { return this.nsxPublicIpQuotaRaised; } - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withManagementCluster(ManagementCluster managementCluster) { - super.withManagementCluster(managementCluster); - return this; - } - - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withInternet(InternetEnum internet) { - super.withInternet(internet); - return this; - } - - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withIdentitySources(List identitySources) { - super.withIdentitySources(identitySources); - return this; + /** + * Get the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @return the virtualNetworkId value. + */ + public String virtualNetworkId() { + return this.virtualNetworkId; } - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withAvailability(AvailabilityProperties availability) { - super.withAvailability(availability); + /** + * Set the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @param virtualNetworkId the virtualNetworkId value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withVirtualNetworkId(String virtualNetworkId) { + this.virtualNetworkId = virtualNetworkId; return this; } - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withEncryption(Encryption encryption) { - super.withEncryption(encryption); - return this; + /** + * Get the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. + */ + public DnsZoneType dnsZoneType() { + return this.dnsZoneType; } - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withExtendedNetworkBlocks(List extendedNetworkBlocks) { - super.withExtendedNetworkBlocks(extendedNetworkBlocks); + /** + * Set the dnsZoneType property: The type of DNS zone to use. + * + * @param dnsZoneType the dnsZoneType value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withDnsZoneType(DnsZoneType dnsZoneType) { + this.dnsZoneType = dnsZoneType; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (managementCluster() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property managementCluster in model PrivateCloudProperties")); + } else { + managementCluster().validate(); + } + if (identitySources() != null) { + identitySources().forEach(e -> e.validate()); + } + if (availability() != null) { + availability().validate(); + } + if (encryption() != null) { + encryption().validate(); + } if (circuit() != null) { circuit().validate(); } @@ -356,10 +555,9 @@ public void validate() { endpoints().validate(); } if (networkBlock() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property networkBlock in model PrivateCloudProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property networkBlock in model PrivateCloudProperties")); } if (secondaryCircuit() != null) { secondaryCircuit().validate(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java index 6113ce2eca10c..75331a19e186c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.avs.models.AvailabilityProperties; +import com.azure.resourcemanager.avs.models.DnsZoneType; import com.azure.resourcemanager.avs.models.Encryption; import com.azure.resourcemanager.avs.models.IdentitySource; import com.azure.resourcemanager.avs.models.InternetEnum; @@ -13,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a private cloud resource that may be updated. */ +/** + * The properties of a private cloud resource that may be updated. + */ @Fluent -public class PrivateCloudUpdateProperties { +public final class PrivateCloudUpdateProperties { /* * The default cluster used for management */ @@ -47,20 +50,29 @@ public class PrivateCloudUpdateProperties { private Encryption encryption; /* - * Array of additional networks noncontiguous with networkBlock. Networks must be unique and non-overlapping across - * VNet in your subscription, on-premise, and this privateCloud networkBlock attribute. Make sure the CIDR format - * conforms to (A.B.C.D/X). + * Array of additional networks noncontiguous with networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). */ @JsonProperty(value = "extendedNetworkBlocks") private List extendedNetworkBlocks; - /** Creates an instance of PrivateCloudUpdateProperties class. */ + /* + * The type of DNS zone to use. + */ + @JsonProperty(value = "dnsZoneType") + private DnsZoneType dnsZoneType; + + /** + * Creates an instance of PrivateCloudUpdateProperties class. + */ public PrivateCloudUpdateProperties() { } /** * Get the managementCluster property: The default cluster used for management. - * + * * @return the managementCluster value. */ public ManagementCluster managementCluster() { @@ -69,7 +81,7 @@ public ManagementCluster managementCluster() { /** * Set the managementCluster property: The default cluster used for management. - * + * * @param managementCluster the managementCluster value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -80,7 +92,7 @@ public PrivateCloudUpdateProperties withManagementCluster(ManagementCluster mana /** * Get the internet property: Connectivity to internet is enabled or disabled. - * + * * @return the internet value. */ public InternetEnum internet() { @@ -89,7 +101,7 @@ public InternetEnum internet() { /** * Set the internet property: Connectivity to internet is enabled or disabled. - * + * * @param internet the internet value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -100,7 +112,7 @@ public PrivateCloudUpdateProperties withInternet(InternetEnum internet) { /** * Get the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @return the identitySources value. */ public List identitySources() { @@ -109,7 +121,7 @@ public List identitySources() { /** * Set the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @param identitySources the identitySources value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -120,7 +132,7 @@ public PrivateCloudUpdateProperties withIdentitySources(List ide /** * Get the availability property: Properties describing how the cloud is distributed across availability zones. - * + * * @return the availability value. */ public AvailabilityProperties availability() { @@ -129,7 +141,7 @@ public AvailabilityProperties availability() { /** * Set the availability property: Properties describing how the cloud is distributed across availability zones. - * + * * @param availability the availability value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -140,7 +152,7 @@ public PrivateCloudUpdateProperties withAvailability(AvailabilityProperties avai /** * Get the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @return the encryption value. */ public Encryption encryption() { @@ -149,7 +161,7 @@ public Encryption encryption() { /** * Set the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @param encryption the encryption value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -160,9 +172,11 @@ public PrivateCloudUpdateProperties withEncryption(Encryption encryption) { /** * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * * @return the extendedNetworkBlocks value. */ public List extendedNetworkBlocks() { @@ -171,9 +185,11 @@ public List extendedNetworkBlocks() { /** * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -182,9 +198,29 @@ public PrivateCloudUpdateProperties withExtendedNetworkBlocks(List exten return this; } + /** + * Get the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. + */ + public DnsZoneType dnsZoneType() { + return this.dnsZoneType; + } + + /** + * Set the dnsZoneType property: The type of DNS zone to use. + * + * @param dnsZoneType the dnsZoneType value to set. + * @return the PrivateCloudUpdateProperties object itself. + */ + public PrivateCloudUpdateProperties withDnsZoneType(DnsZoneType dnsZoneType) { + this.dnsZoneType = dnsZoneType; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java index 00f004118165b..0a5dbcbe67542 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Subscription quotas. */ +/** + * Subscription quotas. + */ @Immutable public final class QuotaInner { /* @@ -26,13 +28,15 @@ public final class QuotaInner { @JsonProperty(value = "quotaEnabled", access = JsonProperty.Access.WRITE_ONLY) private QuotaEnabled quotaEnabled; - /** Creates an instance of QuotaInner class. */ - public QuotaInner() { + /** + * Creates an instance of QuotaInner class. + */ + private QuotaInner() { } /** * Get the hostsRemaining property: Remaining hosts quota by sku type. - * + * * @return the hostsRemaining value. */ public Map hostsRemaining() { @@ -41,7 +45,7 @@ public Map hostsRemaining() { /** * Get the quotaEnabled property: Host quota is active for current subscription. - * + * * @return the quotaEnabled value. */ public QuotaEnabled quotaEnabled() { @@ -50,7 +54,7 @@ public QuotaEnabled quotaEnabled() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java index 4c5a09b4b7ddf..ded591577ce9a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java @@ -1,40 +1,71 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.resourcemanager.avs.models.ScriptCmdletAudience; +import com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState; import com.azure.resourcemanager.avs.models.ScriptParameter; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A cmdlet available for script execution. */ +/** + * A cmdlet available for script execution. + */ @Immutable public final class ScriptCmdletInner extends ProxyResource { /* - * The properties of a script cmdlet resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private ScriptCmdletProperties innerProperties; - /** Creates an instance of ScriptCmdletInner class. */ - public ScriptCmdletInner() { + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ScriptCmdletInner class. + */ + private ScriptCmdletInner() { } /** - * Get the innerProperties property: The properties of a script cmdlet resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private ScriptCmdletProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ScriptCmdletProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the description property: Description of the scripts functionality. - * + * * @return the description value. */ public String description() { @@ -43,16 +74,26 @@ public String description() { /** * Get the timeout property: Recommended time limit for execution. - * + * * @return the timeout value. */ public String timeout() { return this.innerProperties() == null ? null : this.innerProperties().timeout(); } + /** + * Get the audience property: Specifies whether a script cmdlet is intended to be invoked only through automation or + * visible to customers. + * + * @return the audience value. + */ + public ScriptCmdletAudience audience() { + return this.innerProperties() == null ? null : this.innerProperties().audience(); + } + /** * Get the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ public List parameters() { @@ -61,7 +102,7 @@ public List parameters() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java index 2afbbba9fc907..f5ffa64bdb371 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java @@ -1,17 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.ScriptCmdletAudience; +import com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState; import com.azure.resourcemanager.avs.models.ScriptParameter; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of a pre-canned script. */ +/** + * Properties of a pre-canned script. + */ @Immutable public final class ScriptCmdletProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ScriptCmdletProvisioningState provisioningState; + /* * Description of the scripts functionality */ @@ -24,19 +34,36 @@ public final class ScriptCmdletProperties { @JsonProperty(value = "timeout", access = JsonProperty.Access.WRITE_ONLY) private String timeout; + /* + * Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers + */ + @JsonProperty(value = "audience", access = JsonProperty.Access.WRITE_ONLY) + private ScriptCmdletAudience audience; + /* * Parameters the script will accept */ @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) private List parameters; - /** Creates an instance of ScriptCmdletProperties class. */ - public ScriptCmdletProperties() { + /** + * Creates an instance of ScriptCmdletProperties class. + */ + private ScriptCmdletProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ScriptCmdletProvisioningState provisioningState() { + return this.provisioningState; } /** * Get the description property: Description of the scripts functionality. - * + * * @return the description value. */ public String description() { @@ -45,16 +72,26 @@ public String description() { /** * Get the timeout property: Recommended time limit for execution. - * + * * @return the timeout value. */ public String timeout() { return this.timeout; } + /** + * Get the audience property: Specifies whether a script cmdlet is intended to be invoked only through automation or + * visible to customers. + * + * @return the audience value. + */ + public ScriptCmdletAudience audience() { + return this.audience; + } + /** * Get the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ public List parameters() { @@ -63,7 +100,7 @@ public List parameters() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java index 763ed5ac9c455..198eed3a2d44c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,31 +14,50 @@ import java.util.List; import java.util.Map; -/** An instance of a script executed by a user - custom or AVS. */ +/** + * An instance of a script executed by a user - custom or AVS. + */ @Fluent public final class ScriptExecutionInner extends ProxyResource { /* - * The properties of a script execution resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private ScriptExecutionProperties innerProperties; - /** Creates an instance of ScriptExecutionInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ScriptExecutionInner class. + */ public ScriptExecutionInner() { } /** - * Get the innerProperties property: The properties of a script execution resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private ScriptExecutionProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @return the scriptCmdletId value. */ public String scriptCmdletId() { @@ -46,7 +66,7 @@ public String scriptCmdletId() { /** * Set the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @param scriptCmdletId the scriptCmdletId value to set. * @return the ScriptExecutionInner object itself. */ @@ -60,7 +80,7 @@ public ScriptExecutionInner withScriptCmdletId(String scriptCmdletId) { /** * Get the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ public List parameters() { @@ -69,7 +89,7 @@ public List parameters() { /** * Set the parameters property: Parameters the script will accept. - * + * * @param parameters the parameters value to set. * @return the ScriptExecutionInner object itself. */ @@ -84,7 +104,7 @@ public ScriptExecutionInner withParameters(List parame /** * Get the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @return the hiddenParameters value. */ public List hiddenParameters() { @@ -94,7 +114,7 @@ public List hiddenParameters() { /** * Set the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @param hiddenParameters the hiddenParameters value to set. * @return the ScriptExecutionInner object itself. */ @@ -107,9 +127,9 @@ public ScriptExecutionInner withHiddenParameters(List } /** - * Get the failureReason property: Error message if the script was able to run, but if the script itself had errors - * or powershell threw an exception. - * + * Get the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * * @return the failureReason value. */ public String failureReason() { @@ -117,9 +137,9 @@ public String failureReason() { } /** - * Set the failureReason property: Error message if the script was able to run, but if the script itself had errors - * or powershell threw an exception. - * + * Set the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * * @param failureReason the failureReason value to set. * @return the ScriptExecutionInner object itself. */ @@ -133,7 +153,7 @@ public ScriptExecutionInner withFailureReason(String failureReason) { /** * Get the timeout property: Time limit for execution. - * + * * @return the timeout value. */ public String timeout() { @@ -142,7 +162,7 @@ public String timeout() { /** * Set the timeout property: Time limit for execution. - * + * * @param timeout the timeout value to set. * @return the ScriptExecutionInner object itself. */ @@ -156,7 +176,7 @@ public ScriptExecutionInner withTimeout(String timeout) { /** * Get the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * + * * @return the retention value. */ public String retention() { @@ -165,7 +185,7 @@ public String retention() { /** * Set the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * + * * @param retention the retention value to set. * @return the ScriptExecutionInner object itself. */ @@ -179,7 +199,7 @@ public ScriptExecutionInner withRetention(String retention) { /** * Get the submittedAt property: Time the script execution was submitted. - * + * * @return the submittedAt value. */ public OffsetDateTime submittedAt() { @@ -188,7 +208,7 @@ public OffsetDateTime submittedAt() { /** * Get the startedAt property: Time the script execution was started. - * + * * @return the startedAt value. */ public OffsetDateTime startedAt() { @@ -197,7 +217,7 @@ public OffsetDateTime startedAt() { /** * Get the finishedAt property: Time the script execution was finished. - * + * * @return the finishedAt value. */ public OffsetDateTime finishedAt() { @@ -206,7 +226,7 @@ public OffsetDateTime finishedAt() { /** * Get the provisioningState property: The state of the script execution resource. - * + * * @return the provisioningState value. */ public ScriptExecutionProvisioningState provisioningState() { @@ -215,7 +235,7 @@ public ScriptExecutionProvisioningState provisioningState() { /** * Get the output property: Standard output stream from the powershell execution. - * + * * @return the output value. */ public List output() { @@ -224,7 +244,7 @@ public List output() { /** * Set the output property: Standard output stream from the powershell execution. - * + * * @param output the output value to set. * @return the ScriptExecutionInner object itself. */ @@ -238,7 +258,7 @@ public ScriptExecutionInner withOutput(List output) { /** * Get the namedOutputs property: User-defined dictionary. - * + * * @return the namedOutputs value. */ public Map namedOutputs() { @@ -247,7 +267,7 @@ public Map namedOutputs() { /** * Set the namedOutputs property: User-defined dictionary. - * + * * @param namedOutputs the namedOutputs value to set. * @return the ScriptExecutionInner object itself. */ @@ -261,7 +281,7 @@ public ScriptExecutionInner withNamedOutputs(Map namedOutputs) { /** * Get the information property: Standard information out stream from the powershell execution. - * + * * @return the information value. */ public List information() { @@ -270,7 +290,7 @@ public List information() { /** * Get the warnings property: Standard warning out stream from the powershell execution. - * + * * @return the warnings value. */ public List warnings() { @@ -279,7 +299,7 @@ public List warnings() { /** * Get the errors property: Standard error output stream from the powershell execution. - * + * * @return the errors value. */ public List errors() { @@ -288,7 +308,7 @@ public List errors() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java index 4242773e828eb..a42f199843f78 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -14,7 +14,9 @@ import java.util.List; import java.util.Map; -/** Properties of a user-invoked script. */ +/** + * Properties of a user-invoked script. + */ @Fluent public final class ScriptExecutionProperties { /* @@ -30,14 +32,15 @@ public final class ScriptExecutionProperties { private List parameters; /* - * Parameters that will be hidden/not visible to ARM, such as passwords and credentials + * Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials */ @JsonProperty(value = "hiddenParameters") private List hiddenParameters; /* - * Error message if the script was able to run, but if the script itself had errors or powershell threw an - * exception + * Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception */ @JsonProperty(value = "failureReason") private String failureReason; @@ -109,13 +112,15 @@ public final class ScriptExecutionProperties { @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private List errors; - /** Creates an instance of ScriptExecutionProperties class. */ + /** + * Creates an instance of ScriptExecutionProperties class. + */ public ScriptExecutionProperties() { } /** * Get the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @return the scriptCmdletId value. */ public String scriptCmdletId() { @@ -124,7 +129,7 @@ public String scriptCmdletId() { /** * Set the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @param scriptCmdletId the scriptCmdletId value to set. * @return the ScriptExecutionProperties object itself. */ @@ -135,7 +140,7 @@ public ScriptExecutionProperties withScriptCmdletId(String scriptCmdletId) { /** * Get the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ public List parameters() { @@ -144,7 +149,7 @@ public List parameters() { /** * Set the parameters property: Parameters the script will accept. - * + * * @param parameters the parameters value to set. * @return the ScriptExecutionProperties object itself. */ @@ -156,7 +161,7 @@ public ScriptExecutionProperties withParameters(List p /** * Get the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @return the hiddenParameters value. */ public List hiddenParameters() { @@ -166,7 +171,7 @@ public List hiddenParameters() { /** * Set the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @param hiddenParameters the hiddenParameters value to set. * @return the ScriptExecutionProperties object itself. */ @@ -176,9 +181,9 @@ public ScriptExecutionProperties withHiddenParameters(List output() { @@ -284,7 +289,7 @@ public List output() { /** * Set the output property: Standard output stream from the powershell execution. - * + * * @param output the output value to set. * @return the ScriptExecutionProperties object itself. */ @@ -295,7 +300,7 @@ public ScriptExecutionProperties withOutput(List output) { /** * Get the namedOutputs property: User-defined dictionary. - * + * * @return the namedOutputs value. */ public Map namedOutputs() { @@ -304,7 +309,7 @@ public Map namedOutputs() { /** * Set the namedOutputs property: User-defined dictionary. - * + * * @param namedOutputs the namedOutputs value to set. * @return the ScriptExecutionProperties object itself. */ @@ -315,7 +320,7 @@ public ScriptExecutionProperties withNamedOutputs(Map namedOutpu /** * Get the information property: Standard information out stream from the powershell execution. - * + * * @return the information value. */ public List information() { @@ -324,7 +329,7 @@ public List information() { /** * Get the warnings property: Standard warning out stream from the powershell execution. - * + * * @return the warnings value. */ public List warnings() { @@ -333,7 +338,7 @@ public List warnings() { /** * Get the errors property: Standard error output stream from the powershell execution. - * + * * @return the errors value. */ public List errors() { @@ -342,7 +347,7 @@ public List errors() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -353,10 +358,9 @@ public void validate() { hiddenParameters().forEach(e -> e.validate()); } if (timeout() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property timeout in model ScriptExecutionProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property timeout in model ScriptExecutionProperties")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java index f6a2efc4fb89e..4cc0eecab0075 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java @@ -1,38 +1,68 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.resourcemanager.avs.models.ScriptPackageProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Script Package resources available for execution. */ +/** + * Script Package resources available for execution. + */ @Immutable public final class ScriptPackageInner extends ProxyResource { /* - * ScriptPackage resource properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private ScriptPackageProperties innerProperties; - /** Creates an instance of ScriptPackageInner class. */ - public ScriptPackageInner() { + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ScriptPackageInner class. + */ + private ScriptPackageInner() { } /** - * Get the innerProperties property: ScriptPackage resource properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private ScriptPackageProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ScriptPackageProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the description property: User friendly description of the package. - * + * * @return the description value. */ public String description() { @@ -41,7 +71,7 @@ public String description() { /** * Get the version property: Module version. - * + * * @return the version value. */ public String version() { @@ -50,7 +80,7 @@ public String version() { /** * Get the company property: Company that created and supports the package. - * + * * @return the company value. */ public String company() { @@ -59,7 +89,7 @@ public String company() { /** * Get the uri property: Link to support by the package vendor. - * + * * @return the uri value. */ public String uri() { @@ -68,7 +98,7 @@ public String uri() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java index 57f3734d7cb3d..105e4c3dc3fd2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java @@ -1,15 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.ScriptPackageProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of a Script Package subresource. */ +/** + * Properties of a Script Package subresource. + */ @Immutable public final class ScriptPackageProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ScriptPackageProvisioningState provisioningState; + /* * User friendly description of the package */ @@ -34,13 +43,24 @@ public final class ScriptPackageProperties { @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY) private String uri; - /** Creates an instance of ScriptPackageProperties class. */ - public ScriptPackageProperties() { + /** + * Creates an instance of ScriptPackageProperties class. + */ + private ScriptPackageProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ScriptPackageProvisioningState provisioningState() { + return this.provisioningState; } /** * Get the description property: User friendly description of the package. - * + * * @return the description value. */ public String description() { @@ -49,7 +69,7 @@ public String description() { /** * Get the version property: Module version. - * + * * @return the version value. */ public String version() { @@ -58,7 +78,7 @@ public String version() { /** * Get the company property: Company that created and supports the package. - * + * * @return the company value. */ public String company() { @@ -67,7 +87,7 @@ public String company() { /** * Get the uri property: Link to support by the package vendor. - * + * * @return the uri value. */ public String uri() { @@ -76,7 +96,7 @@ public String uri() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java index 15806ec46fd81..9607a384a54ca 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -8,7 +8,9 @@ import com.azure.resourcemanager.avs.models.TrialStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Subscription trial availability. */ +/** + * Subscription trial availability. + */ @Immutable public final class TrialInner { /* @@ -23,13 +25,15 @@ public final class TrialInner { @JsonProperty(value = "availableHosts", access = JsonProperty.Access.WRITE_ONLY) private Integer availableHosts; - /** Creates an instance of TrialInner class. */ - public TrialInner() { + /** + * Creates an instance of TrialInner class. + */ + private TrialInner() { } /** * Get the status property: Trial status. - * + * * @return the status value. */ public TrialStatus status() { @@ -38,7 +42,7 @@ public TrialStatus status() { /** * Get the availableHosts property: Number of trial hosts available. - * + * * @return the availableHosts value. */ public Integer availableHosts() { @@ -47,7 +51,7 @@ public Integer availableHosts() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java index 9225ad47331e7..c83e75c872caa 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 @@ -1,39 +1,69 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.resourcemanager.avs.models.VirtualMachineProvisioningState; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Virtual Machine. */ +/** + * Virtual Machine. + */ @Immutable public final class VirtualMachineInner extends ProxyResource { /* - * Virtual machine properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private VirtualMachineProperties innerProperties; - /** Creates an instance of VirtualMachineInner class. */ - public VirtualMachineInner() { + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of VirtualMachineInner class. + */ + private VirtualMachineInner() { } /** - * Get the innerProperties property: Virtual machine properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private VirtualMachineProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public VirtualMachineProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the displayName property: Display name of the VM. - * + * * @return the displayName value. */ public String displayName() { @@ -42,7 +72,7 @@ public String displayName() { /** * Get the moRefId property: Virtual machine managed object reference id. - * + * * @return the moRefId value. */ public String moRefId() { @@ -51,7 +81,7 @@ public String moRefId() { /** * Get the folderPath property: Path to virtual machine's folder starting from datacenter virtual machine folder. - * + * * @return the folderPath value. */ public String folderPath() { @@ -60,7 +90,7 @@ public String folderPath() { /** * Get the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @return the restrictMovement value. */ public VirtualMachineRestrictMovementState restrictMovement() { @@ -69,7 +99,7 @@ public VirtualMachineRestrictMovementState restrictMovement() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java index d0d91ff27ff32..bfbdda084033b 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 @@ -1,16 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Virtual Machine Properties. */ +/** + * Virtual Machine Properties. + */ @Immutable public final class VirtualMachineProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private VirtualMachineProvisioningState provisioningState; + /* * Display name of the VM. */ @@ -35,13 +44,24 @@ public final class VirtualMachineProperties { @JsonProperty(value = "restrictMovement", access = JsonProperty.Access.WRITE_ONLY) private VirtualMachineRestrictMovementState restrictMovement; - /** Creates an instance of VirtualMachineProperties class. */ - public VirtualMachineProperties() { + /** + * Creates an instance of VirtualMachineProperties class. + */ + private VirtualMachineProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public VirtualMachineProvisioningState provisioningState() { + return this.provisioningState; } /** * Get the displayName property: Display name of the VM. - * + * * @return the displayName value. */ public String displayName() { @@ -50,7 +70,7 @@ public String displayName() { /** * Get the moRefId property: Virtual machine managed object reference id. - * + * * @return the moRefId value. */ public String moRefId() { @@ -59,7 +79,7 @@ public String moRefId() { /** * Get the folderPath property: Path to virtual machine's folder starting from datacenter virtual machine folder. - * + * * @return the folderPath value. */ public String folderPath() { @@ -68,7 +88,7 @@ public String folderPath() { /** * Get the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @return the restrictMovement value. */ public VirtualMachineRestrictMovementState restrictMovement() { @@ -77,7 +97,7 @@ public VirtualMachineRestrictMovementState restrictMovement() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java index a21ac6609a151..052c6d57ad554 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java @@ -1,30 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX DHCP. */ +/** + * NSX DHCP. + */ @Fluent public final class WorkloadNetworkDhcpInner extends ProxyResource { /* - * DHCP properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkDhcpEntity properties; - /** Creates an instance of WorkloadNetworkDhcpInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkDhcpInner class. + */ public WorkloadNetworkDhcpInner() { } /** - * Get the properties property: DHCP properties. - * + * Get the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ public WorkloadNetworkDhcpEntity properties() { @@ -32,8 +43,8 @@ public WorkloadNetworkDhcpEntity properties() { } /** - * Set the properties property: DHCP properties. - * + * Set the properties property: The resource-specific properties for this resource. + * * @param properties the properties value to set. * @return the WorkloadNetworkDhcpInner object itself. */ @@ -42,9 +53,18 @@ public WorkloadNetworkDhcpInner withProperties(WorkloadNetworkDhcpEntity propert return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java index bc59a6f148cfb..85e9ec01288ef 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java @@ -1,42 +1,62 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import com.azure.resourcemanager.avs.models.DnsServiceStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX DNS Service. */ +/** + * NSX DNS Service. + */ @Fluent public final class WorkloadNetworkDnsServiceInner extends ProxyResource { /* - * DNS Service properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkDnsServiceProperties innerProperties; - /** Creates an instance of WorkloadNetworkDnsServiceInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkDnsServiceInner class. + */ public WorkloadNetworkDnsServiceInner() { } /** - * Get the innerProperties property: DNS Service properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkDnsServiceProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the DNS Service. - * + * * @return the displayName value. */ public String displayName() { @@ -45,7 +65,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DNS Service. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -59,7 +79,7 @@ public WorkloadNetworkDnsServiceInner withDisplayName(String displayName) { /** * Get the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @return the dnsServiceIp value. */ public String dnsServiceIp() { @@ -68,7 +88,7 @@ public String dnsServiceIp() { /** * Set the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @param dnsServiceIp the dnsServiceIp value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -82,7 +102,7 @@ public WorkloadNetworkDnsServiceInner withDnsServiceIp(String dnsServiceIp) { /** * Get the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @return the defaultDnsZone value. */ public String defaultDnsZone() { @@ -91,7 +111,7 @@ public String defaultDnsZone() { /** * Set the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @param defaultDnsZone the defaultDnsZone value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -105,7 +125,7 @@ public WorkloadNetworkDnsServiceInner withDefaultDnsZone(String defaultDnsZone) /** * Get the fqdnZones property: FQDN zones of the DNS Service. - * + * * @return the fqdnZones value. */ public List fqdnZones() { @@ -114,7 +134,7 @@ public List fqdnZones() { /** * Set the fqdnZones property: FQDN zones of the DNS Service. - * + * * @param fqdnZones the fqdnZones value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -128,7 +148,7 @@ public WorkloadNetworkDnsServiceInner withFqdnZones(List fqdnZones) { /** * Get the logLevel property: DNS Service log level. - * + * * @return the logLevel value. */ public DnsServiceLogLevelEnum logLevel() { @@ -137,7 +157,7 @@ public DnsServiceLogLevelEnum logLevel() { /** * Set the logLevel property: DNS Service log level. - * + * * @param logLevel the logLevel value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -151,7 +171,7 @@ public WorkloadNetworkDnsServiceInner withLogLevel(DnsServiceLogLevelEnum logLev /** * Get the status property: DNS Service status. - * + * * @return the status value. */ public DnsServiceStatusEnum status() { @@ -160,7 +180,7 @@ public DnsServiceStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDnsServiceProvisioningState provisioningState() { @@ -169,7 +189,7 @@ public WorkloadNetworkDnsServiceProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -178,7 +198,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -192,7 +212,7 @@ public WorkloadNetworkDnsServiceInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java index 6561cce4f2736..28dccf51ed7e4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX DNS Service Properties. */ +/** + * NSX DNS Service Properties. + */ @Fluent public final class WorkloadNetworkDnsServiceProperties { /* @@ -62,13 +64,15 @@ public final class WorkloadNetworkDnsServiceProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkDnsServiceProperties class. */ + /** + * Creates an instance of WorkloadNetworkDnsServiceProperties class. + */ public WorkloadNetworkDnsServiceProperties() { } /** * Get the displayName property: Display name of the DNS Service. - * + * * @return the displayName value. */ public String displayName() { @@ -77,7 +81,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DNS Service. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -88,7 +92,7 @@ public WorkloadNetworkDnsServiceProperties withDisplayName(String displayName) { /** * Get the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @return the dnsServiceIp value. */ public String dnsServiceIp() { @@ -97,7 +101,7 @@ public String dnsServiceIp() { /** * Set the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @param dnsServiceIp the dnsServiceIp value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -108,7 +112,7 @@ public WorkloadNetworkDnsServiceProperties withDnsServiceIp(String dnsServiceIp) /** * Get the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @return the defaultDnsZone value. */ public String defaultDnsZone() { @@ -117,7 +121,7 @@ public String defaultDnsZone() { /** * Set the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @param defaultDnsZone the defaultDnsZone value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -128,7 +132,7 @@ public WorkloadNetworkDnsServiceProperties withDefaultDnsZone(String defaultDnsZ /** * Get the fqdnZones property: FQDN zones of the DNS Service. - * + * * @return the fqdnZones value. */ public List fqdnZones() { @@ -137,7 +141,7 @@ public List fqdnZones() { /** * Set the fqdnZones property: FQDN zones of the DNS Service. - * + * * @param fqdnZones the fqdnZones value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -148,7 +152,7 @@ public WorkloadNetworkDnsServiceProperties withFqdnZones(List fqdnZones) /** * Get the logLevel property: DNS Service log level. - * + * * @return the logLevel value. */ public DnsServiceLogLevelEnum logLevel() { @@ -157,7 +161,7 @@ public DnsServiceLogLevelEnum logLevel() { /** * Set the logLevel property: DNS Service log level. - * + * * @param logLevel the logLevel value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -168,7 +172,7 @@ public WorkloadNetworkDnsServiceProperties withLogLevel(DnsServiceLogLevelEnum l /** * Get the status property: DNS Service status. - * + * * @return the status value. */ public DnsServiceStatusEnum status() { @@ -177,7 +181,7 @@ public DnsServiceStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDnsServiceProvisioningState provisioningState() { @@ -186,7 +190,7 @@ public WorkloadNetworkDnsServiceProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -195,7 +199,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -206,7 +210,7 @@ public WorkloadNetworkDnsServiceProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java index ae318d1635901..ec9bc3a28e2e4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java @@ -1,40 +1,60 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX DNS Zone. */ +/** + * NSX DNS Zone. + */ @Fluent public final class WorkloadNetworkDnsZoneInner extends ProxyResource { /* - * DNS Zone properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkDnsZoneProperties innerProperties; - /** Creates an instance of WorkloadNetworkDnsZoneInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkDnsZoneInner class. + */ public WorkloadNetworkDnsZoneInner() { } /** - * Get the innerProperties property: DNS Zone properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkDnsZoneProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the DNS Zone. - * + * * @return the displayName value. */ public String displayName() { @@ -43,7 +63,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DNS Zone. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -57,7 +77,7 @@ public WorkloadNetworkDnsZoneInner withDisplayName(String displayName) { /** * Get the domain property: Domain names of the DNS Zone. - * + * * @return the domain value. */ public List domain() { @@ -66,7 +86,7 @@ public List domain() { /** * Set the domain property: Domain names of the DNS Zone. - * + * * @param domain the domain value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -80,7 +100,7 @@ public WorkloadNetworkDnsZoneInner withDomain(List domain) { /** * Get the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @return the dnsServerIps value. */ public List dnsServerIps() { @@ -89,7 +109,7 @@ public List dnsServerIps() { /** * Set the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @param dnsServerIps the dnsServerIps value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -103,7 +123,7 @@ public WorkloadNetworkDnsZoneInner withDnsServerIps(List dnsServerIps) { /** * Get the sourceIp property: Source IP of the DNS Zone. - * + * * @return the sourceIp value. */ public String sourceIp() { @@ -112,7 +132,7 @@ public String sourceIp() { /** * Set the sourceIp property: Source IP of the DNS Zone. - * + * * @param sourceIp the sourceIp value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -126,20 +146,20 @@ public WorkloadNetworkDnsZoneInner withSourceIp(String sourceIp) { /** * Get the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @return the dnsServices value. */ - public Long dnsServices() { + public Integer dnsServices() { return this.innerProperties() == null ? null : this.innerProperties().dnsServices(); } /** * Set the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @param dnsServices the dnsServices value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ - public WorkloadNetworkDnsZoneInner withDnsServices(Long dnsServices) { + public WorkloadNetworkDnsZoneInner withDnsServices(Integer dnsServices) { if (this.innerProperties() == null) { this.innerProperties = new WorkloadNetworkDnsZoneProperties(); } @@ -149,7 +169,7 @@ public WorkloadNetworkDnsZoneInner withDnsServices(Long dnsServices) { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDnsZoneProvisioningState provisioningState() { @@ -158,7 +178,7 @@ public WorkloadNetworkDnsZoneProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -167,7 +187,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -181,7 +201,7 @@ public WorkloadNetworkDnsZoneInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java index 4fe34edcf6698..f51f56e0ac87d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX DNS Zone Properties. */ +/** + * NSX DNS Zone Properties. + */ @Fluent public final class WorkloadNetworkDnsZoneProperties { /* @@ -40,7 +42,7 @@ public final class WorkloadNetworkDnsZoneProperties { * Number of DNS Services using the DNS zone. */ @JsonProperty(value = "dnsServices") - private Long dnsServices; + private Integer dnsServices; /* * The provisioning state @@ -54,13 +56,15 @@ public final class WorkloadNetworkDnsZoneProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkDnsZoneProperties class. */ + /** + * Creates an instance of WorkloadNetworkDnsZoneProperties class. + */ public WorkloadNetworkDnsZoneProperties() { } /** * Get the displayName property: Display name of the DNS Zone. - * + * * @return the displayName value. */ public String displayName() { @@ -69,7 +73,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DNS Zone. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -80,7 +84,7 @@ public WorkloadNetworkDnsZoneProperties withDisplayName(String displayName) { /** * Get the domain property: Domain names of the DNS Zone. - * + * * @return the domain value. */ public List domain() { @@ -89,7 +93,7 @@ public List domain() { /** * Set the domain property: Domain names of the DNS Zone. - * + * * @param domain the domain value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -100,7 +104,7 @@ public WorkloadNetworkDnsZoneProperties withDomain(List domain) { /** * Get the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @return the dnsServerIps value. */ public List dnsServerIps() { @@ -109,7 +113,7 @@ public List dnsServerIps() { /** * Set the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @param dnsServerIps the dnsServerIps value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -120,7 +124,7 @@ public WorkloadNetworkDnsZoneProperties withDnsServerIps(List dnsServerI /** * Get the sourceIp property: Source IP of the DNS Zone. - * + * * @return the sourceIp value. */ public String sourceIp() { @@ -129,7 +133,7 @@ public String sourceIp() { /** * Set the sourceIp property: Source IP of the DNS Zone. - * + * * @param sourceIp the sourceIp value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -140,27 +144,27 @@ public WorkloadNetworkDnsZoneProperties withSourceIp(String sourceIp) { /** * Get the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @return the dnsServices value. */ - public Long dnsServices() { + public Integer dnsServices() { return this.dnsServices; } /** * Set the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @param dnsServices the dnsServices value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ - public WorkloadNetworkDnsZoneProperties withDnsServices(Long dnsServices) { + public WorkloadNetworkDnsZoneProperties withDnsServices(Integer dnsServices) { this.dnsServices = dnsServices; return this; } /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDnsZoneProvisioningState provisioningState() { @@ -169,7 +173,7 @@ public WorkloadNetworkDnsZoneProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -178,7 +182,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -189,7 +193,7 @@ public WorkloadNetworkDnsZoneProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java index 8058d5d6ae455..701399d50eb1a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java @@ -1,29 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Gateway. */ -@Fluent +/** + * NSX Gateway. + */ +@Immutable public final class WorkloadNetworkGatewayInner extends ProxyResource { /* - * Gateway properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkGatewayProperties innerProperties; - /** Creates an instance of WorkloadNetworkGatewayInner class. */ - public WorkloadNetworkGatewayInner() { + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkGatewayInner class. + */ + private WorkloadNetworkGatewayInner() { } /** - * Get the innerProperties property: Gateway properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkGatewayProperties innerProperties() { @@ -31,31 +43,35 @@ private WorkloadNetworkGatewayProperties innerProperties() { } /** - * Get the displayName property: Display name of the DHCP entity. - * - * @return the displayName value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); + public SystemData systemData() { + return this.systemData; } /** - * Set the displayName property: Display name of the DHCP entity. - * - * @param displayName the displayName value to set. - * @return the WorkloadNetworkGatewayInner object itself. + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. */ - public WorkloadNetworkGatewayInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadNetworkGatewayProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the displayName property: Display name of the DHCP entity. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); } /** * Get the path property: NSX Gateway Path. - * + * * @return the path value. */ public String path() { @@ -64,7 +80,7 @@ public String path() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java index de6654a61cbfa..29c2675dd1ba7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java @@ -1,15 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of a NSX Gateway. */ -@Fluent +/** + * Properties of a NSX Gateway. + */ +@Immutable public final class WorkloadNetworkGatewayProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkProvisioningState provisioningState; + /* * Display name of the DHCP entity. */ @@ -22,33 +31,33 @@ public final class WorkloadNetworkGatewayProperties { @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) private String path; - /** Creates an instance of WorkloadNetworkGatewayProperties class. */ - public WorkloadNetworkGatewayProperties() { + /** + * Creates an instance of WorkloadNetworkGatewayProperties class. + */ + private WorkloadNetworkGatewayProperties() { } /** - * Get the displayName property: Display name of the DHCP entity. - * - * @return the displayName value. + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. */ - public String displayName() { - return this.displayName; + public WorkloadNetworkProvisioningState provisioningState() { + return this.provisioningState; } /** - * Set the displayName property: Display name of the DHCP entity. - * - * @param displayName the displayName value to set. - * @return the WorkloadNetworkGatewayProperties object itself. + * Get the displayName property: Display name of the DHCP entity. + * + * @return the displayName value. */ - public WorkloadNetworkGatewayProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; + public String displayName() { + return this.displayName; } /** * Get the path property: NSX Gateway Path. - * + * * @return the path value. */ public String path() { @@ -57,7 +66,7 @@ public String path() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java index 124c2f72d258c..b90a08e140201 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java @@ -1,24 +1,73 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.resourcemanager.avs.models.WorkloadNetworkProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; -/** Workload Network. */ +/** + * Workload Network. + */ @Immutable public final class WorkloadNetworkInner extends ProxyResource { - /** Creates an instance of WorkloadNetworkInner class. */ - public WorkloadNetworkInner() { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private WorkloadNetworkProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkInner class. + */ + private WorkloadNetworkInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private WorkloadNetworkProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java index 6d2b0944985b0..7e8edbea8eec4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java @@ -1,41 +1,61 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.PortMirroringStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Port Mirroring. */ +/** + * NSX Port Mirroring. + */ @Fluent public final class WorkloadNetworkPortMirroringInner extends ProxyResource { /* - * Port Mirroring Properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkPortMirroringProperties innerProperties; - /** Creates an instance of WorkloadNetworkPortMirroringInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkPortMirroringInner class. + */ public WorkloadNetworkPortMirroringInner() { } /** - * Get the innerProperties property: Port Mirroring Properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkPortMirroringProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the port mirroring profile. - * + * * @return the displayName value. */ public String displayName() { @@ -44,7 +64,7 @@ public String displayName() { /** * Set the displayName property: Display name of the port mirroring profile. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -58,7 +78,7 @@ public WorkloadNetworkPortMirroringInner withDisplayName(String displayName) { /** * Get the direction property: Direction of port mirroring profile. - * + * * @return the direction value. */ public PortMirroringDirectionEnum direction() { @@ -67,7 +87,7 @@ public PortMirroringDirectionEnum direction() { /** * Set the direction property: Direction of port mirroring profile. - * + * * @param direction the direction value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -81,7 +101,7 @@ public WorkloadNetworkPortMirroringInner withDirection(PortMirroringDirectionEnu /** * Get the source property: Source VM Group. - * + * * @return the source value. */ public String source() { @@ -90,7 +110,7 @@ public String source() { /** * Set the source property: Source VM Group. - * + * * @param source the source value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -104,7 +124,7 @@ public WorkloadNetworkPortMirroringInner withSource(String source) { /** * Get the destination property: Destination VM Group. - * + * * @return the destination value. */ public String destination() { @@ -113,7 +133,7 @@ public String destination() { /** * Set the destination property: Destination VM Group. - * + * * @param destination the destination value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -127,7 +147,7 @@ public WorkloadNetworkPortMirroringInner withDestination(String destination) { /** * Get the status property: Port Mirroring Status. - * + * * @return the status value. */ public PortMirroringStatusEnum status() { @@ -136,7 +156,7 @@ public PortMirroringStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkPortMirroringProvisioningState provisioningState() { @@ -145,7 +165,7 @@ public WorkloadNetworkPortMirroringProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -154,7 +174,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -168,7 +188,7 @@ public WorkloadNetworkPortMirroringInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java index 1c200f9e0c752..d24693492c75f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -10,7 +10,9 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Port Mirroring Properties. */ +/** + * NSX Port Mirroring Properties. + */ @Fluent public final class WorkloadNetworkPortMirroringProperties { /* @@ -55,13 +57,15 @@ public final class WorkloadNetworkPortMirroringProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkPortMirroringProperties class. */ + /** + * Creates an instance of WorkloadNetworkPortMirroringProperties class. + */ public WorkloadNetworkPortMirroringProperties() { } /** * Get the displayName property: Display name of the port mirroring profile. - * + * * @return the displayName value. */ public String displayName() { @@ -70,7 +74,7 @@ public String displayName() { /** * Set the displayName property: Display name of the port mirroring profile. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -81,7 +85,7 @@ public WorkloadNetworkPortMirroringProperties withDisplayName(String displayName /** * Get the direction property: Direction of port mirroring profile. - * + * * @return the direction value. */ public PortMirroringDirectionEnum direction() { @@ -90,7 +94,7 @@ public PortMirroringDirectionEnum direction() { /** * Set the direction property: Direction of port mirroring profile. - * + * * @param direction the direction value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -101,7 +105,7 @@ public WorkloadNetworkPortMirroringProperties withDirection(PortMirroringDirecti /** * Get the source property: Source VM Group. - * + * * @return the source value. */ public String source() { @@ -110,7 +114,7 @@ public String source() { /** * Set the source property: Source VM Group. - * + * * @param source the source value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -121,7 +125,7 @@ public WorkloadNetworkPortMirroringProperties withSource(String source) { /** * Get the destination property: Destination VM Group. - * + * * @return the destination value. */ public String destination() { @@ -130,7 +134,7 @@ public String destination() { /** * Set the destination property: Destination VM Group. - * + * * @param destination the destination value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -141,7 +145,7 @@ public WorkloadNetworkPortMirroringProperties withDestination(String destination /** * Get the status property: Port Mirroring Status. - * + * * @return the status value. */ public PortMirroringStatusEnum status() { @@ -150,7 +154,7 @@ public PortMirroringStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkPortMirroringProvisioningState provisioningState() { @@ -159,7 +163,7 @@ public WorkloadNetworkPortMirroringProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -168,7 +172,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -179,7 +183,7 @@ public WorkloadNetworkPortMirroringProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java new file mode 100644 index 0000000000000..75cce1e0e5ee4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a workload network. + */ +@Immutable +public final class WorkloadNetworkProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkProvisioningState provisioningState; + + /** + * Creates an instance of WorkloadNetworkProperties class. + */ + private WorkloadNetworkProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public WorkloadNetworkProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java index 63ae633dbfed4..48b6f2aced4f8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java @@ -1,39 +1,59 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Public IP Block. */ +/** + * NSX Public IP Block. + */ @Fluent public final class WorkloadNetworkPublicIpInner extends ProxyResource { /* - * Public IP Block properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") - private WorkloadNetworkPublicIpProperties innerProperties; + private WorkloadNetworkPublicIPProperties innerProperties; - /** Creates an instance of WorkloadNetworkPublicIpInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkPublicIpInner class. + */ public WorkloadNetworkPublicIpInner() { } /** - * Get the innerProperties property: Public IP Block properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ - private WorkloadNetworkPublicIpProperties innerProperties() { + private WorkloadNetworkPublicIPProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the Public IP Block. - * + * * @return the displayName value. */ public String displayName() { @@ -42,13 +62,13 @@ public String displayName() { /** * Set the displayName property: Display name of the Public IP Block. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkPublicIpInner object itself. */ public WorkloadNetworkPublicIpInner withDisplayName(String displayName) { if (this.innerProperties() == null) { - this.innerProperties = new WorkloadNetworkPublicIpProperties(); + this.innerProperties = new WorkloadNetworkPublicIPProperties(); } this.innerProperties().withDisplayName(displayName); return this; @@ -56,7 +76,7 @@ public WorkloadNetworkPublicIpInner withDisplayName(String displayName) { /** * Get the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @return the numberOfPublicIPs value. */ public Long numberOfPublicIPs() { @@ -65,30 +85,30 @@ public Long numberOfPublicIPs() { /** * Set the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @param numberOfPublicIPs the numberOfPublicIPs value to set. * @return the WorkloadNetworkPublicIpInner object itself. */ public WorkloadNetworkPublicIpInner withNumberOfPublicIPs(Long numberOfPublicIPs) { if (this.innerProperties() == null) { - this.innerProperties = new WorkloadNetworkPublicIpProperties(); + this.innerProperties = new WorkloadNetworkPublicIPProperties(); } this.innerProperties().withNumberOfPublicIPs(numberOfPublicIPs); return this; } /** - * Get the publicIpBlock property: CIDR Block of the Public IP Block. - * - * @return the publicIpBlock value. + * Get the publicIPBlock property: CIDR Block of the Public IP Block. + * + * @return the publicIPBlock value. */ - public String publicIpBlock() { - return this.innerProperties() == null ? null : this.innerProperties().publicIpBlock(); + public String publicIPBlock() { + return this.innerProperties() == null ? null : this.innerProperties().publicIPBlock(); } /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkPublicIpProvisioningState provisioningState() { @@ -97,7 +117,7 @@ public WorkloadNetworkPublicIpProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java index eb0048ccb84d1..0372329057342 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -8,9 +8,11 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Public IP Block Properties. */ +/** + * NSX Public IP Block Properties. + */ @Fluent -public final class WorkloadNetworkPublicIpProperties { +public final class WorkloadNetworkPublicIPProperties { /* * Display name of the Public IP Block. */ @@ -27,7 +29,7 @@ public final class WorkloadNetworkPublicIpProperties { * CIDR Block of the Public IP Block. */ @JsonProperty(value = "publicIPBlock", access = JsonProperty.Access.WRITE_ONLY) - private String publicIpBlock; + private String publicIPBlock; /* * The provisioning state @@ -35,13 +37,15 @@ public final class WorkloadNetworkPublicIpProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkPublicIpProvisioningState provisioningState; - /** Creates an instance of WorkloadNetworkPublicIpProperties class. */ - public WorkloadNetworkPublicIpProperties() { + /** + * Creates an instance of WorkloadNetworkPublicIPProperties class. + */ + public WorkloadNetworkPublicIPProperties() { } /** * Get the displayName property: Display name of the Public IP Block. - * + * * @return the displayName value. */ public String displayName() { @@ -50,18 +54,18 @@ public String displayName() { /** * Set the displayName property: Display name of the Public IP Block. - * + * * @param displayName the displayName value to set. - * @return the WorkloadNetworkPublicIpProperties object itself. + * @return the WorkloadNetworkPublicIPProperties object itself. */ - public WorkloadNetworkPublicIpProperties withDisplayName(String displayName) { + public WorkloadNetworkPublicIPProperties withDisplayName(String displayName) { this.displayName = displayName; return this; } /** * Get the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @return the numberOfPublicIPs value. */ public Long numberOfPublicIPs() { @@ -70,27 +74,27 @@ public Long numberOfPublicIPs() { /** * Set the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @param numberOfPublicIPs the numberOfPublicIPs value to set. - * @return the WorkloadNetworkPublicIpProperties object itself. + * @return the WorkloadNetworkPublicIPProperties object itself. */ - public WorkloadNetworkPublicIpProperties withNumberOfPublicIPs(Long numberOfPublicIPs) { + public WorkloadNetworkPublicIPProperties withNumberOfPublicIPs(Long numberOfPublicIPs) { this.numberOfPublicIPs = numberOfPublicIPs; return this; } /** - * Get the publicIpBlock property: CIDR Block of the Public IP Block. - * - * @return the publicIpBlock value. + * Get the publicIPBlock property: CIDR Block of the Public IP Block. + * + * @return the publicIPBlock value. */ - public String publicIpBlock() { - return this.publicIpBlock; + public String publicIPBlock() { + return this.publicIPBlock; } /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkPublicIpProvisioningState provisioningState() { @@ -99,7 +103,7 @@ public WorkloadNetworkPublicIpProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java index e21afbe563835..d4ab9a5e102b4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.SegmentStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState; @@ -13,31 +14,50 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX Segment. */ +/** + * NSX Segment. + */ @Fluent public final class WorkloadNetworkSegmentInner extends ProxyResource { /* - * The properties of a Workload Segment proxy resource. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkSegmentProperties innerProperties; - /** Creates an instance of WorkloadNetworkSegmentInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkSegmentInner class. + */ public WorkloadNetworkSegmentInner() { } /** - * Get the innerProperties property: The properties of a Workload Segment proxy resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkSegmentProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the segment. - * + * * @return the displayName value. */ public String displayName() { @@ -46,7 +66,7 @@ public String displayName() { /** * Set the displayName property: Display name of the segment. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkSegmentInner object itself. */ @@ -60,7 +80,7 @@ public WorkloadNetworkSegmentInner withDisplayName(String displayName) { /** * Get the connectedGateway property: Gateway which to connect segment to. - * + * * @return the connectedGateway value. */ public String connectedGateway() { @@ -69,7 +89,7 @@ public String connectedGateway() { /** * Set the connectedGateway property: Gateway which to connect segment to. - * + * * @param connectedGateway the connectedGateway value to set. * @return the WorkloadNetworkSegmentInner object itself. */ @@ -83,7 +103,7 @@ public WorkloadNetworkSegmentInner withConnectedGateway(String connectedGateway) /** * Get the subnet property: Subnet which to connect segment to. - * + * * @return the subnet value. */ public WorkloadNetworkSegmentSubnet subnet() { @@ -92,7 +112,7 @@ public WorkloadNetworkSegmentSubnet subnet() { /** * Set the subnet property: Subnet which to connect segment to. - * + * * @param subnet the subnet value to set. * @return the WorkloadNetworkSegmentInner object itself. */ @@ -106,7 +126,7 @@ public WorkloadNetworkSegmentInner withSubnet(WorkloadNetworkSegmentSubnet subne /** * Get the portVif property: Port Vif which segment is associated with. - * + * * @return the portVif value. */ public List portVif() { @@ -115,7 +135,7 @@ public List portVif() { /** * Get the status property: Segment status. - * + * * @return the status value. */ public SegmentStatusEnum status() { @@ -124,7 +144,7 @@ public SegmentStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkSegmentProvisioningState provisioningState() { @@ -133,7 +153,7 @@ public WorkloadNetworkSegmentProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -142,7 +162,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkSegmentInner object itself. */ @@ -156,7 +176,7 @@ public WorkloadNetworkSegmentInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java index 56f1eff1540da..9314e189b6392 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX Segment Properties. */ +/** + * NSX Segment Properties. + */ @Fluent public final class WorkloadNetworkSegmentProperties { /* @@ -57,13 +59,15 @@ public final class WorkloadNetworkSegmentProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkSegmentProperties class. */ + /** + * Creates an instance of WorkloadNetworkSegmentProperties class. + */ public WorkloadNetworkSegmentProperties() { } /** * Get the displayName property: Display name of the segment. - * + * * @return the displayName value. */ public String displayName() { @@ -72,7 +76,7 @@ public String displayName() { /** * Set the displayName property: Display name of the segment. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkSegmentProperties object itself. */ @@ -83,7 +87,7 @@ public WorkloadNetworkSegmentProperties withDisplayName(String displayName) { /** * Get the connectedGateway property: Gateway which to connect segment to. - * + * * @return the connectedGateway value. */ public String connectedGateway() { @@ -92,7 +96,7 @@ public String connectedGateway() { /** * Set the connectedGateway property: Gateway which to connect segment to. - * + * * @param connectedGateway the connectedGateway value to set. * @return the WorkloadNetworkSegmentProperties object itself. */ @@ -103,7 +107,7 @@ public WorkloadNetworkSegmentProperties withConnectedGateway(String connectedGat /** * Get the subnet property: Subnet which to connect segment to. - * + * * @return the subnet value. */ public WorkloadNetworkSegmentSubnet subnet() { @@ -112,7 +116,7 @@ public WorkloadNetworkSegmentSubnet subnet() { /** * Set the subnet property: Subnet which to connect segment to. - * + * * @param subnet the subnet value to set. * @return the WorkloadNetworkSegmentProperties object itself. */ @@ -123,7 +127,7 @@ public WorkloadNetworkSegmentProperties withSubnet(WorkloadNetworkSegmentSubnet /** * Get the portVif property: Port Vif which segment is associated with. - * + * * @return the portVif value. */ public List portVif() { @@ -132,7 +136,7 @@ public List portVif() { /** * Get the status property: Segment status. - * + * * @return the status value. */ public SegmentStatusEnum status() { @@ -141,7 +145,7 @@ public SegmentStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkSegmentProvisioningState provisioningState() { @@ -150,7 +154,7 @@ public WorkloadNetworkSegmentProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -159,7 +163,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkSegmentProperties object itself. */ @@ -170,7 +174,7 @@ public WorkloadNetworkSegmentProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java index 80738f36409aa..98aee6a17c677 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java @@ -1,41 +1,61 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.VMGroupStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX VM Group. */ +/** + * NSX VM Group. + */ @Fluent public final class WorkloadNetworkVMGroupInner extends ProxyResource { /* - * VM Group properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkVMGroupProperties innerProperties; - /** Creates an instance of WorkloadNetworkVMGroupInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkVMGroupInner class. + */ public WorkloadNetworkVMGroupInner() { } /** - * Get the innerProperties property: VM Group properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkVMGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the VM group. - * + * * @return the displayName value. */ public String displayName() { @@ -44,7 +64,7 @@ public String displayName() { /** * Set the displayName property: Display name of the VM group. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkVMGroupInner object itself. */ @@ -58,7 +78,7 @@ public WorkloadNetworkVMGroupInner withDisplayName(String displayName) { /** * Get the members property: Virtual machine members of this group. - * + * * @return the members value. */ public List members() { @@ -67,7 +87,7 @@ public List members() { /** * Set the members property: Virtual machine members of this group. - * + * * @param members the members value to set. * @return the WorkloadNetworkVMGroupInner object itself. */ @@ -81,7 +101,7 @@ public WorkloadNetworkVMGroupInner withMembers(List members) { /** * Get the status property: VM Group status. - * + * * @return the status value. */ public VMGroupStatusEnum status() { @@ -90,7 +110,7 @@ public VMGroupStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkVMGroupProvisioningState provisioningState() { @@ -99,7 +119,7 @@ public WorkloadNetworkVMGroupProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -108,7 +128,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkVMGroupInner object itself. */ @@ -122,7 +142,7 @@ public WorkloadNetworkVMGroupInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java index 9fa3a5c50ceb3..0ab575250bae6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX VM Group Properties. */ +/** + * NSX VM Group Properties. + */ @Fluent public final class WorkloadNetworkVMGroupProperties { /* @@ -43,13 +45,15 @@ public final class WorkloadNetworkVMGroupProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkVMGroupProperties class. */ + /** + * Creates an instance of WorkloadNetworkVMGroupProperties class. + */ public WorkloadNetworkVMGroupProperties() { } /** * Get the displayName property: Display name of the VM group. - * + * * @return the displayName value. */ public String displayName() { @@ -58,7 +62,7 @@ public String displayName() { /** * Set the displayName property: Display name of the VM group. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkVMGroupProperties object itself. */ @@ -69,7 +73,7 @@ public WorkloadNetworkVMGroupProperties withDisplayName(String displayName) { /** * Get the members property: Virtual machine members of this group. - * + * * @return the members value. */ public List members() { @@ -78,7 +82,7 @@ public List members() { /** * Set the members property: Virtual machine members of this group. - * + * * @param members the members value to set. * @return the WorkloadNetworkVMGroupProperties object itself. */ @@ -89,7 +93,7 @@ public WorkloadNetworkVMGroupProperties withMembers(List members) { /** * Get the status property: VM Group status. - * + * * @return the status value. */ public VMGroupStatusEnum status() { @@ -98,7 +102,7 @@ public VMGroupStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkVMGroupProvisioningState provisioningState() { @@ -107,7 +111,7 @@ public WorkloadNetworkVMGroupProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -116,7 +120,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkVMGroupProperties object itself. */ @@ -127,7 +131,7 @@ public WorkloadNetworkVMGroupProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java index 64345cd8fe866..0898687c8ce89 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java @@ -1,30 +1,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.VMTypeEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Virtual Machine. */ -@Fluent +/** + * NSX Virtual Machine. + */ +@Immutable public final class WorkloadNetworkVirtualMachineInner extends ProxyResource { /* - * Virtual machine properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkVirtualMachineProperties innerProperties; - /** Creates an instance of WorkloadNetworkVirtualMachineInner class. */ - public WorkloadNetworkVirtualMachineInner() { + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkVirtualMachineInner class. + */ + private WorkloadNetworkVirtualMachineInner() { } /** - * Get the innerProperties property: Virtual machine properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkVirtualMachineProperties innerProperties() { @@ -32,31 +44,35 @@ private WorkloadNetworkVirtualMachineProperties innerProperties() { } /** - * Get the displayName property: Display name of the VM. - * - * @return the displayName value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - public String displayName() { - return this.innerProperties() == null ? null : this.innerProperties().displayName(); + public SystemData systemData() { + return this.systemData; } /** - * Set the displayName property: Display name of the VM. - * - * @param displayName the displayName value to set. - * @return the WorkloadNetworkVirtualMachineInner object itself. + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. */ - public WorkloadNetworkVirtualMachineInner withDisplayName(String displayName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadNetworkVirtualMachineProperties(); - } - this.innerProperties().withDisplayName(displayName); - return this; + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the displayName property: Display name of the VM. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); } /** * Get the vmType property: Virtual machine type. - * + * * @return the vmType value. */ public VMTypeEnum vmType() { @@ -65,7 +81,7 @@ public VMTypeEnum vmType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java index b465ca3e4116e..cd8d6e2b84f90 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java @@ -1,16 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.avs.models.VMTypeEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Virtual Machine Properties. */ -@Fluent +/** + * NSX Virtual Machine Properties. + */ +@Immutable public final class WorkloadNetworkVirtualMachineProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkProvisioningState provisioningState; + /* * Display name of the VM. */ @@ -23,33 +32,33 @@ public final class WorkloadNetworkVirtualMachineProperties { @JsonProperty(value = "vmType", access = JsonProperty.Access.WRITE_ONLY) private VMTypeEnum vmType; - /** Creates an instance of WorkloadNetworkVirtualMachineProperties class. */ - public WorkloadNetworkVirtualMachineProperties() { + /** + * Creates an instance of WorkloadNetworkVirtualMachineProperties class. + */ + private WorkloadNetworkVirtualMachineProperties() { } /** - * Get the displayName property: Display name of the VM. - * - * @return the displayName value. + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. */ - public String displayName() { - return this.displayName; + public WorkloadNetworkProvisioningState provisioningState() { + return this.provisioningState; } /** - * Set the displayName property: Display name of the VM. - * - * @param displayName the displayName value to set. - * @return the WorkloadNetworkVirtualMachineProperties object itself. + * Get the displayName property: Display name of the VM. + * + * @return the displayName value. */ - public WorkloadNetworkVirtualMachineProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; + public String displayName() { + return this.displayName; } /** * Get the vmType property: Virtual machine type. - * + * * @return the vmType value. */ public VMTypeEnum vmType() { @@ -58,7 +67,7 @@ public VMTypeEnum vmType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java index 21b999ee064bf..b69621f5a1879 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -/** Package containing the inner data models for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the inner data models for Avs. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs.fluent.models; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java index 7be76d283ea08..76ed4c3f53b0e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -/** Package containing the service clients for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the service clients for Avs. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs.fluent; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java index c5a445f43318d..ce51c86b13567 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.AddonInner; import com.azure.resourcemanager.avs.models.Addon; @@ -30,6 +31,10 @@ public AddonProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -55,20 +60,16 @@ public AddonImpl withExistingPrivateCloud(String resourceGroupName, String priva } public Addon create() { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getAddons() + .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), Context.NONE); return this; } public Addon create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getAddons() + .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), context); return this; } @@ -83,48 +84,40 @@ public AddonImpl update() { } public Addon apply() { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getAddons() + .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), Context.NONE); return this; } public Addon apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getAddons() + .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), context); return this; } AddonImpl(AddonInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.addonName = Utils.getValueFromIdByName(innerObject.id(), "addons"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.addonName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "addons"); } public Addon refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .getWithResponse(resourceGroupName, privateCloudName, addonName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getAddons() + .getWithResponse(resourceGroupName, privateCloudName, addonName, Context.NONE) + .getValue(); return this; } public Addon refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .getWithResponse(resourceGroupName, privateCloudName, addonName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getAddons() + .getWithResponse(resourceGroupName, privateCloudName, addonName, context) + .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java index 1babf1026e7f8..1b94910782953 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -33,130 +33,110 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.AddonsClient; import com.azure.resourcemanager.avs.fluent.models.AddonInner; -import com.azure.resourcemanager.avs.models.AddonList; +import com.azure.resourcemanager.avs.implementation.models.AddonListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AddonsClient. */ +/** + * An instance of this class provides access to all the operations defined in AddonsClient. + */ public final class AddonsClientImpl implements AddonsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AddonsService service; - /** The service client containing this operation class. */ - private final AvsClientImpl client; + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; /** * Initializes an instance of AddonsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - AddonsClientImpl(AvsClientImpl client) { + AddonsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(AddonsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientAddons to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientAddons to be used by the proxy service to perform REST * calls. */ - @Host("{$host}") - @ServiceInterface(name = "AvsClientAddons") + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientAddons") public interface AddonsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("addonName") String addonName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("addonName") String addonName, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("addonName") String addonName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AddonInner addon, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("addonName") String addonName, + @HeaderParam("accept") String accept, @BodyParam("application/json") AddonInner addon, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("addonName") String addonName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("addonName") String addonName, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Addon list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -168,54 +148,35 @@ private Mono> listSinglePageAsync(String resourceGroup } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Addon list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -228,69 +189,54 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons as paginated response with {@link PagedFlux}. + * @return the response of a Addon list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons as paginated response with {@link PagedFlux}. + * @return the response of a Addon list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -298,15 +244,15 @@ public PagedIterable list(String resourceGroupName, String privateCl } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -314,30 +260,26 @@ public PagedIterable list(String resourceGroupName, String privateCl } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud along with {@link Response} on successful completion of {@link Mono}. + * @return a Addon along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String addonName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -352,47 +294,33 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud along with {@link Response} on successful completion of {@link Mono}. + * @return a Addon along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String addonName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -407,28 +335,20 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, addonName, accept, context); } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud on successful completion of {@link Mono}. + * @return a Addon on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String privateCloudName, String addonName) { @@ -437,33 +357,33 @@ private Mono getAsync(String resourceGroupName, String privateCloudN } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, String addonName, + Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, addonName, context).block(); } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud. + * @return a Addon. */ @ServiceMethod(returns = ReturnType.SINGLE) public AddonInner get(String resourceGroupName, String privateCloudName, String addonName) { @@ -471,31 +391,27 @@ public AddonInner get(String resourceGroupName, String privateCloudName, String } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an addon resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -515,29 +431,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - addon, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, accept, addon, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -545,19 +451,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return an addon resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -577,49 +479,38 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - addon, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, accept, addon, context); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AddonInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, addonName, addon); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), AddonInner.class, AddonInner.class, this.client.getContext()); + private PollerFlux, AddonInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, addonName, addon); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), AddonInner.class, + AddonInner.class, this.client.getContext()); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -627,42 +518,40 @@ private PollerFlux, AddonInner> beginCreateOrUpdateAsync( * @return the {@link PollerFlux} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AddonInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { + private PollerFlux, AddonInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, addonName, addon, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), AddonInner.class, AddonInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, addonName, addon, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), AddonInner.class, + AddonInner.class, context); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AddonInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { + public SyncPoller, AddonInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon) { return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon).getSyncPoller(); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -670,40 +559,38 @@ public SyncPoller, AddonInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AddonInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context) + public SyncPoller, AddonInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context) .getSyncPoller(); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an addon resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, String addonName, + AddonInner addon) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -711,38 +598,37 @@ private Mono createOrUpdateAsync( * @return an addon resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, String addonName, + AddonInner addon, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an addon resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AddonInner createOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { + public AddonInner createOrUpdate(String resourceGroupName, String privateCloudName, String addonName, + AddonInner addon) { return createOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon).block(); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -750,36 +636,32 @@ public AddonInner createOrUpdate( * @return an addon resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AddonInner createOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { + public AddonInner createOrUpdate(String resourceGroupName, String privateCloudName, String addonName, + AddonInner addon, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context).block(); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String addonName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -794,27 +676,17 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -822,19 +694,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String addonName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -849,45 +717,35 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, addonName, accept, context); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String addonName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String addonName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, addonName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -895,39 +753,38 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String addonName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, addonName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, addonName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String addonName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String addonName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, addonName).getSyncPoller(); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -935,17 +792,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String addonName, Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, addonName, context).getSyncPoller(); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -953,17 +810,16 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, String addonName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, addonName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, addonName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -971,19 +827,18 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String addonName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, addonName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String addonName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, addonName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -994,11 +849,11 @@ public void delete(String resourceGroupName, String privateCloudName, String add } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1011,13 +866,13 @@ public void delete(String resourceGroupName, String privateCloudName, String add /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Addon list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1025,36 +880,26 @@ private Mono> listNextSinglePageAsync(String nextLink) return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. + * + * @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 a paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ExpressRouteAuthorization list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1093,62 +909,41 @@ private Mono> listNextSinglePageAs return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ExpressRouteAuthorization list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java index 5d117bfbdd200..20d393d5a5709 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -21,34 +21,31 @@ public final class AuthorizationsImpl implements Authorizations { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public AuthorizationsImpl( - AuthorizationsClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public AuthorizationsImpl(AuthorizationsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new ExpressRouteAuthorizationImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExpressRouteAuthorizationImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new ExpressRouteAuthorizationImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExpressRouteAuthorizationImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, authorizationName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String authorizationName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, authorizationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ExpressRouteAuthorizationImpl(inner.getValue(), this.manager())); } else { return null; @@ -56,8 +53,8 @@ public Response getWithResponse( } public ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName) { - ExpressRouteAuthorizationInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, authorizationName); + ExpressRouteAuthorizationInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, authorizationName); if (inner != null) { return new ExpressRouteAuthorizationImpl(inner, this.manager()); } else { @@ -74,109 +71,77 @@ public void delete(String resourceGroupName, String privateCloudName, String aut } public ExpressRouteAuthorization getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String authorizationName = Utils.getValueFromIdByName(id, "authorizations"); + String authorizationName = ResourceManagerUtils.getValueFromIdByName(id, "authorizations"); if (authorizationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, authorizationName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String authorizationName = Utils.getValueFromIdByName(id, "authorizations"); + String authorizationName = ResourceManagerUtils.getValueFromIdByName(id, "authorizations"); if (authorizationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, authorizationName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String authorizationName = Utils.getValueFromIdByName(id, "authorizations"); + String authorizationName = ResourceManagerUtils.getValueFromIdByName(id, "authorizations"); if (authorizationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); } this.delete(resourceGroupName, privateCloudName, authorizationName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String authorizationName = Utils.getValueFromIdByName(id, "authorizations"); + String authorizationName = ResourceManagerUtils.getValueFromIdByName(id, "authorizations"); if (authorizationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); } this.delete(resourceGroupName, privateCloudName, authorizationName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java index 97c6a654f9ddb..5d8608b8f170e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -14,38 +14,40 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the AvsClientImpl type. */ -@ServiceClientBuilder(serviceClients = {AvsClientImpl.class}) -public final class AvsClientBuilder { +/** + * A builder for creating a new instance of the AVSClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { AVSClientImpl.class }) +public final class AVSClientBuilder { /* - * The ID of the target subscription. + * Server parameter */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. - * - * @param subscriptionId the subscriptionId value. - * @return the AvsClientBuilder. + * Sets Server parameter. + * + * @param endpoint the endpoint value. + * @return the AVSClientBuilder. */ - public AvsClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public AVSClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the AvsClientBuilder. + * Sets The ID of the target subscription. + * + * @param subscriptionId the subscriptionId value. + * @return the AVSClientBuilder. */ - public AvsClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public AVSClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -56,11 +58,11 @@ public AvsClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder environment(AzureEnvironment environment) { + public AVSClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -72,11 +74,11 @@ public AvsClientBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder pipeline(HttpPipeline pipeline) { + public AVSClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -88,11 +90,11 @@ public AvsClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public AVSClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -104,41 +106,32 @@ public AvsClientBuilder defaultPollInterval(Duration defaultPollInterval) { /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public AVSClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AvsClientImpl with the provided parameters. - * - * @return an instance of AvsClientImpl. + * Builds an instance of AVSClientImpl with the provided parameters. + * + * @return an instance of AVSClientImpl. */ - public AvsClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + public AVSClientImpl buildClient() { AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - AvsClientImpl client = - new AvsClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + AVSClientImpl client = new AVSClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, + localEnvironment, this.endpoint, this.subscriptionId); return client; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index 94709c3fb9b88..fab383b1bb86f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -12,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -24,12 +25,13 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.avs.fluent.AddonsClient; import com.azure.resourcemanager.avs.fluent.AuthorizationsClient; -import com.azure.resourcemanager.avs.fluent.AvsClient; +import com.azure.resourcemanager.avs.fluent.AVSClient; import com.azure.resourcemanager.avs.fluent.CloudLinksClient; import com.azure.resourcemanager.avs.fluent.ClustersClient; import com.azure.resourcemanager.avs.fluent.DatastoresClient; import com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient; import com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient; +import com.azure.resourcemanager.avs.fluent.IscsiPathsClient; import com.azure.resourcemanager.avs.fluent.LocationsClient; import com.azure.resourcemanager.avs.fluent.OperationsClient; import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; @@ -38,7 +40,16 @@ import com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient; import com.azure.resourcemanager.avs.fluent.ScriptPackagesClient; import com.azure.resourcemanager.avs.fluent.VirtualMachinesClient; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDhcpConfigurationsClient; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsServicesClient; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsZonesClient; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkGatewaysClient; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkPortMirroringProfilesClient; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkPublicIpsClient; import com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkSegmentsClient; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkVirtualMachinesClient; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkVmGroupsClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -48,267 +59,439 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the AvsClientImpl type. */ -@ServiceClient(builder = AvsClientBuilder.class) -public final class AvsClientImpl implements AvsClient { - /** The ID of the target subscription. */ - private final String subscriptionId; - +/** + * Initializes a new instance of the AVSClientImpl type. + */ +@ServiceClient(builder = AVSClientBuilder.class) +public final class AVSClientImpl implements AVSClient { /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. + * Server parameter. */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ private final String endpoint; /** - * Gets server parameter. - * + * Gets Server parameter. + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Version parameter. + */ private final String apiVersion; /** - * Gets Api Version. - * + * Gets Version parameter. + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The ID of the target subscription. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The LocationsClient object to access its operations. */ + /** + * The LocationsClient object to access its operations. + */ private final LocationsClient locations; /** * Gets the LocationsClient object to access its operations. - * + * * @return the LocationsClient object. */ public LocationsClient getLocations() { return this.locations; } - /** The PrivateCloudsClient object to access its operations. */ + /** + * The PrivateCloudsClient object to access its operations. + */ private final PrivateCloudsClient privateClouds; /** * Gets the PrivateCloudsClient object to access its operations. - * + * * @return the PrivateCloudsClient object. */ public PrivateCloudsClient getPrivateClouds() { return this.privateClouds; } - /** The ClustersClient object to access its operations. */ + /** + * The ClustersClient object to access its operations. + */ private final ClustersClient clusters; /** * Gets the ClustersClient object to access its operations. - * + * * @return the ClustersClient object. */ public ClustersClient getClusters() { return this.clusters; } - /** The DatastoresClient object to access its operations. */ + /** + * The DatastoresClient object to access its operations. + */ private final DatastoresClient datastores; /** * Gets the DatastoresClient object to access its operations. - * + * * @return the DatastoresClient object. */ public DatastoresClient getDatastores() { return this.datastores; } - /** The HcxEnterpriseSitesClient object to access its operations. */ + /** + * The HcxEnterpriseSitesClient object to access its operations. + */ private final HcxEnterpriseSitesClient hcxEnterpriseSites; /** * Gets the HcxEnterpriseSitesClient object to access its operations. - * + * * @return the HcxEnterpriseSitesClient object. */ public HcxEnterpriseSitesClient getHcxEnterpriseSites() { return this.hcxEnterpriseSites; } - /** The AuthorizationsClient object to access its operations. */ + /** + * The AuthorizationsClient object to access its operations. + */ private final AuthorizationsClient authorizations; /** * Gets the AuthorizationsClient object to access its operations. - * + * * @return the AuthorizationsClient object. */ public AuthorizationsClient getAuthorizations() { return this.authorizations; } - /** The GlobalReachConnectionsClient object to access its operations. */ + /** + * The GlobalReachConnectionsClient object to access its operations. + */ private final GlobalReachConnectionsClient globalReachConnections; /** * Gets the GlobalReachConnectionsClient object to access its operations. - * + * * @return the GlobalReachConnectionsClient object. */ public GlobalReachConnectionsClient getGlobalReachConnections() { return this.globalReachConnections; } - /** The WorkloadNetworksClient object to access its operations. */ + /** + * The WorkloadNetworksClient object to access its operations. + */ private final WorkloadNetworksClient workloadNetworks; /** * Gets the WorkloadNetworksClient object to access its operations. - * + * * @return the WorkloadNetworksClient object. */ public WorkloadNetworksClient getWorkloadNetworks() { return this.workloadNetworks; } - /** The CloudLinksClient object to access its operations. */ + /** + * The WorkloadNetworkSegmentsClient object to access its operations. + */ + private final WorkloadNetworkSegmentsClient workloadNetworkSegments; + + /** + * Gets the WorkloadNetworkSegmentsClient object to access its operations. + * + * @return the WorkloadNetworkSegmentsClient object. + */ + public WorkloadNetworkSegmentsClient getWorkloadNetworkSegments() { + return this.workloadNetworkSegments; + } + + /** + * The WorkloadNetworkDhcpConfigurationsClient object to access its operations. + */ + private final WorkloadNetworkDhcpConfigurationsClient workloadNetworkDhcpConfigurations; + + /** + * Gets the WorkloadNetworkDhcpConfigurationsClient object to access its operations. + * + * @return the WorkloadNetworkDhcpConfigurationsClient object. + */ + public WorkloadNetworkDhcpConfigurationsClient getWorkloadNetworkDhcpConfigurations() { + return this.workloadNetworkDhcpConfigurations; + } + + /** + * The WorkloadNetworkGatewaysClient object to access its operations. + */ + private final WorkloadNetworkGatewaysClient workloadNetworkGateways; + + /** + * Gets the WorkloadNetworkGatewaysClient object to access its operations. + * + * @return the WorkloadNetworkGatewaysClient object. + */ + public WorkloadNetworkGatewaysClient getWorkloadNetworkGateways() { + return this.workloadNetworkGateways; + } + + /** + * The WorkloadNetworkPortMirroringProfilesClient object to access its operations. + */ + private final WorkloadNetworkPortMirroringProfilesClient workloadNetworkPortMirroringProfiles; + + /** + * Gets the WorkloadNetworkPortMirroringProfilesClient object to access its operations. + * + * @return the WorkloadNetworkPortMirroringProfilesClient object. + */ + public WorkloadNetworkPortMirroringProfilesClient getWorkloadNetworkPortMirroringProfiles() { + return this.workloadNetworkPortMirroringProfiles; + } + + /** + * The WorkloadNetworkVmGroupsClient object to access its operations. + */ + private final WorkloadNetworkVmGroupsClient workloadNetworkVmGroups; + + /** + * Gets the WorkloadNetworkVmGroupsClient object to access its operations. + * + * @return the WorkloadNetworkVmGroupsClient object. + */ + public WorkloadNetworkVmGroupsClient getWorkloadNetworkVmGroups() { + return this.workloadNetworkVmGroups; + } + + /** + * The WorkloadNetworkVirtualMachinesClient object to access its operations. + */ + private final WorkloadNetworkVirtualMachinesClient workloadNetworkVirtualMachines; + + /** + * Gets the WorkloadNetworkVirtualMachinesClient object to access its operations. + * + * @return the WorkloadNetworkVirtualMachinesClient object. + */ + public WorkloadNetworkVirtualMachinesClient getWorkloadNetworkVirtualMachines() { + return this.workloadNetworkVirtualMachines; + } + + /** + * The WorkloadNetworkDnsServicesClient object to access its operations. + */ + private final WorkloadNetworkDnsServicesClient workloadNetworkDnsServices; + + /** + * Gets the WorkloadNetworkDnsServicesClient object to access its operations. + * + * @return the WorkloadNetworkDnsServicesClient object. + */ + public WorkloadNetworkDnsServicesClient getWorkloadNetworkDnsServices() { + return this.workloadNetworkDnsServices; + } + + /** + * The WorkloadNetworkDnsZonesClient object to access its operations. + */ + private final WorkloadNetworkDnsZonesClient workloadNetworkDnsZones; + + /** + * Gets the WorkloadNetworkDnsZonesClient object to access its operations. + * + * @return the WorkloadNetworkDnsZonesClient object. + */ + public WorkloadNetworkDnsZonesClient getWorkloadNetworkDnsZones() { + return this.workloadNetworkDnsZones; + } + + /** + * The WorkloadNetworkPublicIpsClient object to access its operations. + */ + private final WorkloadNetworkPublicIpsClient workloadNetworkPublicIps; + + /** + * Gets the WorkloadNetworkPublicIpsClient object to access its operations. + * + * @return the WorkloadNetworkPublicIpsClient object. + */ + public WorkloadNetworkPublicIpsClient getWorkloadNetworkPublicIps() { + return this.workloadNetworkPublicIps; + } + + /** + * The CloudLinksClient object to access its operations. + */ private final CloudLinksClient cloudLinks; /** * Gets the CloudLinksClient object to access its operations. - * + * * @return the CloudLinksClient object. */ public CloudLinksClient getCloudLinks() { return this.cloudLinks; } - /** The AddonsClient object to access its operations. */ + /** + * The AddonsClient object to access its operations. + */ private final AddonsClient addons; /** * Gets the AddonsClient object to access its operations. - * + * * @return the AddonsClient object. */ public AddonsClient getAddons() { return this.addons; } - /** The VirtualMachinesClient object to access its operations. */ + /** + * The VirtualMachinesClient object to access its operations. + */ private final VirtualMachinesClient virtualMachines; /** * Gets the VirtualMachinesClient object to access its operations. - * + * * @return the VirtualMachinesClient object. */ public VirtualMachinesClient getVirtualMachines() { return this.virtualMachines; } - /** The PlacementPoliciesClient object to access its operations. */ + /** + * The PlacementPoliciesClient object to access its operations. + */ private final PlacementPoliciesClient placementPolicies; /** * Gets the PlacementPoliciesClient object to access its operations. - * + * * @return the PlacementPoliciesClient object. */ public PlacementPoliciesClient getPlacementPolicies() { return this.placementPolicies; } - /** The ScriptPackagesClient object to access its operations. */ + /** + * The ScriptPackagesClient object to access its operations. + */ private final ScriptPackagesClient scriptPackages; /** * Gets the ScriptPackagesClient object to access its operations. - * + * * @return the ScriptPackagesClient object. */ public ScriptPackagesClient getScriptPackages() { return this.scriptPackages; } - /** The ScriptCmdletsClient object to access its operations. */ + /** + * The ScriptCmdletsClient object to access its operations. + */ private final ScriptCmdletsClient scriptCmdlets; /** * Gets the ScriptCmdletsClient object to access its operations. - * + * * @return the ScriptCmdletsClient object. */ public ScriptCmdletsClient getScriptCmdlets() { return this.scriptCmdlets; } - /** The ScriptExecutionsClient object to access its operations. */ + /** + * The ScriptExecutionsClient object to access its operations. + */ private final ScriptExecutionsClient scriptExecutions; /** * Gets the ScriptExecutionsClient object to access its operations. - * + * * @return the ScriptExecutionsClient object. */ public ScriptExecutionsClient getScriptExecutions() { @@ -316,28 +499,37 @@ public ScriptExecutionsClient getScriptExecutions() { } /** - * Initializes an instance of AvsClient client. - * + * The IscsiPathsClient object to access its operations. + */ + private final IscsiPathsClient iscsiPaths; + + /** + * Gets the IscsiPathsClient object to access its operations. + * + * @return the IscsiPathsClient object. + */ + public IscsiPathsClient getIscsiPaths() { + return this.iscsiPaths; + } + + /** + * Initializes an instance of AVSClient client. + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Server parameter. * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. - */ - AvsClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + */ + AVSClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-03-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2023-09-01"; this.operations = new OperationsClientImpl(this); this.locations = new LocationsClientImpl(this); this.privateClouds = new PrivateCloudsClientImpl(this); @@ -347,6 +539,15 @@ public ScriptExecutionsClient getScriptExecutions() { this.authorizations = new AuthorizationsClientImpl(this); this.globalReachConnections = new GlobalReachConnectionsClientImpl(this); this.workloadNetworks = new WorkloadNetworksClientImpl(this); + this.workloadNetworkSegments = new WorkloadNetworkSegmentsClientImpl(this); + this.workloadNetworkDhcpConfigurations = new WorkloadNetworkDhcpConfigurationsClientImpl(this); + this.workloadNetworkGateways = new WorkloadNetworkGatewaysClientImpl(this); + this.workloadNetworkPortMirroringProfiles = new WorkloadNetworkPortMirroringProfilesClientImpl(this); + this.workloadNetworkVmGroups = new WorkloadNetworkVmGroupsClientImpl(this); + this.workloadNetworkVirtualMachines = new WorkloadNetworkVirtualMachinesClientImpl(this); + this.workloadNetworkDnsServices = new WorkloadNetworkDnsServicesClientImpl(this); + this.workloadNetworkDnsZones = new WorkloadNetworkDnsZonesClientImpl(this); + this.workloadNetworkPublicIps = new WorkloadNetworkPublicIpsClientImpl(this); this.cloudLinks = new CloudLinksClientImpl(this); this.addons = new AddonsClientImpl(this); this.virtualMachines = new VirtualMachinesClientImpl(this); @@ -354,11 +555,12 @@ public ScriptExecutionsClient getScriptExecutions() { this.scriptPackages = new ScriptPackagesClientImpl(this); this.scriptCmdlets = new ScriptCmdletsClientImpl(this); this.scriptExecutions = new ScriptExecutionsClientImpl(this); + this.iscsiPaths = new IscsiPathsClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -367,7 +569,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -377,7 +579,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -387,26 +589,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -419,19 +610,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } @@ -472,7 +660,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { @@ -496,5 +684,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AvsClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AVSClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java index 7a84a06180cf4..4479dd7d9d4fc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.CloudLinkInner; import com.azure.resourcemanager.avs.models.CloudLink; +import com.azure.resourcemanager.avs.models.CloudLinkProvisioningState; import com.azure.resourcemanager.avs.models.CloudLinkStatus; public final class CloudLinkImpl implements CloudLink, CloudLink.Definition, CloudLink.Update { @@ -26,6 +28,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public CloudLinkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public CloudLinkStatus status() { return this.innerModel().status(); } @@ -59,20 +69,16 @@ public CloudLinkImpl withExistingPrivateCloud(String resourceGroupName, String p } public CloudLink create() { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getCloudLinks() + .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), Context.NONE); return this; } public CloudLink create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getCloudLinks() + .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), context); return this; } @@ -87,48 +93,40 @@ public CloudLinkImpl update() { } public CloudLink apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getCloudLinks() + .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), Context.NONE); return this; } public CloudLink apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getCloudLinks() + .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), context); return this; } CloudLinkImpl(CloudLinkInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.cloudLinkName = Utils.getValueFromIdByName(innerObject.id(), "cloudLinks"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.cloudLinkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "cloudLinks"); } public CloudLink refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getCloudLinks() + .getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, Context.NONE) + .getValue(); return this; } public CloudLink refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getCloudLinks() + .getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context) + .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java index 515d99d48dbea..9af1e0b63c438 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -33,131 +33,112 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.CloudLinksClient; import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; -import com.azure.resourcemanager.avs.models.CloudLinkList; +import com.azure.resourcemanager.avs.implementation.models.CloudLinkListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CloudLinksClient. */ +/** + * An instance of this class provides access to all the operations defined in CloudLinksClient. + */ public final class CloudLinksClientImpl implements CloudLinksClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CloudLinksService service; - /** The service client containing this operation class. */ - private final AvsClientImpl client; + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; /** * Initializes an instance of CloudLinksClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - CloudLinksClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(CloudLinksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + CloudLinksClientImpl(AVSClientImpl client) { + this.service + = RestProxy.create(CloudLinksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientCloudLinks to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientCloudLinks to be used by the proxy service to perform REST * calls. */ - @Host("{$host}") - @ServiceInterface(name = "AvsClientCloudLinks") + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientCloudLinks") public interface CloudLinksService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("cloudLinkName") String cloudLinkName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("cloudLinkName") String cloudLinkName, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("cloudLinkName") String cloudLinkName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CloudLinkInner cloudLink, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("cloudLinkName") String cloudLinkName, + @HeaderParam("accept") String accept, @BodyParam("application/json") CloudLinkInner cloudLink, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("cloudLinkName") String cloudLinkName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("cloudLinkName") String cloudLinkName, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a CloudLink list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,54 +150,35 @@ private Mono> listSinglePageAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a CloudLink list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -229,69 +191,54 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links as paginated response with {@link PagedFlux}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links as paginated response with {@link PagedFlux}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -299,15 +246,15 @@ public PagedIterable list(String resourceGroupName, String priva } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -315,31 +262,26 @@ public PagedIterable list(String resourceGroupName, String priva } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud along with {@link Response} on successful completion of {@link - * Mono}. + * @return a CloudLink along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -354,48 +296,33 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud along with {@link Response} on successful completion of {@link - * Mono}. + * @return a CloudLink along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -410,28 +337,20 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, cloudLinkName, accept, context); } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud on successful completion of {@link Mono}. + * @return a CloudLink on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String privateCloudName, String cloudLinkName) { @@ -440,33 +359,33 @@ private Mono getAsync(String resourceGroupName, String privateCl } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, context).block(); } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud. + * @return a CloudLink. */ @ServiceMethod(returns = ReturnType.SINGLE) public CloudLinkInner get(String resourceGroupName, String privateCloudName, String cloudLinkName) { @@ -474,31 +393,27 @@ public CloudLinkInner get(String resourceGroupName, String privateCloudName, Str } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cloud link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -518,29 +433,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - cloudLink, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, accept, cloudLink, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -548,23 +453,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a cloud link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -584,53 +481,39 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - cloudLink, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, accept, cloudLink, + context); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - CloudLinkInner.class, - CloudLinkInner.class, - this.client.getContext()); + private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudLinkInner.class, CloudLinkInner.class, this.client.getContext()); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -638,48 +521,41 @@ private PollerFlux, CloudLinkInner> beginCreateOrUpda * @return the {@link PollerFlux} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { + private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), CloudLinkInner.class, CloudLinkInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudLinkInner.class, CloudLinkInner.class, context); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudLinkInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink) + public SyncPoller, CloudLinkInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink) .getSyncPoller(); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -687,44 +563,38 @@ public SyncPoller, CloudLinkInner> beginCreateOrUpdat * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudLinkInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context) + public SyncPoller, CloudLinkInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context) .getSyncPoller(); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cloud link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, CloudLinkInner cloudLink) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -732,42 +602,37 @@ private Mono createOrUpdateAsync( * @return a cloud link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, CloudLinkInner cloudLink, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cloud link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudLinkInner createOrUpdate( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + public CloudLinkInner createOrUpdate(String resourceGroupName, String privateCloudName, String cloudLinkName, + CloudLinkInner cloudLink) { return createOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink).block(); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -775,40 +640,32 @@ public CloudLinkInner createOrUpdate( * @return a cloud link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudLinkInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { + public CloudLinkInner createOrUpdate(String resourceGroupName, String privateCloudName, String cloudLinkName, + CloudLinkInner cloudLink, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context).block(); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -823,27 +680,17 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -851,19 +698,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -878,46 +721,36 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, cloudLinkName, accept, context); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -925,39 +758,38 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String cloudLinkName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String cloudLinkName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName).getSyncPoller(); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -965,17 +797,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName, context).getSyncPoller(); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -983,17 +815,16 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, String cloudLinkName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1001,19 +832,18 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String cloudLinkName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1024,11 +854,11 @@ public void delete(String resourceGroupName, String privateCloudName, String clo } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1041,13 +871,13 @@ public void delete(String resourceGroupName, String privateCloudName, String clo /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a CloudLink list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1055,36 +885,26 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a CloudLink list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1092,23 +912,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java index 15419933382ef..16f1190aa18ef 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -28,23 +28,20 @@ public CloudLinksImpl(CloudLinksClient innerClient, com.azure.resourcemanager.av public PagedIterable list(String resourceGroupName, String privateCloudName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new CloudLinkImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudLinkImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new CloudLinkImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudLinkImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CloudLinkImpl(inner.getValue(), this.manager())); } else { return null; @@ -69,105 +66,77 @@ public void delete(String resourceGroupName, String privateCloudName, String clo } public CloudLink getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String cloudLinkName = Utils.getValueFromIdByName(id, "cloudLinks"); + String cloudLinkName = ResourceManagerUtils.getValueFromIdByName(id, "cloudLinks"); if (cloudLinkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String cloudLinkName = Utils.getValueFromIdByName(id, "cloudLinks"); + String cloudLinkName = ResourceManagerUtils.getValueFromIdByName(id, "cloudLinks"); if (cloudLinkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String cloudLinkName = Utils.getValueFromIdByName(id, "cloudLinks"); + String cloudLinkName = ResourceManagerUtils.getValueFromIdByName(id, "cloudLinks"); if (cloudLinkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); } this.delete(resourceGroupName, privateCloudName, cloudLinkName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String cloudLinkName = Utils.getValueFromIdByName(id, "cloudLinks"); + String cloudLinkName = ResourceManagerUtils.getValueFromIdByName(id, "cloudLinks"); if (cloudLinkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); } this.delete(resourceGroupName, privateCloudName, cloudLinkName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java index fe62d443f946d..5d25023809d2e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.models.Cluster; @@ -36,6 +37,10 @@ public Sku sku() { return this.innerModel().sku(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Integer clusterSize() { return this.innerModel().clusterSize(); } @@ -57,6 +62,10 @@ public List hosts() { } } + public String vsanDatastoreName() { + return this.innerModel().vsanDatastoreName(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -84,20 +93,16 @@ public ClusterImpl withExistingPrivateCloud(String resourceGroupName, String pri } public Cluster create() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .createOrUpdate(resourceGroupName, privateCloudName, clusterName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getClusters() + .createOrUpdate(resourceGroupName, privateCloudName, clusterName, this.innerModel(), Context.NONE); return this; } public Cluster create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .createOrUpdate(resourceGroupName, privateCloudName, clusterName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getClusters() + .createOrUpdate(resourceGroupName, privateCloudName, clusterName, this.innerModel(), context); return this; } @@ -113,54 +118,47 @@ public ClusterImpl update() { } public Cluster apply() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .update(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getClusters() + .updateWithResponse(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, Context.NONE) + .getValue(); return this; } public Cluster apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .update(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, context); + this.innerObject = serviceManager.serviceClient() + .getClusters() + .updateWithResponse(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, context) + .getValue(); return this; } ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); } public Cluster refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getClusters() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, Context.NONE) + .getValue(); return this; } public Cluster refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getClusters() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, context) + .getValue(); return this; } public Response listZonesWithResponse(Context context) { - return serviceManager - .clusters() + return serviceManager.clusters() .listZonesWithResponse(resourceGroupName, privateCloudName, clusterName, context); } @@ -169,8 +167,13 @@ public ClusterZoneList listZones() { } public ClusterImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updateClusterUpdate.withSku(sku); + return this; + } } public ClusterImpl withClusterSize(Integer clusterSize) { @@ -193,6 +196,11 @@ public ClusterImpl withHosts(List hosts) { } } + public ClusterImpl withVsanDatastoreName(String vsanDatastoreName) { + this.innerModel().withVsanDatastoreName(vsanDatastoreName); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterZoneListImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterZoneListImpl.java index 7c77d52c280f5..ce644b168f911 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterZoneListImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterZoneListImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java index 75e836594c119..1e2dfc8cb7d47 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -36,162 +36,133 @@ import com.azure.resourcemanager.avs.fluent.ClustersClient; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; -import com.azure.resourcemanager.avs.models.ClusterList; +import com.azure.resourcemanager.avs.implementation.models.ClusterListResult; +import com.azure.resourcemanager.avs.models.ClustersUpdateResponse; import com.azure.resourcemanager.avs.models.ClusterUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ClustersClient. */ +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ public final class ClustersClientImpl implements ClustersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ClustersService service; - /** The service client containing this operation class. */ - private final AvsClientImpl client; + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; /** * Initializes an instance of ClustersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - ClustersClientImpl(AvsClientImpl client) { + ClustersClientImpl(AVSClientImpl client) { this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientClusters to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientClusters to be used by the proxy service to perform REST * calls. */ - @Host("{$host}") - @ServiceInterface(name = "AvsClientClusters") + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientClusters") public interface ClustersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClusterInner cluster, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("accept") String accept, @BodyParam("application/json") ClusterInner cluster, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClusterUpdate clusterUpdate, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("accept") String accept, @BodyParam("application/json") ClusterUpdate clusterUpdate, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listZones( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listZones(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -203,54 +174,35 @@ private Mono> listSinglePageAsync(String resourceGro } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -263,69 +215,54 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters as paginated response with {@link PagedFlux}. + * @return the response of a Cluster list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters as paginated response with {@link PagedFlux}. + * @return the response of a Cluster list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -333,15 +270,15 @@ public PagedIterable list(String resourceGroupName, String private } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -349,31 +286,26 @@ public PagedIterable list(String resourceGroupName, String private } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -388,48 +320,33 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -444,28 +361,20 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, context); } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud on successful completion of {@link Mono}. + * @return a Cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String privateCloudName, String clusterName) { @@ -474,33 +383,33 @@ private Mono getAsync(String resourceGroupName, String privateClou } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context).block(); } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud. + * @return a Cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner get(String resourceGroupName, String privateCloudName, String clusterName) { @@ -508,31 +417,27 @@ public ClusterInner get(String resourceGroupName, String privateCloudName, Strin } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -552,29 +457,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - cluster, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, cluster, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -582,19 +477,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -614,49 +505,39 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - cluster, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, cluster, + context); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); + private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -664,42 +545,40 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs * @return the {@link PollerFlux} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { + private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { + public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster) { return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster).getSyncPoller(); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -707,40 +586,38 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context) + public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context) .getSyncPoller(); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, ClusterInner cluster) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -748,38 +625,37 @@ private Mono createOrUpdateAsync( * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, ClusterInner cluster, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner createOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { + public ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + ClusterInner cluster) { return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster).block(); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -787,37 +663,33 @@ public ClusterInner createOrUpdate( * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner createOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { + public ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + ClusterInner cluster, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context).block(); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. + * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + private Mono updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, ClusterUpdate clusterUpdate) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -837,53 +709,35 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - clusterUpdate, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, + clusterUpdate, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. + * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { + private Mono updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, ClusterUpdate clusterUpdate, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -903,120 +757,16 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - clusterUpdate, - accept, - context); - } - - /** - * Update a cluster in a private cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param clusterUpdate The cluster properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); - } - - /** - * Update a cluster in a private cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param clusterUpdate The cluster properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context); - } - - /** - * Update a cluster in a private cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param clusterUpdate The cluster properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).getSyncPoller(); - } - - /** - * Update a cluster in a private cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param clusterUpdate The cluster properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a cluster resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context) - .getSyncPoller(); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, clusterUpdate, context); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1024,104 +774,72 @@ public SyncPoller, ClusterInner> beginUpdate( * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { - return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate) { + return updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a cluster in a private cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param clusterUpdate The cluster properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { - return updateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).block(); + public ClustersUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, ClusterUpdate clusterUpdate, Context context) { + return updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context) + .block(); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { - return updateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context).block(); + public ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate) { + return updateWithResponse(resourceGroupName, privateCloudName, clusterName, clusterUpdate, Context.NONE) + .getValue(); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1136,27 +854,17 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1164,19 +872,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1191,46 +895,36 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, context); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String clusterName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1238,39 +932,38 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName).getSyncPoller(); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1278,17 +971,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, context).getSyncPoller(); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1296,17 +989,16 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1314,19 +1006,18 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1337,11 +1028,11 @@ public void delete(String resourceGroupName, String privateCloudName, String clu } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1354,30 +1045,26 @@ public void delete(String resourceGroupName, String privateCloudName, String clu /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all zones and associated hosts for a cluster along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listZonesWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono> listZonesWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1392,48 +1079,34 @@ private Mono> listZonesWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listZones( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listZones(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all zones and associated hosts for a cluster along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listZonesWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono> listZonesWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1448,42 +1121,34 @@ private Mono> listZonesWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listZones( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context); + return service.listZones(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context); } /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all zones and associated hosts for a cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listZonesAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono listZonesAsync(String resourceGroupName, String privateCloudName, + String clusterName) { return listZonesWithResponseAsync(resourceGroupName, privateCloudName, clusterName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1491,17 +1156,17 @@ private Mono listZonesAsync( * @return list of all zones and associated hosts for a cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listZonesWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public Response listZonesWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { return listZonesWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context).block(); } /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1514,13 +1179,13 @@ public ClusterZoneListInner listZones(String resourceGroupName, String privateCl /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1528,36 +1193,26 @@ private Mono> listNextSinglePageAsync(String nextLin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. + * + * @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 a paged list of datastores along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Datastore list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1161,36 +955,26 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. + * + * @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 a paged list of global reach connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a GlobalReachConnection list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1117,37 +919,26 @@ private Mono> listNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of global reach connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a GlobalReachConnection list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1155,23 +946,13 @@ private Mono> listNextSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java index ab9add31f05db..8679a5ebc4b96 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -21,46 +21,41 @@ public final class GlobalReachConnectionsImpl implements GlobalReachConnections private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public GlobalReachConnectionsImpl( - GlobalReachConnectionsClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public GlobalReachConnectionsImpl(GlobalReachConnectionsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new GlobalReachConnectionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GlobalReachConnectionImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new GlobalReachConnectionImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GlobalReachConnectionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new GlobalReachConnectionImpl(inner.getValue(), this.manager())); } else { return null; } } - public GlobalReachConnection get( - String resourceGroupName, String privateCloudName, String globalReachConnectionName) { - GlobalReachConnectionInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, globalReachConnectionName); + public GlobalReachConnection get(String resourceGroupName, String privateCloudName, + String globalReachConnectionName) { + GlobalReachConnectionInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, globalReachConnectionName); if (inner != null) { return new GlobalReachConnectionImpl(inner, this.manager()); } else { @@ -72,125 +67,84 @@ public void delete(String resourceGroupName, String privateCloudName, String glo this.serviceClient().delete(resourceGroupName, privateCloudName, globalReachConnectionName); } - public void delete( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + public void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName, + Context context) { this.serviceClient().delete(resourceGroupName, privateCloudName, globalReachConnectionName, context); } public GlobalReachConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String globalReachConnectionName = Utils.getValueFromIdByName(id, "globalReachConnections"); + String globalReachConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "globalReachConnections"); if (globalReachConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", id))); } - return this - .getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE) + return this.getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String globalReachConnectionName = Utils.getValueFromIdByName(id, "globalReachConnections"); + String globalReachConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "globalReachConnections"); if (globalReachConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String globalReachConnectionName = Utils.getValueFromIdByName(id, "globalReachConnections"); + String globalReachConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "globalReachConnections"); if (globalReachConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", id))); } this.delete(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String globalReachConnectionName = Utils.getValueFromIdByName(id, "globalReachConnections"); + String globalReachConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "globalReachConnections"); if (globalReachConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", id))); } this.delete(resourceGroupName, privateCloudName, globalReachConnectionName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java index 5b895cc9d1fdb..9109973e4092d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.HcxEnterpriseSiteInner; import com.azure.resourcemanager.avs.models.HcxEnterpriseSite; +import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; public final class HcxEnterpriseSiteImpl @@ -27,6 +29,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public HcxEnterpriseSiteProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String activationKey() { return this.innerModel().activationKey(); } @@ -60,24 +70,20 @@ public HcxEnterpriseSiteImpl withExistingPrivateCloud(String resourceGroupName, } public HcxEnterpriseSite create() { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHcxEnterpriseSites() + .createOrUpdateWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public HcxEnterpriseSite create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHcxEnterpriseSites() + .createOrUpdateWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), + context) + .getValue(); return this; } @@ -92,52 +98,44 @@ public HcxEnterpriseSiteImpl update() { } public HcxEnterpriseSite apply() { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHcxEnterpriseSites() + .createOrUpdateWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public HcxEnterpriseSite apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHcxEnterpriseSites() + .createOrUpdateWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), + context) + .getValue(); return this; } HcxEnterpriseSiteImpl(HcxEnterpriseSiteInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.hcxEnterpriseSiteName = Utils.getValueFromIdByName(innerObject.id(), "hcxEnterpriseSites"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.hcxEnterpriseSiteName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "hcxEnterpriseSites"); } public HcxEnterpriseSite refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHcxEnterpriseSites() + .getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, Context.NONE) + .getValue(); return this; } public HcxEnterpriseSite refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHcxEnterpriseSites() + .getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context) + .getValue(); return this; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java index 2d35ee5a1d333..e7acbf2a01c08 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -30,131 +30,114 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient; import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; -import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteList; +import com.azure.resourcemanager.avs.implementation.models.HcxEnterpriseSiteListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in HcxEnterpriseSitesClient. */ +/** + * An instance of this class provides access to all the operations defined in HcxEnterpriseSitesClient. + */ public final class HcxEnterpriseSitesClientImpl implements HcxEnterpriseSitesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final HcxEnterpriseSitesService service; - /** The service client containing this operation class. */ - private final AvsClientImpl client; + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; /** * Initializes an instance of HcxEnterpriseSitesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - HcxEnterpriseSitesClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(HcxEnterpriseSitesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + HcxEnterpriseSitesClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(HcxEnterpriseSitesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientHcxEnterpriseSites to be used by the proxy service to + * The interface defining all the services for AVSClientHcxEnterpriseSites to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AvsClientHcxEnterpri") + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientHcxEnterpri") public interface HcxEnterpriseSitesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") HcxEnterpriseSiteInner hcxEnterpriseSite, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, @HeaderParam("accept") String accept, + @BodyParam("application/json") HcxEnterpriseSiteInner hcxEnterpriseSite, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a HcxEnterpriseSite list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -166,55 +149,35 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a HcxEnterpriseSite list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -227,70 +190,55 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedFlux}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedFlux}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -298,48 +246,43 @@ public PagedIterable list(String resourceGroupName, Stri } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return a HcxEnterpriseSite along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -355,48 +298,34 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return a HcxEnterpriseSite along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -412,64 +341,56 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, context); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud on successful completion of {@link Mono}. + * @return a HcxEnterpriseSite on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName) { return getWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context).block(); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud. + * @return a HcxEnterpriseSite. */ @ServiceMethod(returns = ReturnType.SINGLE) public HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { @@ -477,34 +398,27 @@ public HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudN } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an HCX Enterprise Site resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -526,29 +440,19 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - hcxEnterpriseSite, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, + hcxEnterpriseSite, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -556,23 +460,16 @@ private Mono> createOrUpdateWithResponseAsync( * @return an HCX Enterprise Site resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite, + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -594,49 +491,37 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - hcxEnterpriseSite, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, + hcxEnterpriseSite, context); } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an HCX Enterprise Site resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite) { - return createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite) { + return createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, + hcxEnterpriseSite).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -644,65 +529,53 @@ private Mono createOrUpdateAsync( * @return an HCX Enterprise Site resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite, + public Response createOrUpdateWithResponse(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite, context) - .block(); + return createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, + hcxEnterpriseSite, context).block(); } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an HCX Enterprise Site resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HcxEnterpriseSiteInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite) { - return createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite, Context.NONE) - .getValue(); + public HcxEnterpriseSiteInner createOrUpdate(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite) { + return createOrUpdateWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite, + Context.NONE).getValue(); } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -718,27 +591,18 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -746,19 +610,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -774,24 +634,16 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, context); } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -804,11 +656,11 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -816,17 +668,17 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context) { return deleteWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context).block(); } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -838,14 +690,13 @@ public void delete(String resourceGroupName, String privateCloudName, String hcx /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a HcxEnterpriseSite list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -853,37 +704,26 @@ private Mono> listNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. + * + * @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 pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -209,36 +196,26 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -246,23 +223,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java index 32a039b0a9714..d95c138012a29 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -26,12 +26,12 @@ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.av public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java index e06ac04af7b41..cfe871ee07067 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -34,156 +34,130 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; -import com.azure.resourcemanager.avs.models.PlacementPoliciesList; +import com.azure.resourcemanager.avs.implementation.models.PlacementPolicyListResult; +import com.azure.resourcemanager.avs.models.PlacementPoliciesUpdateResponse; import com.azure.resourcemanager.avs.models.PlacementPolicyUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PlacementPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in PlacementPoliciesClient. + */ public final class PlacementPoliciesClientImpl implements PlacementPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PlacementPoliciesService service; - /** The service client containing this operation class. */ - private final AvsClientImpl client; + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; /** * Initializes an instance of PlacementPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - PlacementPoliciesClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(PlacementPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + PlacementPoliciesClientImpl(AVSClientImpl client) { + this.service + = RestProxy.create(PlacementPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientPlacementPolicies to be used by the proxy service to perform + * The interface defining all the services for AVSClientPlacementPolicies to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AvsClientPlacementPo") + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientPlacementPo") public interface PlacementPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("placementPolicyName") String placementPolicyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("placementPolicyName") String placementPolicyName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("placementPolicyName") String placementPolicyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PlacementPolicyInner placementPolicy, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("placementPolicyName") String placementPolicyName, @HeaderParam("accept") String accept, + @BodyParam("application/json") PlacementPolicyInner placementPolicy, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("placementPolicyName") String placementPolicyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PlacementPolicyUpdate placementPolicyUpdate, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("placementPolicyName") String placementPolicyName, @HeaderParam("accept") String accept, + @BodyParam("application/json") PlacementPolicyUpdate placementPolicyUpdate, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("placementPolicyName") String placementPolicyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("placementPolicyName") String placementPolicyName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a PlacementPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -198,57 +172,36 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a PlacementPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -264,127 +217,106 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies as paginated response with {@link PagedFlux}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String clusterName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies as paginated response with {@link PagedFlux}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String clusterName) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName)); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName, context)); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster along with {@link Response} on successful - * completion of {@link Mono}. + * @return a PlacementPolicy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -403,54 +335,35 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster along with {@link Response} on successful - * completion of {@link Mono}. + * @return a PlacementPolicy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -469,113 +382,92 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, placementPolicyName, accept, context); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster on successful completion of {@link Mono}. + * @return a PlacementPolicy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) .block(); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster. + * @return a PlacementPolicy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + public PlacementPolicyInner get(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { return getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) .getValue(); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -600,57 +492,38 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - placementPolicy, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + accept, placementPolicy, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -675,28 +548,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - placementPolicy, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + accept, placementPolicy, context); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -704,32 +568,22 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PlacementPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PlacementPolicyInner.class, - PlacementPolicyInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, placementPolicyName, placementPolicy); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PlacementPolicyInner.class, PlacementPolicyInner.class, this.client.getContext()); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -738,30 +592,23 @@ private PollerFlux, PlacementPolicyInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PlacementPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context) { + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyInner placementPolicy, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), PlacementPolicyInner.class, PlacementPolicyInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, placementPolicyName, placementPolicy, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PlacementPolicyInner.class, PlacementPolicyInner.class, context); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -769,25 +616,22 @@ private PollerFlux, PlacementPolicyInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { return this - .beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy) + .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy) .getSyncPoller(); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -796,52 +640,42 @@ public SyncPoller, PlacementPolicyInner> beginC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context) { + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyInner placementPolicy, Context context) { return this - .beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy, context) + .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy, context) .getSyncPoller(); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy) { - return beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -849,52 +683,40 @@ private Mono createOrUpdateAsync( * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy) { - return createOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy) - .block(); + public PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyInner placementPolicy) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy).block(); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -902,50 +724,36 @@ public PlacementPolicyInner createOrUpdate( * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context) { - return createOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy, context) - .block(); + public PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyInner placementPolicy, Context context) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy, context).block(); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful - * completion of {@link Mono}. + * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + private Mono updateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -970,57 +778,37 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - placementPolicyUpdate, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + accept, placementPolicyUpdate, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful - * completion of {@link Mono}. + * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { + private Mono updateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1045,270 +833,94 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - placementPolicyUpdate, - accept, - context); - } - - /** - * Update a placement policy in a private cloud cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PlacementPolicyInner> beginUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate) { - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PlacementPolicyInner.class, - PlacementPolicyInner.class, - this.client.getContext()); - } - - /** - * Update a placement policy in a private cloud cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PlacementPolicyInner> beginUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), PlacementPolicyInner.class, PlacementPolicyInner.class, context); - } - - /** - * Update a placement policy in a private cloud cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PlacementPolicyInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate) { - return this - .beginUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate) - .getSyncPoller(); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, placementPolicyName, accept, placementPolicyUpdate, + context); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PlacementPolicyInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { - return this - .beginUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, context) - .getSyncPoller(); - } - - /** - * Update a placement policy in a private cloud cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate) { - return beginUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { + return updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { - return beginUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a placement policy in a private cloud cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate) { - return updateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate) - .block(); + public PlacementPoliciesUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context) { + return updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate, context).block(); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. - * @param context The context to associate with this operation. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { - return updateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, context) - .block(); + public PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { + return updateWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate, Context.NONE).getValue(); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1327,29 +939,19 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1357,23 +959,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1392,49 +986,38 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, placementPolicyName, accept, context); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1442,47 +1025,41 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { - return this - .beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName) .getSyncPoller(); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1490,44 +1067,38 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { - return this - .beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) .getSyncPoller(); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1535,66 +1106,56 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { deleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName).block(); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, Context context) { deleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 represents list of placement policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a PlacementPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1602,37 +1163,26 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 represents list of placement policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a PlacementPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1640,23 +1190,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java index 4f297c00528de..b2053d8cf91c9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -21,50 +21,41 @@ public final class PlacementPoliciesImpl implements PlacementPolicies { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public PlacementPoliciesImpl( - PlacementPoliciesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public PlacementPoliciesImpl(PlacementPoliciesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); - return Utils.mapPage(inner, inner1 -> new PlacementPolicyImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PlacementPolicyImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new PlacementPolicyImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PlacementPolicyImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PlacementPolicyImpl(inner.getValue(), this.manager())); } else { return null; } } - public PlacementPolicy get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { - PlacementPolicyInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, placementPolicyName); + public PlacementPolicy get(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { + PlacementPolicyInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, placementPolicyName); if (inner != null) { return new PlacementPolicyImpl(inner, this.manager()); } else { @@ -72,158 +63,109 @@ public PlacementPolicy get( } } - public void delete( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName, placementPolicyName); } - public void delete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, Context context) { this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); } public PlacementPolicy getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String placementPolicyName = Utils.getValueFromIdByName(id, "placementPolicies"); + String placementPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "placementPolicies"); if (placementPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); - } - return this - .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String placementPolicyName = Utils.getValueFromIdByName(id, "placementPolicies"); + String placementPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "placementPolicies"); if (placementPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String placementPolicyName = Utils.getValueFromIdByName(id, "placementPolicies"); + String placementPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "placementPolicies"); if (placementPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); } this.delete(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String placementPolicyName = Utils.getValueFromIdByName(id, "placementPolicies"); + String placementPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "placementPolicies"); if (placementPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); } this.delete(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java index c5186ea13b292..347ae062f93bb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.PlacementPolicyInner; import com.azure.resourcemanager.avs.models.AffinityStrength; @@ -35,6 +36,10 @@ public PlacementPolicyProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -57,8 +62,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private PlacementPolicyUpdate updatePlacementPolicyUpdate; - public PlacementPolicyImpl withExistingCluster( - String resourceGroupName, String privateCloudName, String clusterName) { + public PlacementPolicyImpl withExistingCluster(String resourceGroupName, String privateCloudName, + String clusterName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; this.clusterName = clusterName; @@ -66,27 +71,18 @@ public PlacementPolicyImpl withExistingCluster( } public PlacementPolicy create() { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .createOrUpdate( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.innerModel(), - Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getPlacementPolicies() + .createOrUpdate(resourceGroupName, privateCloudName, clusterName, placementPolicyName, this.innerModel(), + Context.NONE); return this; } public PlacementPolicy create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .createOrUpdate( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getPlacementPolicies() + .createOrUpdate(resourceGroupName, privateCloudName, clusterName, placementPolicyName, this.innerModel(), + context); return this; } @@ -102,61 +98,45 @@ public PlacementPolicyImpl update() { } public PlacementPolicy apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .update( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - updatePlacementPolicyUpdate, - Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getPlacementPolicies() + .updateWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + updatePlacementPolicyUpdate, Context.NONE) + .getValue(); return this; } public PlacementPolicy apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .update( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - updatePlacementPolicyUpdate, - context); + this.innerObject = serviceManager.serviceClient() + .getPlacementPolicies() + .updateWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + updatePlacementPolicyUpdate, context) + .getValue(); return this; } PlacementPolicyImpl(PlacementPolicyInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters"); - this.placementPolicyName = Utils.getValueFromIdByName(innerObject.id(), "placementPolicies"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.placementPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "placementPolicies"); } public PlacementPolicy refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPlacementPolicies() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) + .getValue(); return this; } public PlacementPolicy refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPlacementPolicies() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) + .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java index ef3e29e56f542..1568002f301b9 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 @@ -1,16 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; import com.azure.resourcemanager.avs.models.AdminCredentials; import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; +import com.azure.resourcemanager.avs.models.DnsZoneType; import com.azure.resourcemanager.avs.models.Encryption; import com.azure.resourcemanager.avs.models.Endpoints; import com.azure.resourcemanager.avs.models.IdentitySource; @@ -64,6 +66,44 @@ public PrivateCloudIdentity identity() { return this.innerModel().identity(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ManagementCluster managementCluster() { + return this.innerModel().managementCluster(); + } + + public InternetEnum internet() { + return this.innerModel().internet(); + } + + public List identitySources() { + List inner = this.innerModel().identitySources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AvailabilityProperties availability() { + return this.innerModel().availability(); + } + + public Encryption encryption() { + return this.innerModel().encryption(); + } + + public List extendedNetworkBlocks() { + List inner = this.innerModel().extendedNetworkBlocks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public PrivateCloudProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -125,38 +165,12 @@ public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { return this.innerModel().nsxPublicIpQuotaRaised(); } - public ManagementCluster managementCluster() { - return this.innerModel().managementCluster(); - } - - public InternetEnum internet() { - return this.innerModel().internet(); + public String virtualNetworkId() { + return this.innerModel().virtualNetworkId(); } - public List identitySources() { - List inner = this.innerModel().identitySources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public AvailabilityProperties availability() { - return this.innerModel().availability(); - } - - public Encryption encryption() { - return this.innerModel().encryption(); - } - - public List extendedNetworkBlocks() { - List inner = this.innerModel().extendedNetworkBlocks(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public DnsZoneType dnsZoneType() { + return this.innerModel().dnsZoneType(); } public Region region() { @@ -191,20 +205,16 @@ public PrivateCloudImpl withExistingResourceGroup(String resourceGroupName) { } public PrivateCloud create() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .createOrUpdate(resourceGroupName, privateCloudName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getPrivateClouds() + .createOrUpdate(resourceGroupName, privateCloudName, this.innerModel(), Context.NONE); return this; } public PrivateCloud create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .createOrUpdate(resourceGroupName, privateCloudName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getPrivateClouds() + .createOrUpdate(resourceGroupName, privateCloudName, this.innerModel(), context); return this; } @@ -220,47 +230,41 @@ public PrivateCloudImpl update() { } public PrivateCloud apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .update(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getPrivateClouds() + .updateWithResponse(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, Context.NONE) + .getValue(); return this; } public PrivateCloud apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .update(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, context); + this.innerObject = serviceManager.serviceClient() + .getPrivateClouds() + .updateWithResponse(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, context) + .getValue(); return this; } PrivateCloudImpl(PrivateCloudInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); } public PrivateCloud refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .getByResourceGroupWithResponse(resourceGroupName, privateCloudName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateClouds() + .getByResourceGroupWithResponse(resourceGroupName, privateCloudName, Context.NONE) + .getValue(); return this; } public PrivateCloud refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .getByResourceGroupWithResponse(resourceGroupName, privateCloudName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateClouds() + .getByResourceGroupWithResponse(resourceGroupName, privateCloudName, context) + .getValue(); return this; } @@ -281,8 +285,7 @@ public void rotateNsxtPassword(Context context) { } public Response listAdminCredentialsWithResponse(Context context) { - return serviceManager - .privateClouds() + return serviceManager.privateClouds() .listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, context); } @@ -301,8 +304,13 @@ public PrivateCloudImpl withRegion(String location) { } public PrivateCloudImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updatePrivateCloudUpdate.withSku(sku); + return this; + } } public PrivateCloudImpl withTags(Map tags) { @@ -325,31 +333,6 @@ public PrivateCloudImpl withIdentity(PrivateCloudIdentity identity) { } } - public PrivateCloudImpl withCircuit(Circuit circuit) { - this.innerModel().withCircuit(circuit); - return this; - } - - public PrivateCloudImpl withNetworkBlock(String networkBlock) { - this.innerModel().withNetworkBlock(networkBlock); - return this; - } - - public PrivateCloudImpl withVcenterPassword(String vcenterPassword) { - this.innerModel().withVcenterPassword(vcenterPassword); - return this; - } - - public PrivateCloudImpl withNsxtPassword(String nsxtPassword) { - this.innerModel().withNsxtPassword(nsxtPassword); - return this; - } - - public PrivateCloudImpl withSecondaryCircuit(Circuit secondaryCircuit) { - this.innerModel().withSecondaryCircuit(secondaryCircuit); - return this; - } - public PrivateCloudImpl withManagementCluster(ManagementCluster managementCluster) { if (isInCreateMode()) { this.innerModel().withManagementCluster(managementCluster); @@ -405,6 +388,46 @@ public PrivateCloudImpl withExtendedNetworkBlocks(List extendedNetworkBl } } + public PrivateCloudImpl withCircuit(Circuit circuit) { + this.innerModel().withCircuit(circuit); + return this; + } + + public PrivateCloudImpl withNetworkBlock(String networkBlock) { + this.innerModel().withNetworkBlock(networkBlock); + return this; + } + + public PrivateCloudImpl withVcenterPassword(String vcenterPassword) { + this.innerModel().withVcenterPassword(vcenterPassword); + return this; + } + + public PrivateCloudImpl withNsxtPassword(String nsxtPassword) { + this.innerModel().withNsxtPassword(nsxtPassword); + return this; + } + + public PrivateCloudImpl withSecondaryCircuit(Circuit secondaryCircuit) { + this.innerModel().withSecondaryCircuit(secondaryCircuit); + return this; + } + + public PrivateCloudImpl withVirtualNetworkId(String virtualNetworkId) { + this.innerModel().withVirtualNetworkId(virtualNetworkId); + return this; + } + + public PrivateCloudImpl withDnsZoneType(DnsZoneType dnsZoneType) { + if (isInCreateMode()) { + this.innerModel().withDnsZoneType(dnsZoneType); + return this; + } else { + this.updatePrivateCloudUpdate.withDnsZoneType(dnsZoneType); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java index b25d1cece6d73..a7b1adf801b87 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -36,204 +36,168 @@ import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; -import com.azure.resourcemanager.avs.models.PrivateCloudList; +import com.azure.resourcemanager.avs.implementation.models.PrivateCloudListResult; +import com.azure.resourcemanager.avs.models.PrivateCloudsUpdateResponse; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateCloudsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateCloudsClient. + */ public final class PrivateCloudsClientImpl implements PrivateCloudsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateCloudsService service; - /** The service client containing this operation class. */ - private final AvsClientImpl client; + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; /** * Initializes an instance of PrivateCloudsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - PrivateCloudsClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(PrivateCloudsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + PrivateCloudsClientImpl(AVSClientImpl client) { + this.service + = RestProxy.create(PrivateCloudsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientPrivateClouds to be used by the proxy service to perform + * The interface defining all the services for AVSClientPrivateClouds to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AvsClientPrivateClou") + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientPrivateClou") public interface PrivateCloudsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateCloudInner privateCloud, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @BodyParam("application/json") PrivateCloudInner privateCloud, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateCloudUpdate privateCloudUpdate, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @BodyParam("application/json") PrivateCloudUpdate privateCloudUpdate, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> rotateVcenterPassword( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> rotateVcenterPassword(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> rotateNsxtPassword( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> rotateNsxtPassword(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAdminCredentials( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listAdminCredentials(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInSubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listInSubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -241,52 +205,34 @@ private Mono> listByResourceGroupSinglePageAsyn } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -295,64 +241,51 @@ private Mono> listByResourceGroupSinglePageAsyn final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedFlux}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedFlux}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -360,14 +293,14 @@ public PagedIterable listByResourceGroup(String resourceGroup } /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -375,126 +308,95 @@ public PagedIterable listByResourceGroup(String resourceGroup } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedFlux}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listInSubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listInSubscriptionNextSinglePageAsync(nextLink)); } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedFlux}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listInSubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listInSubscriptionNextSinglePageAsync(nextLink, context)); } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -502,13 +404,13 @@ public PagedIterable list() { } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -516,29 +418,25 @@ public PagedIterable list(Context context) { } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud along with {@link Response} on successful completion of {@link Mono}. + * @return a PrivateCloud along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -550,45 +448,32 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud along with {@link Response} on successful completion of {@link Mono}. + * @return a PrivateCloud along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -600,26 +485,19 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud on successful completion of {@link Mono}. + * @return a PrivateCloud on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String privateCloudName) { @@ -628,31 +506,31 @@ private Mono getByResourceGroupAsync(String resourceGroupName } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String privateCloudName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud. + * @return a PrivateCloud. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateCloudInner getByResourceGroup(String resourceGroupName, String privateCloudName) { @@ -660,30 +538,26 @@ public PrivateCloudInner getByResourceGroup(String resourceGroupName, String pri } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -700,27 +574,17 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - privateCloud, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, privateCloud, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -728,19 +592,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -757,50 +617,36 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - privateCloud, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, privateCloud, context); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateCloudInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, privateCloud); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateCloudInner.class, - PrivateCloudInner.class, - this.client.getContext()); - } - - /** - * Create or update a private cloud. - * + private PollerFlux, PrivateCloudInner> + beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, privateCloud); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateCloudInner.class, PrivateCloudInner.class, this.client.getContext()); + } + + /** + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -811,37 +657,35 @@ private PollerFlux, PrivateCloudInner> beginCreate private PollerFlux, PrivateCloudInner> beginCreateOrUpdateAsync( String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, privateCloud, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), PrivateCloudInner.class, PrivateCloudInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, privateCloud, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateCloudInner.class, PrivateCloudInner.class, context); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateCloudInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + public SyncPoller, PrivateCloudInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud) { return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud).getSyncPoller(); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -849,38 +693,36 @@ public SyncPoller, PrivateCloudInner> beginCreateO * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateCloudInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context) + public SyncPoller, PrivateCloudInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context) .getSyncPoller(); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + PrivateCloudInner privateCloud) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -888,36 +730,35 @@ private Mono createOrUpdateAsync( * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + PrivateCloudInner privateCloud, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudInner createOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + public PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudName, + PrivateCloudInner privateCloud) { return createOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud).block(); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -925,36 +766,32 @@ public PrivateCloudInner createOrUpdate( * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudInner createOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { + public PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudName, + PrivateCloudInner privateCloud, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context).block(); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. + * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + private Mono updateWithResponseAsync(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -971,25 +808,14 @@ private Mono>> updateWithResponseAsync( privateCloudUpdate.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - privateCloudUpdate, - accept, - context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, privateCloudUpdate, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -997,22 +823,18 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. + * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { + private Mono updateWithResponseAsync(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1030,106 +852,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - privateCloudUpdate, - accept, - context); - } - - /** - * Update a private cloud. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a private cloud resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateCloudInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateCloudInner.class, - PrivateCloudInner.class, - this.client.getContext()); - } - - /** - * Update a private cloud. - * - * @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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of a private cloud resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateCloudInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), PrivateCloudInner.class, PrivateCloudInner.class, context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, privateCloudUpdate, context); } /** - * Update a private cloud. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a private cloud resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateCloudInner> beginUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).getSyncPoller(); - } - - /** - * Update a private cloud. - * - * @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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of a private cloud resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateCloudInner> beginUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).getSyncPoller(); - } - - /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1139,16 +868,15 @@ public SyncPoller, PrivateCloudInner> beginUpdate( * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { - return beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate) { + return updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1156,54 +884,34 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a private cloud. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudInner update( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { - return updateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).block(); + public PrivateCloudsUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate, Context context) { + return updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).block(); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudInner update( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { - return updateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).block(); + public PrivateCloudInner update(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate) { + return updateWithResponse(resourceGroupName, privateCloudName, privateCloudUpdate, Context.NONE).getValue(); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1212,19 +920,15 @@ public PrivateCloudInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1236,23 +940,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1262,19 +957,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1286,20 +977,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1310,15 +994,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1328,18 +1010,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1353,8 +1034,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1364,14 +1045,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1381,14 +1062,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName) { - return beginDeleteAsync(resourceGroupName, privateCloudName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1399,14 +1079,13 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, context) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1419,8 +1098,8 @@ public void delete(String resourceGroupName, String privateCloudName) { } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1435,7 +1114,7 @@ public void delete(String resourceGroupName, String privateCloudName, Context co /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1444,19 +1123,15 @@ public void delete(String resourceGroupName, String privateCloudName, Context co * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateVcenterPasswordWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono>> rotateVcenterPasswordWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1469,22 +1144,14 @@ private Mono>> rotateVcenterPasswordWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .rotateVcenterPassword( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + context -> service.rotateVcenterPassword(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1494,19 +1161,15 @@ private Mono>> rotateVcenterPasswordWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateVcenterPasswordWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> rotateVcenterPasswordWithResponseAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1518,20 +1181,13 @@ private Mono>> rotateVcenterPasswordWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .rotateVcenterPassword( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); + return service.rotateVcenterPassword(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); } /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1540,19 +1196,17 @@ private Mono>> rotateVcenterPasswordWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateVcenterPasswordAsync( - String resourceGroupName, String privateCloudName) { - Mono>> mono = - rotateVcenterPasswordWithResponseAsync(resourceGroupName, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginRotateVcenterPasswordAsync(String resourceGroupName, + String privateCloudName) { + Mono>> mono + = rotateVcenterPasswordWithResponseAsync(resourceGroupName, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1562,19 +1216,18 @@ private PollerFlux, Void> beginRotateVcenterPasswordAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateVcenterPasswordAsync( - String resourceGroupName, String privateCloudName, Context context) { + private PollerFlux, Void> beginRotateVcenterPasswordAsync(String resourceGroupName, + String privateCloudName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - rotateVcenterPasswordWithResponseAsync(resourceGroupName, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = rotateVcenterPasswordWithResponseAsync(resourceGroupName, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1583,14 +1236,14 @@ private PollerFlux, Void> beginRotateVcenterPasswordAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateVcenterPassword( - String resourceGroupName, String privateCloudName) { + public SyncPoller, Void> beginRotateVcenterPassword(String resourceGroupName, + String privateCloudName) { return this.beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName).getSyncPoller(); } /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1600,14 +1253,14 @@ public SyncPoller, Void> beginRotateVcenterPassword( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateVcenterPassword( - String resourceGroupName, String privateCloudName, Context context) { + public SyncPoller, Void> beginRotateVcenterPassword(String resourceGroupName, + String privateCloudName, Context context) { return this.beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); } /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1617,14 +1270,13 @@ public SyncPoller, Void> beginRotateVcenterPassword( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateVcenterPasswordAsync(String resourceGroupName, String privateCloudName) { - return beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName) - .last() + return beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1635,14 +1287,13 @@ private Mono rotateVcenterPasswordAsync(String resourceGroupName, String p */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateVcenterPasswordAsync(String resourceGroupName, String privateCloudName, Context context) { - return beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName, context) - .last() + return beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1656,7 +1307,7 @@ public void rotateVcenterPassword(String resourceGroupName, String privateCloudN /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1671,7 +1322,7 @@ public void rotateVcenterPassword(String resourceGroupName, String privateCloudN /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1680,19 +1331,15 @@ public void rotateVcenterPassword(String resourceGroupName, String privateCloudN * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateNsxtPasswordWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono>> rotateNsxtPasswordWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1704,23 +1351,14 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .rotateNsxtPassword( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.rotateNsxtPassword(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1730,19 +1368,15 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateNsxtPasswordWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> rotateNsxtPasswordWithResponseAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1754,20 +1388,13 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .rotateNsxtPassword( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); + return service.rotateNsxtPassword(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1776,19 +1403,17 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateNsxtPasswordAsync( - String resourceGroupName, String privateCloudName) { - Mono>> mono = - rotateNsxtPasswordWithResponseAsync(resourceGroupName, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginRotateNsxtPasswordAsync(String resourceGroupName, + String privateCloudName) { + Mono>> mono + = rotateNsxtPasswordWithResponseAsync(resourceGroupName, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1798,19 +1423,18 @@ private PollerFlux, Void> beginRotateNsxtPasswordAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateNsxtPasswordAsync( - String resourceGroupName, String privateCloudName, Context context) { + private PollerFlux, Void> beginRotateNsxtPasswordAsync(String resourceGroupName, + String privateCloudName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - rotateNsxtPasswordWithResponseAsync(resourceGroupName, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = rotateNsxtPasswordWithResponseAsync(resourceGroupName, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1819,14 +1443,14 @@ private PollerFlux, Void> beginRotateNsxtPasswordAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateNsxtPassword( - String resourceGroupName, String privateCloudName) { + public SyncPoller, Void> beginRotateNsxtPassword(String resourceGroupName, + String privateCloudName) { return this.beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName).getSyncPoller(); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1836,14 +1460,14 @@ public SyncPoller, Void> beginRotateNsxtPassword( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateNsxtPassword( - String resourceGroupName, String privateCloudName, Context context) { + public SyncPoller, Void> beginRotateNsxtPassword(String resourceGroupName, String privateCloudName, + Context context) { return this.beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1853,14 +1477,13 @@ public SyncPoller, Void> beginRotateNsxtPassword( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateNsxtPasswordAsync(String resourceGroupName, String privateCloudName) { - return beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName) - .last() + return beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1871,14 +1494,13 @@ private Mono rotateNsxtPasswordAsync(String resourceGroupName, String priv */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateNsxtPasswordAsync(String resourceGroupName, String privateCloudName, Context context) { - return beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName, context) - .last() + return beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1892,7 +1514,7 @@ public void rotateNsxtPassword(String resourceGroupName, String privateCloudName /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1907,29 +1529,25 @@ public void rotateNsxtPassword(String resourceGroupName, String privateCloudName /** * List the admin credentials for the private cloud. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAdminCredentialsWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listAdminCredentialsWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1941,23 +1559,14 @@ private Mono> listAdminCredentialsWithResponseAs } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listAdminCredentials( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the admin credentials for the private cloud. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1965,22 +1574,18 @@ private Mono> listAdminCredentialsWithResponseAs * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAdminCredentialsWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listAdminCredentialsWithResponseAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1992,20 +1597,13 @@ private Mono> listAdminCredentialsWithResponseAs } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAdminCredentials( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); + return service.listAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); } /** * List the admin credentials for the private cloud. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2021,7 +1619,7 @@ private Mono listAdminCredentialsAsync(String resourceGro /** * List the admin credentials for the private cloud. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -2031,14 +1629,14 @@ private Mono listAdminCredentialsAsync(String resourceGro * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context) { + public Response listAdminCredentialsWithResponse(String resourceGroupName, + String privateCloudName, Context context) { return listAdminCredentialsWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** * List the admin credentials for the private cloud. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2053,86 +1651,69 @@ public AdminCredentialsInner listAdminCredentials(String resourceGroupName, Stri /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listInSubscriptionNextSinglePageAsync(String nextLink) { @@ -2140,62 +1721,43 @@ private Mono> listInSubscriptionNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. + * + * @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 pageable list of scripts/cmdlets along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptCmdlet list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -511,37 +421,26 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. + * + * @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 pageable list of script executions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptExecution list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1299,37 +1073,26 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. + * + * @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 a list of the available script packages along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a ScriptPackage list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -458,37 +384,26 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a list of the available script packages along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a ScriptPackage list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -496,23 +411,13 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java index da824acd062db..952cb1c3a3d21 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -21,32 +21,29 @@ public final class ScriptPackagesImpl implements ScriptPackages { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public ScriptPackagesImpl( - ScriptPackagesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public ScriptPackagesImpl(ScriptPackagesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new ScriptPackageImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptPackageImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new ScriptPackageImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptPackageImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, scriptPackageName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptPackageName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, scriptPackageName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScriptPackageImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/TrialImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/TrialImpl.java index f88b14d500e70..5879989614aad 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/TrialImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/TrialImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java index 6a1dfa81691ad..eaae319fa0aa4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java @@ -1,11 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; import com.azure.resourcemanager.avs.models.VirtualMachine; +import com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; public final class VirtualMachineImpl implements VirtualMachine { @@ -30,6 +32,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public VirtualMachineProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String displayName() { return this.innerModel().displayName(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java index 8fdf779ba62ff..e22968774af50 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -32,122 +32,107 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.VirtualMachinesClient; import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; +import com.azure.resourcemanager.avs.implementation.models.VirtualMachineListResult; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; -import com.azure.resourcemanager.avs.models.VirtualMachinesList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in VirtualMachinesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualMachinesClient. + */ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final VirtualMachinesService service; - /** The service client containing this operation class. */ - private final AvsClientImpl client; + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; /** * Initializes an instance of VirtualMachinesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - VirtualMachinesClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(VirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + VirtualMachinesClientImpl(AVSClientImpl client) { + this.service + = RestProxy.create(VirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientVirtualMachines to be used by the proxy service to perform + * The interface defining all the services for AVSClientVirtualMachines to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AvsClientVirtualMach") + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientVirtualMach") public interface VirtualMachinesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("virtualMachineId") String virtualMachineId, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("virtualMachineId") String virtualMachineId, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restrictMovement( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> restrictMovement(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("virtualMachineId") String virtualMachineId, - @BodyParam("application/json") VirtualMachineRestrictMovement restrictMovement, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("virtualMachineId") String virtualMachineId, @HeaderParam("accept") String accept, + @BodyParam("application/json") VirtualMachineRestrictMovement restrictMovement, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a VirtualMachine list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -162,56 +147,36 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a VirtualMachine list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -227,127 +192,106 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines as paginated response with {@link PagedFlux}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String clusterName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines as paginated response with {@link PagedFlux}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String clusterName) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName)); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName, context)); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return a VirtualMachine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -366,54 +310,35 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - virtualMachineId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, virtualMachineId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return a VirtualMachine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -432,112 +357,92 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - virtualMachineId, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, virtualMachineId, accept, context); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud cluster on successful completion of {@link Mono}. + * @return a VirtualMachine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { + private Mono getAsync(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud cluster along with {@link Response}. + * @return a VirtualMachine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, context) .block(); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud cluster. + * @return a VirtualMachine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner get( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { + public VirtualMachineInner get(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId) { return getWithResponse(resourceGroupName, privateCloudName, clusterName, virtualMachineId, Context.NONE) .getValue(); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restrictMovementWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, + private Mono>> restrictMovementWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -562,31 +467,20 @@ private Mono>> restrictMovementWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .restrictMovement( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - virtualMachineId, - restrictMovement, - accept, - context)) + .withContext(context -> service.restrictMovement(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, virtualMachineId, + accept, restrictMovement, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -594,24 +488,16 @@ private Mono>> restrictMovementWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restrictMovementWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { + private Mono>> restrictMovementWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String virtualMachineId, + VirtualMachineRestrictMovement restrictMovement, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -636,57 +522,42 @@ private Mono>> restrictMovementWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .restrictMovement( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - virtualMachineId, - restrictMovement, - accept, - context); + return service.restrictMovement(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, virtualMachineId, accept, + restrictMovement, context); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestrictMovementAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, + private PollerFlux, Void> beginRestrictMovementAsync(String resourceGroupName, + String privateCloudName, String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { - Mono>> mono = - restrictMovementWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono = restrictMovementWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, virtualMachineId, restrictMovement); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -694,56 +565,46 @@ private PollerFlux, Void> beginRestrictMovementAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestrictMovementAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { + private PollerFlux, Void> beginRestrictMovementAsync(String resourceGroupName, + String privateCloudName, String clusterName, String virtualMachineId, + VirtualMachineRestrictMovement restrictMovement, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - restrictMovementWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = restrictMovementWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, virtualMachineId, restrictMovement, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement) { + public SyncPoller, Void> beginRestrictMovement(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { return this - .beginRestrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement) + .beginRestrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement) .getSyncPoller(); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -751,53 +612,42 @@ public SyncPoller, Void> beginRestrictMovement( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { + public SyncPoller, Void> beginRestrictMovement(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context) { return this - .beginRestrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context) + .beginRestrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement, context) .getSyncPoller(); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restrictMovementAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement) { - return beginRestrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono restrictMovementAsync(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { + return beginRestrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement).last().flatMap(this.client::getLroFinalResultOrError); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -805,77 +655,60 @@ private Mono restrictMovementAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restrictMovementAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { - return beginRestrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono restrictMovementAsync(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context) { + return beginRestrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement) { + public void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { restrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement) .block(); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { - restrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context) - .block(); + public void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context) { + restrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, + context).block(); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a VirtualMachine list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -883,36 +716,26 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @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 a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a VirtualMachine list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -920,23 +743,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java index 12e5bb4e520a6..761b520d83dd2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -22,50 +22,41 @@ public final class VirtualMachinesImpl implements VirtualMachines { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public VirtualMachinesImpl( - VirtualMachinesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public VirtualMachinesImpl(VirtualMachinesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); - return Utils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, virtualMachineId, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, virtualMachineId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new VirtualMachineImpl(inner.getValue(), this.manager())); } else { return null; } } - public VirtualMachine get( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { - VirtualMachineInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, virtualMachineId); + public VirtualMachine get(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId) { + VirtualMachineInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, virtualMachineId); if (inner != null) { return new VirtualMachineImpl(inner, this.manager()); } else { @@ -73,28 +64,17 @@ public VirtualMachine get( } } - public void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement) { - this - .serviceClient() + public void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { + this.serviceClient() .restrictMovement(resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement); } - public void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { - this - .serviceClient() - .restrictMovement( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context); + public void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context) { + this.serviceClient() + .restrictMovement(resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, + context); } private VirtualMachinesClient serviceClient() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java new file mode 100644 index 0000000000000..f87162b155027 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java @@ -0,0 +1,1208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDhcpConfigurationsClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; +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 WorkloadNetworkDhcpConfigurationsClient. + */ +public final class WorkloadNetworkDhcpConfigurationsClientImpl implements WorkloadNetworkDhcpConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkloadNetworkDhcpConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; + + /** + * Initializes an instance of WorkloadNetworkDhcpConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkloadNetworkDhcpConfigurationsClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(WorkloadNetworkDhcpConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AVSClientWorkloadNetworkDhcpConfigurations to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") + public interface WorkloadNetworkDhcpConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetwork(@HostParam("endpoint") 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}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dhcpId") String dhcpId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkSinglePageAsync(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.listByWorkloadNetwork(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 WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkSinglePageAsync(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 + .listByWorkloadNetwork(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 WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String dhcpId, + String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dhcpId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String dhcpId, + String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dhcpId, privateCloudName, accept, context); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String dhcpId, String privateCloudName) { + return getWithResponseAsync(resourceGroupName, dhcpId, privateCloudName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String dhcpId, + String privateCloudName, Context context) { + return getWithResponseAsync(resourceGroupName, dhcpId, privateCloudName, context).block(); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner get(String resourceGroupName, String dhcpId, String privateCloudName) { + return getWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, + workloadNetworkDhcp, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, dhcpId, accept, workloadNetworkDhcp, context); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDhcpInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDhcpInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDhcpInner> beginCreate( + String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDhcpInner> beginCreate( + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, + Context context) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return beginCreateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return beginCreateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner create(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return createAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner create(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return createAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, + workloadNetworkDhcp, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, dhcpId, accept, workloadNetworkDhcp, context); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDhcpInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDhcpInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, + Context context) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + return beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + return updateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { + return updateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String dhcpId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String dhcpId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, dhcpId, accept, context); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String dhcpId) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, dhcpId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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 dhcpId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String dhcpId) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, dhcpId).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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 dhcpId, Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, dhcpId, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String dhcpId) { + return beginDeleteAsync(resourceGroupName, privateCloudName, dhcpId).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, dhcpId, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String privateCloudName, String dhcpId) { + deleteAsync(resourceGroupName, privateCloudName, dhcpId).block(); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { + deleteAsync(resourceGroupName, privateCloudName, dhcpId, 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 WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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 WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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/WorkloadNetworkDhcpConfigurationsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsImpl.java new file mode 100644 index 0000000000000..50410ebad3627 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsImpl.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDhcpConfigurationsClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpConfigurations; + +public final class WorkloadNetworkDhcpConfigurationsImpl implements WorkloadNetworkDhcpConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDhcpConfigurationsImpl.class); + + private final WorkloadNetworkDhcpConfigurationsClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public WorkloadNetworkDhcpConfigurationsImpl(WorkloadNetworkDhcpConfigurationsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String dhcpId, + String privateCloudName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, dhcpId, privateCloudName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkDhcpImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkDhcp get(String resourceGroupName, String dhcpId, String privateCloudName) { + WorkloadNetworkDhcpInner inner = this.serviceClient().get(resourceGroupName, dhcpId, privateCloudName); + if (inner != null) { + return new WorkloadNetworkDhcpImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String privateCloudName, String dhcpId) { + this.serviceClient().delete(resourceGroupName, privateCloudName, dhcpId); + } + + public void delete(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { + this.serviceClient().delete(resourceGroupName, privateCloudName, dhcpId, context); + } + + public WorkloadNetworkDhcp 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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); + if (dhcpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + String privateCloudName = 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))); + } + return this.getWithResponse(resourceGroupName, dhcpId, privateCloudName, 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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); + if (dhcpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + String privateCloudName = 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))); + } + return this.getWithResponse(resourceGroupName, dhcpId, privateCloudName, 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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); + if (dhcpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + this.delete(resourceGroupName, privateCloudName, dhcpId, 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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); + if (dhcpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + this.delete(resourceGroupName, privateCloudName, dhcpId, context); + } + + private WorkloadNetworkDhcpConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public WorkloadNetworkDhcpImpl define(String name) { + return new WorkloadNetworkDhcpImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java index 58335abd89d75..c35d48ac3175a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDhcpInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; public final class WorkloadNetworkDhcpImpl implements WorkloadNetworkDhcp, WorkloadNetworkDhcp.Definition, WorkloadNetworkDhcp.Update { @@ -31,6 +33,10 @@ public WorkloadNetworkDhcpEntity properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -49,6 +55,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String dhcpId; + private WorkloadNetworkDhcpUpdate updateWorkloadNetworkDhcp; + public WorkloadNetworkDhcpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -56,20 +64,16 @@ public WorkloadNetworkDhcpImpl withExistingPrivateCloud(String resourceGroupName } public WorkloadNetworkDhcp create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDhcpConfigurations() + .create(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDhcp create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDhcpConfigurations() + .create(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); return this; } @@ -80,58 +84,60 @@ public WorkloadNetworkDhcp create(Context context) { } public WorkloadNetworkDhcpImpl update() { + this.updateWorkloadNetworkDhcp = new WorkloadNetworkDhcpUpdate(); return this; } public WorkloadNetworkDhcp apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDhcpConfigurations() + .update(resourceGroupName, privateCloudName, dhcpId, updateWorkloadNetworkDhcp, Context.NONE); return this; } public WorkloadNetworkDhcp apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDhcpConfigurations() + .update(resourceGroupName, privateCloudName, dhcpId, updateWorkloadNetworkDhcp, context); return this; } - WorkloadNetworkDhcpImpl( - WorkloadNetworkDhcpInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkDhcpImpl(WorkloadNetworkDhcpInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.dhcpId = Utils.getValueFromIdByName(innerObject.id(), "dhcpConfigurations"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.dhcpId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dhcpConfigurations"); } public WorkloadNetworkDhcp refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDhcpConfigurations() + .getWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE) + .getValue(); return this; } public WorkloadNetworkDhcp refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDhcpConfigurations() + .getWithResponse(resourceGroupName, dhcpId, privateCloudName, context) + .getValue(); return this; } public WorkloadNetworkDhcpImpl withProperties(WorkloadNetworkDhcpEntity properties) { - this.innerModel().withProperties(properties); - return this; + if (isInCreateMode()) { + this.innerModel().withProperties(properties); + return this; + } else { + this.updateWorkloadNetworkDhcp.withProperties(properties); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java index 895afaf8bff5b..587e9ec5dfc09 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java @@ -1,15 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsServiceInner; import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import com.azure.resourcemanager.avs.models.DnsServiceStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; import java.util.Collections; import java.util.List; @@ -31,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -86,6 +92,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String dnsServiceId; + private WorkloadNetworkDnsServiceUpdate updateWorkloadNetworkDnsService; + public WorkloadNetworkDnsServiceImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -93,20 +101,16 @@ public WorkloadNetworkDnsServiceImpl withExistingPrivateCloud(String resourceGro } public WorkloadNetworkDnsService create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsServices() + .create(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsService create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsServices() + .create(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); return this; } @@ -117,83 +121,110 @@ public WorkloadNetworkDnsService create(Context context) { } public WorkloadNetworkDnsServiceImpl update() { + this.updateWorkloadNetworkDnsService = new WorkloadNetworkDnsServiceUpdate(); return this; } public WorkloadNetworkDnsService apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsServices() + .update(resourceGroupName, privateCloudName, dnsServiceId, updateWorkloadNetworkDnsService, Context.NONE); return this; } public WorkloadNetworkDnsService apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsServices() + .update(resourceGroupName, privateCloudName, dnsServiceId, updateWorkloadNetworkDnsService, context); return this; } - WorkloadNetworkDnsServiceImpl( - WorkloadNetworkDnsServiceInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkDnsServiceImpl(WorkloadNetworkDnsServiceInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.dnsServiceId = Utils.getValueFromIdByName(innerObject.id(), "dnsServices"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.dnsServiceId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsServices"); } public WorkloadNetworkDnsService refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsServices() + .getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) + .getValue(); return this; } public WorkloadNetworkDnsService refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsServices() + .getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context) + .getValue(); return this; } public WorkloadNetworkDnsServiceImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateWorkloadNetworkDnsService.withDisplayName(displayName); + return this; + } } public WorkloadNetworkDnsServiceImpl withDnsServiceIp(String dnsServiceIp) { - this.innerModel().withDnsServiceIp(dnsServiceIp); - return this; + if (isInCreateMode()) { + this.innerModel().withDnsServiceIp(dnsServiceIp); + return this; + } else { + this.updateWorkloadNetworkDnsService.withDnsServiceIp(dnsServiceIp); + return this; + } } public WorkloadNetworkDnsServiceImpl withDefaultDnsZone(String defaultDnsZone) { - this.innerModel().withDefaultDnsZone(defaultDnsZone); - return this; + if (isInCreateMode()) { + this.innerModel().withDefaultDnsZone(defaultDnsZone); + return this; + } else { + this.updateWorkloadNetworkDnsService.withDefaultDnsZone(defaultDnsZone); + return this; + } } public WorkloadNetworkDnsServiceImpl withFqdnZones(List fqdnZones) { - this.innerModel().withFqdnZones(fqdnZones); - return this; + if (isInCreateMode()) { + this.innerModel().withFqdnZones(fqdnZones); + return this; + } else { + this.updateWorkloadNetworkDnsService.withFqdnZones(fqdnZones); + return this; + } } public WorkloadNetworkDnsServiceImpl withLogLevel(DnsServiceLogLevelEnum logLevel) { - this.innerModel().withLogLevel(logLevel); - return this; + if (isInCreateMode()) { + this.innerModel().withLogLevel(logLevel); + return this; + } else { + this.updateWorkloadNetworkDnsService.withLogLevel(logLevel); + return this; + } } public WorkloadNetworkDnsServiceImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateWorkloadNetworkDnsService.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java new file mode 100644 index 0000000000000..67f5d1f0b820c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java @@ -0,0 +1,1225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsServicesClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServiceListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; +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 WorkloadNetworkDnsServicesClient. + */ +public final class WorkloadNetworkDnsServicesClientImpl implements WorkloadNetworkDnsServicesClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkloadNetworkDnsServicesService service; + + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; + + /** + * Initializes an instance of WorkloadNetworkDnsServicesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkloadNetworkDnsServicesClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(WorkloadNetworkDnsServicesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AVSClientWorkloadNetworkDnsServices to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") + public interface WorkloadNetworkDnsServicesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetwork( + @HostParam("endpoint") 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}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsServiceId") String dnsServiceId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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.listByWorkloadNetwork(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 WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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 + .listByWorkloadNetwork(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 WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, dnsServiceId, accept, context); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId) { + return getWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String dnsServiceId, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, context).block(); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner get(String resourceGroupName, String privateCloudName, String dnsServiceId) { + return getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, + workloadNetworkDnsService, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, dnsServiceId, accept, workloadNetworkDnsService, context); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsServiceInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsServiceInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, privateCloudName, + dnsServiceId, workloadNetworkDnsService, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + context); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreate( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreate( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return this + .beginCreateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return beginCreateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return beginCreateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner create(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return createAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).block(); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner create(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return createAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) + .block(); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, + workloadNetworkDnsService, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, dnsServiceId, accept, workloadNetworkDnsService, context); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsServiceInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsServiceInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, + dnsServiceId, workloadNetworkDnsService, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + context); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + return this + .beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + return beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + return updateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).block(); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + return updateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) + .block(); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsServiceId, + 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 (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsServiceId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsServiceId, + String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsServiceId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsServiceId, + String privateCloudName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsServiceId, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsServiceId, + String privateCloudName) { + return this.beginDeleteAsync(resourceGroupName, dnsServiceId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsServiceId, + String privateCloudName, Context context) { + return this.beginDeleteAsync(resourceGroupName, dnsServiceId, privateCloudName, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsServiceId, String privateCloudName) { + return beginDeleteAsync(resourceGroupName, dnsServiceId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsServiceId, String privateCloudName, + Context context) { + return beginDeleteAsync(resourceGroupName, dnsServiceId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 dnsServiceId, String privateCloudName) { + deleteAsync(resourceGroupName, dnsServiceId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 dnsServiceId, String privateCloudName, Context context) { + deleteAsync(resourceGroupName, dnsServiceId, privateCloudName, 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 WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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 WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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/WorkloadNetworkDnsServicesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesImpl.java new file mode 100644 index 0000000000000..a6b2295ac5b28 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsServicesClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServices; + +public final class WorkloadNetworkDnsServicesImpl implements WorkloadNetworkDnsServices { + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsServicesImpl.class); + + private final WorkloadNetworkDnsServicesClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public WorkloadNetworkDnsServicesImpl(WorkloadNetworkDnsServicesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String dnsServiceId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkDnsServiceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkDnsService get(String resourceGroupName, String privateCloudName, String dnsServiceId) { + WorkloadNetworkDnsServiceInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, dnsServiceId); + if (inner != null) { + return new WorkloadNetworkDnsServiceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String dnsServiceId, String privateCloudName) { + this.serviceClient().delete(resourceGroupName, dnsServiceId, privateCloudName); + } + + public void delete(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { + this.serviceClient().delete(resourceGroupName, dnsServiceId, privateCloudName, context); + } + + public WorkloadNetworkDnsService 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 dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, 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 dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, 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 dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, dnsServiceId, privateCloudName, 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 dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, dnsServiceId, privateCloudName, context); + } + + private WorkloadNetworkDnsServicesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public WorkloadNetworkDnsServiceImpl define(String name) { + return new WorkloadNetworkDnsServiceImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java index f74b0b96cd387..220506b5d1fe1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsZoneInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; import java.util.Collections; import java.util.List; @@ -29,6 +31,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -55,7 +61,7 @@ public String sourceIp() { return this.innerModel().sourceIp(); } - public Long dnsServices() { + public Integer dnsServices() { return this.innerModel().dnsServices(); } @@ -85,6 +91,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String dnsZoneId; + private WorkloadNetworkDnsZoneUpdate updateWorkloadNetworkDnsZone; + public WorkloadNetworkDnsZoneImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -92,20 +100,16 @@ public WorkloadNetworkDnsZoneImpl withExistingPrivateCloud(String resourceGroupN } public WorkloadNetworkDnsZone create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsZones() + .create(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsZone create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsZones() + .create(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); return this; } @@ -116,83 +120,110 @@ public WorkloadNetworkDnsZone create(Context context) { } public WorkloadNetworkDnsZoneImpl update() { + this.updateWorkloadNetworkDnsZone = new WorkloadNetworkDnsZoneUpdate(); return this; } public WorkloadNetworkDnsZone apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsZones() + .update(resourceGroupName, privateCloudName, dnsZoneId, updateWorkloadNetworkDnsZone, Context.NONE); return this; } public WorkloadNetworkDnsZone apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsZones() + .update(resourceGroupName, privateCloudName, dnsZoneId, updateWorkloadNetworkDnsZone, context); return this; } - WorkloadNetworkDnsZoneImpl( - WorkloadNetworkDnsZoneInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkDnsZoneImpl(WorkloadNetworkDnsZoneInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.dnsZoneId = Utils.getValueFromIdByName(innerObject.id(), "dnsZones"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.dnsZoneId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsZones"); } public WorkloadNetworkDnsZone refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsZones() + .getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE) + .getValue(); return this; } public WorkloadNetworkDnsZone refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkDnsZones() + .getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context) + .getValue(); return this; } public WorkloadNetworkDnsZoneImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withDisplayName(displayName); + return this; + } } public WorkloadNetworkDnsZoneImpl withDomain(List domain) { - this.innerModel().withDomain(domain); - return this; + if (isInCreateMode()) { + this.innerModel().withDomain(domain); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withDomain(domain); + return this; + } } public WorkloadNetworkDnsZoneImpl withDnsServerIps(List dnsServerIps) { - this.innerModel().withDnsServerIps(dnsServerIps); - return this; + if (isInCreateMode()) { + this.innerModel().withDnsServerIps(dnsServerIps); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withDnsServerIps(dnsServerIps); + return this; + } } public WorkloadNetworkDnsZoneImpl withSourceIp(String sourceIp) { - this.innerModel().withSourceIp(sourceIp); - return this; + if (isInCreateMode()) { + this.innerModel().withSourceIp(sourceIp); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withSourceIp(sourceIp); + return this; + } } - public WorkloadNetworkDnsZoneImpl withDnsServices(Long dnsServices) { - this.innerModel().withDnsServices(dnsServices); - return this; + public WorkloadNetworkDnsZoneImpl withDnsServices(Integer dnsServices) { + if (isInCreateMode()) { + this.innerModel().withDnsServices(dnsServices); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withDnsServices(dnsServices); + return this; + } } public WorkloadNetworkDnsZoneImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java new file mode 100644 index 0000000000000..4d24f0d637824 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java @@ -0,0 +1,1214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsZonesClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZoneListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; +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 WorkloadNetworkDnsZonesClient. + */ +public final class WorkloadNetworkDnsZonesClientImpl implements WorkloadNetworkDnsZonesClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkloadNetworkDnsZonesService service; + + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; + + /** + * Initializes an instance of WorkloadNetworkDnsZonesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkloadNetworkDnsZonesClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(WorkloadNetworkDnsZonesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AVSClientWorkloadNetworkDnsZones to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") + public interface WorkloadNetworkDnsZonesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetwork(@HostParam("endpoint") 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}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsZoneId") String dnsZoneId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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.listByWorkloadNetwork(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 WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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 + .listByWorkloadNetwork(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 WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsZoneId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsZoneId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, dnsZoneId, accept, context); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId) { + return getWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String dnsZoneId, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, context).block(); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner get(String resourceGroupName, String privateCloudName, String dnsZoneId) { + return getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, + workloadNetworkDnsZone, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, dnsZoneId, accept, workloadNetworkDnsZone, context); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + context); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreate( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreate( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return beginCreateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return beginCreateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner create(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return createAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner create(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return createAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).block(); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, + workloadNetworkDnsZone, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, dnsZoneId, accept, workloadNetworkDnsZone, context); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + context); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + return beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + return updateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + return updateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).block(); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsZoneId, + 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 (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsZoneId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsZoneId, + String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dnsZoneId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsZoneId, + String privateCloudName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsZoneId, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsZoneId, + String privateCloudName) { + return this.beginDeleteAsync(resourceGroupName, dnsZoneId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsZoneId, + String privateCloudName, Context context) { + return this.beginDeleteAsync(resourceGroupName, dnsZoneId, privateCloudName, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsZoneId, String privateCloudName) { + return beginDeleteAsync(resourceGroupName, dnsZoneId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 dnsZoneId, String privateCloudName, + Context context) { + return beginDeleteAsync(resourceGroupName, dnsZoneId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 dnsZoneId, String privateCloudName) { + deleteAsync(resourceGroupName, dnsZoneId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 dnsZoneId, String privateCloudName, Context context) { + deleteAsync(resourceGroupName, dnsZoneId, privateCloudName, 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 WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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 WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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/WorkloadNetworkDnsZonesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesImpl.java new file mode 100644 index 0000000000000..a18e2a55b7622 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesImpl.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsZonesClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZones; + +public final class WorkloadNetworkDnsZonesImpl implements WorkloadNetworkDnsZones { + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsZonesImpl.class); + + private final WorkloadNetworkDnsZonesClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public WorkloadNetworkDnsZonesImpl(WorkloadNetworkDnsZonesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String dnsZoneId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkDnsZoneImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkDnsZone get(String resourceGroupName, String privateCloudName, String dnsZoneId) { + WorkloadNetworkDnsZoneInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, dnsZoneId); + if (inner != null) { + return new WorkloadNetworkDnsZoneImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String dnsZoneId, String privateCloudName) { + this.serviceClient().delete(resourceGroupName, dnsZoneId, privateCloudName); + } + + public void delete(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { + this.serviceClient().delete(resourceGroupName, dnsZoneId, privateCloudName, context); + } + + public WorkloadNetworkDnsZone 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 dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, 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 dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, 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 dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, dnsZoneId, privateCloudName, 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 dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, dnsZoneId, privateCloudName, context); + } + + private WorkloadNetworkDnsZonesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public WorkloadNetworkDnsZoneImpl define(String name) { + return new WorkloadNetworkDnsZoneImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java index 247cb47681549..3ad87e4e80a3f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java @@ -1,19 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; public final class WorkloadNetworkGatewayImpl implements WorkloadNetworkGateway { private WorkloadNetworkGatewayInner innerObject; private final com.azure.resourcemanager.avs.AvsManager serviceManager; - WorkloadNetworkGatewayImpl( - WorkloadNetworkGatewayInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkGatewayImpl(WorkloadNetworkGatewayInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -30,6 +32,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String displayName() { return this.innerModel().displayName(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java new file mode 100644 index 0000000000000..2f912dac0fe8e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkGatewaysClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkGatewaysClient. + */ +public final class WorkloadNetworkGatewaysClientImpl implements WorkloadNetworkGatewaysClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkloadNetworkGatewaysService service; + + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; + + /** + * Initializes an instance of WorkloadNetworkGatewaysClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkloadNetworkGatewaysClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(WorkloadNetworkGatewaysService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AVSClientWorkloadNetworkGateways to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") + public interface WorkloadNetworkGatewaysService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetwork(@HostParam("endpoint") 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}/workloadNetworks/default/gateways/{gatewayId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("gatewayId") String gatewayId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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.listByWorkloadNetwork(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 WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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 + .listByWorkloadNetwork(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 WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String gatewayId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (gatewayId == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, gatewayId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String gatewayId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (gatewayId == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, gatewayId, accept, context); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String gatewayId) { + return getWithResponseAsync(resourceGroupName, privateCloudName, gatewayId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String gatewayId, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, gatewayId, context).block(); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkGatewayInner get(String resourceGroupName, String privateCloudName, String gatewayId) { + return getWithResponse(resourceGroupName, privateCloudName, gatewayId, 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 WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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 WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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/WorkloadNetworkGatewaysImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysImpl.java new file mode 100644 index 0000000000000..edacd60d588c9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysImpl.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkGatewaysClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; +import com.azure.resourcemanager.avs.models.WorkloadNetworkGateways; + +public final class WorkloadNetworkGatewaysImpl implements WorkloadNetworkGateways { + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkGatewaysImpl.class); + + private final WorkloadNetworkGatewaysClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public WorkloadNetworkGatewaysImpl(WorkloadNetworkGatewaysClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String gatewayId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, gatewayId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkGatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkGateway get(String resourceGroupName, String privateCloudName, String gatewayId) { + WorkloadNetworkGatewayInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, gatewayId); + if (inner != null) { + return new WorkloadNetworkGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + private WorkloadNetworkGatewaysClient 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/WorkloadNetworkImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java index 1e66a40f2999a..dcd7f17db792a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java @@ -1,11 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; import com.azure.resourcemanager.avs.models.WorkloadNetwork; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; public final class WorkloadNetworkImpl implements WorkloadNetwork { private WorkloadNetworkInner innerObject; @@ -29,6 +31,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public WorkloadNetworkInner innerModel() { return this.innerObject; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java index e9195066f1158..582173de574e7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java @@ -1,20 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPortMirroringInner; import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.PortMirroringStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; -public final class WorkloadNetworkPortMirroringImpl - implements WorkloadNetworkPortMirroring, - WorkloadNetworkPortMirroring.Definition, - WorkloadNetworkPortMirroring.Update { +public final class WorkloadNetworkPortMirroringImpl implements WorkloadNetworkPortMirroring, + WorkloadNetworkPortMirroring.Definition, WorkloadNetworkPortMirroring.Update { private WorkloadNetworkPortMirroringInner innerObject; private final com.azure.resourcemanager.avs.AvsManager serviceManager; @@ -31,6 +31,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -77,29 +81,26 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String portMirroringId; - public WorkloadNetworkPortMirroringImpl withExistingPrivateCloud( - String resourceGroupName, String privateCloudName) { + private WorkloadNetworkPortMirroringUpdate updateWorkloadNetworkPortMirroring; + + public WorkloadNetworkPortMirroringImpl withExistingPrivateCloud(String resourceGroupName, + String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; return this; } public WorkloadNetworkPortMirroring create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createPortMirroring( - resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPortMirroringProfiles() + .create(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPortMirroring create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createPortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPortMirroringProfiles() + .create(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); return this; } @@ -110,79 +111,101 @@ public WorkloadNetworkPortMirroring create(Context context) { } public WorkloadNetworkPortMirroringImpl update() { + this.updateWorkloadNetworkPortMirroring = new WorkloadNetworkPortMirroringUpdate(); return this; } public WorkloadNetworkPortMirroring apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updatePortMirroring( - resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPortMirroringProfiles() + .update(resourceGroupName, privateCloudName, portMirroringId, updateWorkloadNetworkPortMirroring, + Context.NONE); return this; } public WorkloadNetworkPortMirroring apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updatePortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPortMirroringProfiles() + .update(resourceGroupName, privateCloudName, portMirroringId, updateWorkloadNetworkPortMirroring, context); return this; } - WorkloadNetworkPortMirroringImpl( - WorkloadNetworkPortMirroringInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkPortMirroringImpl(WorkloadNetworkPortMirroringInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.portMirroringId = Utils.getValueFromIdByName(innerObject.id(), "portMirroringProfiles"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.portMirroringId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "portMirroringProfiles"); } public WorkloadNetworkPortMirroring refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPortMirroringProfiles() + .getWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) + .getValue(); return this; } public WorkloadNetworkPortMirroring refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPortMirroringProfiles() + .getWithResponse(resourceGroupName, privateCloudName, portMirroringId, context) + .getValue(); return this; } public WorkloadNetworkPortMirroringImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withDisplayName(displayName); + return this; + } } public WorkloadNetworkPortMirroringImpl withDirection(PortMirroringDirectionEnum direction) { - this.innerModel().withDirection(direction); - return this; + if (isInCreateMode()) { + this.innerModel().withDirection(direction); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withDirection(direction); + return this; + } } public WorkloadNetworkPortMirroringImpl withSource(String source) { - this.innerModel().withSource(source); - return this; + if (isInCreateMode()) { + this.innerModel().withSource(source); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withSource(source); + return this; + } } public WorkloadNetworkPortMirroringImpl withDestination(String destination) { - this.innerModel().withDestination(destination); - return this; + if (isInCreateMode()) { + this.innerModel().withDestination(destination); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withDestination(destination); + return this; + } } public WorkloadNetworkPortMirroringImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java new file mode 100644 index 0000000000000..7b7dd26ec24d1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java @@ -0,0 +1,1244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkPortMirroringProfilesClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; +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 + * WorkloadNetworkPortMirroringProfilesClient. + */ +public final class WorkloadNetworkPortMirroringProfilesClientImpl + implements WorkloadNetworkPortMirroringProfilesClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkloadNetworkPortMirroringProfilesService service; + + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; + + /** + * Initializes an instance of WorkloadNetworkPortMirroringProfilesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkloadNetworkPortMirroringProfilesClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(WorkloadNetworkPortMirroringProfilesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AVSClientWorkloadNetworkPortMirroringProfiles to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") + public interface WorkloadNetworkPortMirroringProfilesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetwork( + @HostParam("endpoint") 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}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("portMirroringId") String portMirroringId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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.listByWorkloadNetwork(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 WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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 + .listByWorkloadNetwork(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 WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String portMirroringId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String portMirroringId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, portMirroringId, accept, context); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String portMirroringId) { + return getWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String privateCloudName, String portMirroringId, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, context).block(); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner get(String resourceGroupName, String privateCloudName, + String portMirroringId) { + return getWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, + workloadNetworkPortMirroring, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, portMirroringId, accept, workloadNetworkPortMirroring, context); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginCreateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + Mono>> mono = createWithResponseAsync(resourceGroupName, privateCloudName, + portMirroringId, workloadNetworkPortMirroring); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, this.client.getContext()); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginCreateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, privateCloudName, + portMirroringId, workloadNetworkPortMirroring, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, context); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPortMirroringInner> beginCreate( + String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPortMirroringInner> beginCreate( + String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return this + .beginCreateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, + context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return beginCreateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return beginCreateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner create(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return createAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).block(); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner create(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return createAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) + .block(); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, + workloadNetworkPortMirroring, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, portMirroringId, accept, workloadNetworkPortMirroring, context); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginUpdateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, + portMirroringId, workloadNetworkPortMirroring); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, this.client.getContext()); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginUpdateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, + portMirroringId, workloadNetworkPortMirroring, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, context); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( + String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( + String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + return this + .beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, + context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + return beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + return updateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).block(); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + return updateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) + .block(); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String portMirroringId, + String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, portMirroringId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 portMirroringId, + String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, portMirroringId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String portMirroringId, + String privateCloudName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 portMirroringId, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String portMirroringId, + String privateCloudName) { + return this.beginDeleteAsync(resourceGroupName, portMirroringId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 portMirroringId, + String privateCloudName, Context context) { + return this.beginDeleteAsync(resourceGroupName, portMirroringId, privateCloudName, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String portMirroringId, String privateCloudName) { + return beginDeleteAsync(resourceGroupName, portMirroringId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 portMirroringId, String privateCloudName, + Context context) { + return beginDeleteAsync(resourceGroupName, portMirroringId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String portMirroringId, String privateCloudName) { + deleteAsync(resourceGroupName, portMirroringId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 portMirroringId, String privateCloudName, Context context) { + deleteAsync(resourceGroupName, portMirroringId, privateCloudName, 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 WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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 WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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/WorkloadNetworkPortMirroringProfilesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesImpl.java new file mode 100644 index 0000000000000..d49b6bc95fbb4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesImpl.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPortMirroringProfilesClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProfiles; + +public final class WorkloadNetworkPortMirroringProfilesImpl implements WorkloadNetworkPortMirroringProfiles { + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPortMirroringProfilesImpl.class); + + private final WorkloadNetworkPortMirroringProfilesClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public WorkloadNetworkPortMirroringProfilesImpl(WorkloadNetworkPortMirroringProfilesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String portMirroringId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkPortMirroringImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkPortMirroring get(String resourceGroupName, String privateCloudName, String portMirroringId) { + WorkloadNetworkPortMirroringInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, portMirroringId); + if (inner != null) { + return new WorkloadNetworkPortMirroringImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String portMirroringId, String privateCloudName) { + this.serviceClient().delete(resourceGroupName, portMirroringId, privateCloudName); + } + + public void delete(String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { + this.serviceClient().delete(resourceGroupName, portMirroringId, privateCloudName, context); + } + + public WorkloadNetworkPortMirroring 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 portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, portMirroringId, 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 portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, portMirroringId, 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 portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, portMirroringId, privateCloudName, 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 portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, portMirroringId, privateCloudName, context); + } + + private WorkloadNetworkPortMirroringProfilesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public WorkloadNetworkPortMirroringImpl define(String name) { + return new WorkloadNetworkPortMirroringImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java index 705f280d41973..238e2478d0a34 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPublicIpInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; @@ -14,8 +15,8 @@ public final class WorkloadNetworkPublicIpImpl implements WorkloadNetworkPublicI private final com.azure.resourcemanager.avs.AvsManager serviceManager; - WorkloadNetworkPublicIpImpl( - WorkloadNetworkPublicIpInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkPublicIpImpl(WorkloadNetworkPublicIpInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -32,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -40,8 +45,8 @@ public Long numberOfPublicIPs() { return this.innerModel().numberOfPublicIPs(); } - public String publicIpBlock() { - return this.innerModel().publicIpBlock(); + public String publicIPBlock() { + return this.innerModel().publicIPBlock(); } public WorkloadNetworkPublicIpProvisioningState provisioningState() { @@ -60,7 +65,7 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; - private String publicIpId; + private String publicIPId; public WorkloadNetworkPublicIpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; @@ -69,46 +74,38 @@ public WorkloadNetworkPublicIpImpl withExistingPrivateCloud(String resourceGroup } public WorkloadNetworkPublicIp create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createPublicIp(resourceGroupName, privateCloudName, publicIpId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPublicIps() + .create(resourceGroupName, privateCloudName, publicIPId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPublicIp create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createPublicIp(resourceGroupName, privateCloudName, publicIpId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPublicIps() + .create(resourceGroupName, privateCloudName, publicIPId, this.innerModel(), context); return this; } WorkloadNetworkPublicIpImpl(String name, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = new WorkloadNetworkPublicIpInner(); this.serviceManager = serviceManager; - this.publicIpId = name; + this.publicIPId = name; } public WorkloadNetworkPublicIp refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPublicIps() + .getWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE) + .getValue(); return this; } public WorkloadNetworkPublicIp refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkPublicIps() + .getWithResponse(resourceGroupName, privateCloudName, publicIPId, context) + .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java new file mode 100644 index 0000000000000..0101e17446a77 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java @@ -0,0 +1,946 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPublicIpsClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPListResult; +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 WorkloadNetworkPublicIpsClient. + */ +public final class WorkloadNetworkPublicIpsClientImpl implements WorkloadNetworkPublicIpsClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkloadNetworkPublicIpsService service; + + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; + + /** + * Initializes an instance of WorkloadNetworkPublicIpsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkloadNetworkPublicIpsClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(WorkloadNetworkPublicIpsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AVSClientWorkloadNetworkPublicIps to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") + public interface WorkloadNetworkPublicIpsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetwork(@HostParam("endpoint") 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}/workloadNetworks/default/publicIPs/{publicIPId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIPId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIPId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("publicIPId") String publicIPId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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.listByWorkloadNetwork(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 WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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 + .listByWorkloadNetwork(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 WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String publicIPId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String publicIPId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, publicIPId, accept, context); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String publicIPId) { + return getWithResponseAsync(resourceGroupName, privateCloudName, publicIPId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String publicIPId, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, context).block(); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPublicIpInner get(String resourceGroupName, String privateCloudName, String publicIPId) { + return getWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (workloadNetworkPublicIP == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPublicIP is required and cannot be null.")); + } else { + workloadNetworkPublicIP.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, + workloadNetworkPublicIP, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (workloadNetworkPublicIP == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPublicIP is required and cannot be null.")); + } else { + workloadNetworkPublicIP.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, publicIPId, accept, workloadNetworkPublicIP, context); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPublicIpInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPublicIpInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, + workloadNetworkPublicIP, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, + context); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPublicIpInner> beginCreate( + String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPublicIpInner> beginCreate( + String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return beginCreateAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + return beginCreateAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPublicIpInner create(String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return createAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP).block(); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPublicIpInner create(String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + return createAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context).block(); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publicIPId, + 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 (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publicIPId, + String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, publicIPId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publicIPId, + String privateCloudName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, publicIPId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publicIPId, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, publicIPId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publicIPId, + String privateCloudName) { + return this.beginDeleteAsync(resourceGroupName, publicIPId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publicIPId, + String privateCloudName, Context context) { + return this.beginDeleteAsync(resourceGroupName, publicIPId, privateCloudName, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publicIPId, String privateCloudName) { + return beginDeleteAsync(resourceGroupName, publicIPId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 publicIPId, String privateCloudName, + Context context) { + return beginDeleteAsync(resourceGroupName, publicIPId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 publicIPId, String privateCloudName) { + deleteAsync(resourceGroupName, publicIPId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 publicIPId, String privateCloudName, Context context) { + deleteAsync(resourceGroupName, publicIPId, privateCloudName, 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 WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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 WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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/WorkloadNetworkPublicIpsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsImpl.java new file mode 100644 index 0000000000000..e4956a67c6c93 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsImpl.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPublicIpsClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIps; + +public final class WorkloadNetworkPublicIpsImpl implements WorkloadNetworkPublicIps { + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPublicIpsImpl.class); + + private final WorkloadNetworkPublicIpsClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public WorkloadNetworkPublicIpsImpl(WorkloadNetworkPublicIpsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String publicIPId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, publicIPId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkPublicIpImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkPublicIp get(String resourceGroupName, String privateCloudName, String publicIPId) { + WorkloadNetworkPublicIpInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, publicIPId); + if (inner != null) { + return new WorkloadNetworkPublicIpImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String publicIPId, String privateCloudName) { + this.serviceClient().delete(resourceGroupName, publicIPId, privateCloudName); + } + + public void delete(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { + this.serviceClient().delete(resourceGroupName, publicIPId, privateCloudName, context); + } + + public WorkloadNetworkPublicIp 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 publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIPId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, publicIPId, 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 publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIPId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, publicIPId, 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 publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIPId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, publicIPId, privateCloudName, 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 publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIPId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, publicIPId, privateCloudName, context); + } + + private WorkloadNetworkPublicIpsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public WorkloadNetworkPublicIpImpl define(String name) { + return new WorkloadNetworkPublicIpImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java index 51469b95435c6..ee2761c70858e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkSegmentInner; import com.azure.resourcemanager.avs.models.SegmentStatusEnum; @@ -11,6 +12,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; import java.util.Collections; import java.util.List; @@ -32,6 +34,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -83,6 +89,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String segmentId; + private WorkloadNetworkSegmentUpdate updateProperties; + public WorkloadNetworkSegmentImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -90,20 +98,16 @@ public WorkloadNetworkSegmentImpl withExistingPrivateCloud(String resourceGroupN } public WorkloadNetworkSegment create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createSegments(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkSegments() + .create(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkSegment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createSegments(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkSegments() + .create(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); return this; } @@ -114,73 +118,90 @@ public WorkloadNetworkSegment create(Context context) { } public WorkloadNetworkSegmentImpl update() { + this.updateProperties = new WorkloadNetworkSegmentUpdate(); return this; } public WorkloadNetworkSegment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateSegments(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkSegments() + .update(resourceGroupName, privateCloudName, segmentId, updateProperties, Context.NONE); return this; } public WorkloadNetworkSegment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateSegments(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkSegments() + .update(resourceGroupName, privateCloudName, segmentId, updateProperties, context); return this; } - WorkloadNetworkSegmentImpl( - WorkloadNetworkSegmentInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkSegmentImpl(WorkloadNetworkSegmentInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.segmentId = Utils.getValueFromIdByName(innerObject.id(), "segments"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.segmentId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "segments"); } public WorkloadNetworkSegment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkSegments() + .getWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE) + .getValue(); return this; } public WorkloadNetworkSegment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkSegments() + .getWithResponse(resourceGroupName, privateCloudName, segmentId, context) + .getValue(); return this; } public WorkloadNetworkSegmentImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateProperties.withDisplayName(displayName); + return this; + } } public WorkloadNetworkSegmentImpl withConnectedGateway(String connectedGateway) { - this.innerModel().withConnectedGateway(connectedGateway); - return this; + if (isInCreateMode()) { + this.innerModel().withConnectedGateway(connectedGateway); + return this; + } else { + this.updateProperties.withConnectedGateway(connectedGateway); + return this; + } } public WorkloadNetworkSegmentImpl withSubnet(WorkloadNetworkSegmentSubnet subnet) { - this.innerModel().withSubnet(subnet); - return this; + if (isInCreateMode()) { + this.innerModel().withSubnet(subnet); + return this; + } else { + this.updateProperties.withSubnet(subnet); + return this; + } } public WorkloadNetworkSegmentImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateProperties.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java new file mode 100644 index 0000000000000..dc40de56598d3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java @@ -0,0 +1,1210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkSegmentsClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; +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 WorkloadNetworkSegmentsClient. + */ +public final class WorkloadNetworkSegmentsClientImpl implements WorkloadNetworkSegmentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkloadNetworkSegmentsService service; + + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; + + /** + * Initializes an instance of WorkloadNetworkSegmentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkloadNetworkSegmentsClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(WorkloadNetworkSegmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AVSClientWorkloadNetworkSegments to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") + public interface WorkloadNetworkSegmentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetwork(@HostParam("endpoint") 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}/workloadNetworks/default/segments/{segmentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkSegmentUpdate properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteSegment(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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.listByWorkloadNetwork(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 WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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 + .listByWorkloadNetwork(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 WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, segmentId, accept, context); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String segmentId) { + return getWithResponseAsync(resourceGroupName, privateCloudName, segmentId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String segmentId, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context).block(); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner get(String resourceGroupName, String privateCloudName, String segmentId) { + return getWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, + workloadNetworkSegment, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, segmentId, accept, workloadNetworkSegment, context); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + context); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginCreate( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginCreate( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + return beginCreateAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + return beginCreateAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner create(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment) { + return createAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner create(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + return createAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context).block(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, segmentId, accept, properties, context); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, segmentId, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, segmentId, properties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + context); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties).getSyncPoller(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties, + Context context) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentUpdate properties) { + return beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate properties) { + return updateAsync(resourceGroupName, privateCloudName, segmentId, properties).block(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate properties, Context context) { + return updateAsync(resourceGroupName, privateCloudName, segmentId, properties, context).block(); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, + String privateCloudName, String segmentId) { + Mono>> mono + = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, + String privateCloudName, String segmentId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String segmentId) { + return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String segmentId, Context context) { + return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, + Context context) { + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { + deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).block(); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { + deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).block(); + } + + /** + * 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 WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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 WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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/WorkloadNetworkSegmentsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsImpl.java new file mode 100644 index 0000000000000..eb2f38e1bc2e7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsImpl.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkSegmentsClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegments; + +public final class WorkloadNetworkSegmentsImpl implements WorkloadNetworkSegments { + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkSegmentsImpl.class); + + private final WorkloadNetworkSegmentsClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public WorkloadNetworkSegmentsImpl(WorkloadNetworkSegmentsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String segmentId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, segmentId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkSegmentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkSegment get(String resourceGroupName, String privateCloudName, String segmentId) { + WorkloadNetworkSegmentInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, segmentId); + if (inner != null) { + return new WorkloadNetworkSegmentImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { + this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId); + } + + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { + this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId, context); + } + + public WorkloadNetworkSegment 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 segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, segmentId, 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 segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, segmentId, context); + } + + public void deleteSegmentById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + this.deleteSegment(resourceGroupName, privateCloudName, segmentId, Context.NONE); + } + + public void deleteSegmentByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + this.deleteSegment(resourceGroupName, privateCloudName, segmentId, context); + } + + private WorkloadNetworkSegmentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public WorkloadNetworkSegmentImpl define(String name) { + return new WorkloadNetworkSegmentImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java index 14b1f2f8e1b19..e7fc5d4370839 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java @@ -1,14 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVMGroupInner; import com.azure.resourcemanager.avs.models.VMGroupStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; import java.util.Collections; import java.util.List; @@ -30,6 +32,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -73,6 +79,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String vmGroupId; + private WorkloadNetworkVMGroupUpdate updateWorkloadNetworkVMGroup; + public WorkloadNetworkVMGroupImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -80,20 +88,16 @@ public WorkloadNetworkVMGroupImpl withExistingPrivateCloud(String resourceGroupN } public WorkloadNetworkVMGroup create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkVmGroups() + .create(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkVMGroup create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkVmGroups() + .create(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); return this; } @@ -104,68 +108,80 @@ public WorkloadNetworkVMGroup create(Context context) { } public WorkloadNetworkVMGroupImpl update() { + this.updateWorkloadNetworkVMGroup = new WorkloadNetworkVMGroupUpdate(); return this; } public WorkloadNetworkVMGroup apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkVmGroups() + .update(resourceGroupName, privateCloudName, vmGroupId, updateWorkloadNetworkVMGroup, Context.NONE); return this; } public WorkloadNetworkVMGroup apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkVmGroups() + .update(resourceGroupName, privateCloudName, vmGroupId, updateWorkloadNetworkVMGroup, context); return this; } - WorkloadNetworkVMGroupImpl( - WorkloadNetworkVMGroupInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkVMGroupImpl(WorkloadNetworkVMGroupInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.vmGroupId = Utils.getValueFromIdByName(innerObject.id(), "vmGroups"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.vmGroupId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vmGroups"); } public WorkloadNetworkVMGroup refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkVmGroups() + .getWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE) + .getValue(); return this; } public WorkloadNetworkVMGroup refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworkVmGroups() + .getWithResponse(resourceGroupName, privateCloudName, vmGroupId, context) + .getValue(); return this; } public WorkloadNetworkVMGroupImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateWorkloadNetworkVMGroup.withDisplayName(displayName); + return this; + } } public WorkloadNetworkVMGroupImpl withMembers(List members) { - this.innerModel().withMembers(members); - return this; + if (isInCreateMode()) { + this.innerModel().withMembers(members); + return this; + } else { + this.updateWorkloadNetworkVMGroup.withMembers(members); + return this; + } } public WorkloadNetworkVMGroupImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateWorkloadNetworkVMGroup.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java index 97a8bb2ea3bff..181b6ba91d8a1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java @@ -1,11 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; import com.azure.resourcemanager.avs.models.VMTypeEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; public final class WorkloadNetworkVirtualMachineImpl implements WorkloadNetworkVirtualMachine { @@ -13,8 +15,8 @@ public final class WorkloadNetworkVirtualMachineImpl implements WorkloadNetworkV private final com.azure.resourcemanager.avs.AvsManager serviceManager; - WorkloadNetworkVirtualMachineImpl( - WorkloadNetworkVirtualMachineInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkVirtualMachineImpl(WorkloadNetworkVirtualMachineInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -31,6 +33,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String displayName() { return this.innerModel().displayName(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java new file mode 100644 index 0000000000000..8339356774d8d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVirtualMachinesClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachineListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworkVirtualMachinesClient. + */ +public final class WorkloadNetworkVirtualMachinesClientImpl implements WorkloadNetworkVirtualMachinesClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkloadNetworkVirtualMachinesService service; + + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; + + /** + * Initializes an instance of WorkloadNetworkVirtualMachinesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkloadNetworkVirtualMachinesClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(WorkloadNetworkVirtualMachinesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AVSClientWorkloadNetworkVirtualMachines to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") + public interface WorkloadNetworkVirtualMachinesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetwork( + @HostParam("endpoint") 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}/workloadNetworks/default/virtualMachines/{virtualMachineId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("virtualMachineId") String virtualMachineId, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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.listByWorkloadNetwork(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 WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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 + .listByWorkloadNetwork(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 WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String virtualMachineId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (virtualMachineId == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String virtualMachineId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (virtualMachineId == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, virtualMachineId, accept, context); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String virtualMachineId) { + return getWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String privateCloudName, String virtualMachineId, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId, context).block(); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVirtualMachineInner get(String resourceGroupName, String privateCloudName, + String virtualMachineId) { + return getWithResponse(resourceGroupName, privateCloudName, virtualMachineId, 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 WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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 WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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/WorkloadNetworkVirtualMachinesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesImpl.java new file mode 100644 index 0000000000000..97acc5ca9e719 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesImpl.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVirtualMachinesClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachines; + +public final class WorkloadNetworkVirtualMachinesImpl implements WorkloadNetworkVirtualMachines { + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVirtualMachinesImpl.class); + + private final WorkloadNetworkVirtualMachinesClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public WorkloadNetworkVirtualMachinesImpl(WorkloadNetworkVirtualMachinesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String virtualMachineId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, virtualMachineId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkVirtualMachineImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkVirtualMachine get(String resourceGroupName, String privateCloudName, + String virtualMachineId) { + WorkloadNetworkVirtualMachineInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, virtualMachineId); + if (inner != null) { + return new WorkloadNetworkVirtualMachineImpl(inner, this.manager()); + } else { + return null; + } + } + + private WorkloadNetworkVirtualMachinesClient 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/WorkloadNetworkVmGroupsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java new file mode 100644 index 0000000000000..c03d45a69658d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java @@ -0,0 +1,1206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.avs.fluent.WorkloadNetworkVmGroupsClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; +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 WorkloadNetworkVmGroupsClient. + */ +public final class WorkloadNetworkVmGroupsClientImpl implements WorkloadNetworkVmGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final WorkloadNetworkVmGroupsService service; + + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; + + /** + * Initializes an instance of WorkloadNetworkVmGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WorkloadNetworkVmGroupsClientImpl(AVSClientImpl client) { + this.service = RestProxy.create(WorkloadNetworkVmGroupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AVSClientWorkloadNetworkVmGroups to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") + public interface WorkloadNetworkVmGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetwork(@HostParam("endpoint") 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}/workloadNetworks/default/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, + @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkVMGroupInner resource, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmGroupId") String vmGroupId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByWorkloadNetworkNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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.listByWorkloadNetwork(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 WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByWorkloadNetworkSinglePageAsync(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 + .listByWorkloadNetwork(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 WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByWorkloadNetworkAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listByWorkloadNetworkSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByWorkloadNetworkNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listByWorkloadNetworkAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String vmGroupId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String vmGroupId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, vmGroupId, accept, context); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String vmGroupId) { + return getWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String vmGroupId, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, context).block(); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner get(String resourceGroupName, String privateCloudName, String vmGroupId) { + return getWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupInner 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 (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupInner 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 (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, vmGroupId, accept, resource, context); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateAsync( + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + context); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginCreate( + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, vmGroupId, resource).getSyncPoller(); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginCreate( + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, + Context context) { + return this.beginCreateAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).getSyncPoller(); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupInner resource) { + return beginCreateAsync(resourceGroupName, privateCloudName, vmGroupId, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { + return beginCreateAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner create(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner resource) { + return createAsync(resourceGroupName, privateCloudName, vmGroupId, resource).block(); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param 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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner create(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner resource, Context context) { + return createAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).block(); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, + workloadNetworkVMGroup, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, vmGroupId, accept, workloadNetworkVMGroup, context); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + context); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + return beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + return updateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + return updateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context).block(); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String vmGroupId, + String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmGroupId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 vmGroupId, + String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vmGroupId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vmGroupId, + String privateCloudName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 vmGroupId, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String vmGroupId, + String privateCloudName) { + return this.beginDeleteAsync(resourceGroupName, vmGroupId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 vmGroupId, + String privateCloudName, Context context) { + return this.beginDeleteAsync(resourceGroupName, vmGroupId, privateCloudName, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { + return beginDeleteAsync(resourceGroupName, vmGroupId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 vmGroupId, String privateCloudName, + Context context) { + return beginDeleteAsync(resourceGroupName, vmGroupId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String vmGroupId, String privateCloudName) { + deleteAsync(resourceGroupName, vmGroupId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 vmGroupId, String privateCloudName, Context context) { + deleteAsync(resourceGroupName, vmGroupId, privateCloudName, 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 WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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 WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByWorkloadNetworkNextSinglePageAsync(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.listByWorkloadNetworkNext(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/WorkloadNetworkVmGroupsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsImpl.java new file mode 100644 index 0000000000000..dd1cb81572122 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsImpl.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVmGroupsClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVmGroups; + +public final class WorkloadNetworkVmGroupsImpl implements WorkloadNetworkVmGroups { + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVmGroupsImpl.class); + + private final WorkloadNetworkVmGroupsClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public WorkloadNetworkVmGroupsImpl(WorkloadNetworkVmGroupsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); + } + + public PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listByWorkloadNetwork(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String vmGroupId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkVMGroupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkVMGroup get(String resourceGroupName, String privateCloudName, String vmGroupId) { + WorkloadNetworkVMGroupInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, vmGroupId); + if (inner != null) { + return new WorkloadNetworkVMGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String vmGroupId, String privateCloudName) { + this.serviceClient().delete(resourceGroupName, vmGroupId, privateCloudName); + } + + public void delete(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { + this.serviceClient().delete(resourceGroupName, vmGroupId, privateCloudName, context); + } + + public WorkloadNetworkVMGroup 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 vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, vmGroupId, 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 vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, vmGroupId, 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 vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, vmGroupId, privateCloudName, 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 vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.delete(resourceGroupName, vmGroupId, privateCloudName, context); + } + + private WorkloadNetworkVmGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public WorkloadNetworkVMGroupImpl define(String name) { + return new WorkloadNetworkVMGroupImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java index e0664ce6c9c62..d57b25920ec7c 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 @@ -1,20 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -27,792 +23,94 @@ 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.WorkloadNetworksClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; -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.WorkloadNetworkVMGroupInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServicesList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZonesList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGatewayList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIPsList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentsList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupsList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachinesList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkloadNetworksClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworksClient. + */ public final class WorkloadNetworksClientImpl implements WorkloadNetworksClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkloadNetworksService service; - /** The service client containing this operation class. */ - private final AvsClientImpl client; + /** + * The service client containing this operation class. + */ + private final AVSClientImpl client; /** * Initializes an instance of WorkloadNetworksClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworksClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(WorkloadNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + WorkloadNetworksClientImpl(AVSClientImpl client) { + this.service + = RestProxy.create(WorkloadNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientWorkloadNetworks to be used by the proxy service to perform + * The interface defining all the services for AVSClientWorkloadNetworks to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AvsClientWorkloadNet") + @Host("{endpoint}") + @ServiceInterface(name = "AVSClientWorkloadNet") public interface WorkloadNetworksService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") WorkloadNetworkName workloadNetworkName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSegments( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getSegment( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("segmentId") String segmentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createSegments( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("segmentId") String segmentId, - @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateSegments( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("segmentId") String segmentId, - @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteSegment( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("segmentId") String segmentId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("dhcpId") String dhcpId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dhcpId") String dhcpId, - @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dhcpId") String dhcpId, - @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dhcpId") String dhcpId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGateways( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getGateway( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("gatewayId") String gatewayId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("portMirroringId") String portMirroringId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createPortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("portMirroringId") String portMirroringId, - @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updatePortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("portMirroringId") String portMirroringId, - @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deletePortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("portMirroringId") String portMirroringId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVMGroups( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getVMGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("vmGroupId") String vmGroupId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createVMGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("vmGroupId") String vmGroupId, - @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateVMGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("vmGroupId") String vmGroupId, - @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteVMGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("vmGroupId") String vmGroupId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVirtualMachines( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getVirtualMachine( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("virtualMachineId") String virtualMachineId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDnsServices( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDnsService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsServiceId") String dnsServiceId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createDnsService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsServiceId") String dnsServiceId, - @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateDnsService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsServiceId") String dnsServiceId, - @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteDnsService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("dnsServiceId") String dnsServiceId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDnsZones( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDnsZone( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByPrivateCloud(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsZoneId") String dnsZoneId, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createDnsZone( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsZoneId") String dnsZoneId, - @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateDnsZone( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsZoneId") String dnsZoneId, - @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteDnsZone( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("dnsZoneId") String dnsZoneId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPublicIPs( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPublicIp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("publicIPId") String publicIpId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createPublicIp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("publicIPId") String publicIpId, - @BodyParam("application/json") WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deletePublicIp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("publicIPId") String publicIpId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - 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); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSegmentsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDhcpNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGatewaysNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPortMirroringNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVMGroupsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVirtualMachinesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDnsServicesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDnsZonesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPublicIPsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByPrivateCloudNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); } /** - * Get a private cloud workload network. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud workload network along with {@link Response} on successful completion of {@link Mono}. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -822,53 +120,34 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - workloadNetworkName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a private cloud workload network. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud workload network along with {@link Response} on successful completion of {@link Mono}. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -878,101 +157,81 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - workloadNetworkName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context); } /** - * Get a private cloud workload network. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud workload network on successful completion of {@link Mono}. + * @return a WorkloadNetwork on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { - return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName) + private Mono getAsync(String resourceGroupName, String privateCloudName) { + return getWithResponseAsync(resourceGroupName, privateCloudName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a private cloud workload network. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud workload network along with {@link Response}. + * @return a WorkloadNetwork along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, context).block(); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** - * Get a private cloud workload network. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud workload network. + * @return a WorkloadNetwork. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkInner get( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { - return getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, Context.NONE).getValue(); + public WorkloadNetworkInner get(String resourceGroupName, String privateCloudName) { + return getWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listByPrivateCloudSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -984,54 +243,35 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByPrivateCloud(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listByPrivateCloudSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1044,10139 +284,131 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByPrivateCloud(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetwork 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)); + private PagedFlux listByPrivateCloudAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listByPrivateCloudSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByPrivateCloudNextSinglePageAsync(nextLink)); } /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetwork 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)); + private PagedFlux listByPrivateCloudAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listByPrivateCloudSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByPrivateCloudNextSinglePageAsync(nextLink, context)); } /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetwork 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)); + public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listByPrivateCloudAsync(resourceGroupName, privateCloudName)); } /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); + public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listByPrivateCloudAsync(resourceGroupName, privateCloudName, context)); } /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * 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 a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSegmentsSinglePageAsync( - String resourceGroupName, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.")); + private Mono> listByPrivateCloudNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName 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 - .listSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByPrivateCloudNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * 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 a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSegmentsSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.")); + private Mono> listByPrivateCloudNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName 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 - .listSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSegmentsAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listSegmentsNextSinglePageAsync(nextLink)); - } - - /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSegmentsAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listSegmentsNextSinglePageAsync(nextLink, context)); - } - - /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName)); - } - - /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSegments( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSegmentWithResponseAsync( - String resourceGroupName, String privateCloudName, String segmentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getSegment( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSegmentWithResponseAsync( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getSegment( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - accept, - context); - } - - /** - * Get a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId) { - return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context).block(); - } - - /** - * Get a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId) { - return getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createSegmentsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - if (workloadNetworkSegment == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); - } else { - workloadNetworkSegment.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - workloadNetworkSegment, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createSegmentsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - if (workloadNetworkSegment == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); - } else { - workloadNetworkSegment.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - workloadNetworkSegment, - accept, - context); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - Mono>> mono = - createSegmentsWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkSegmentInner.class, - WorkloadNetworkSegmentInner.class, - this.client.getContext()); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createSegmentsWithResponseAsync( - resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkSegmentInner.class, - WorkloadNetworkSegmentInner.class, - context); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return this - .beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) - .getSyncPoller(); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return this - .beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .getSyncPoller(); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner createSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return createSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); - } - - /** - * Create a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner createSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return createSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .block(); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateSegmentsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - if (workloadNetworkSegment == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); - } else { - workloadNetworkSegment.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updateSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - workloadNetworkSegment, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateSegmentsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - if (workloadNetworkSegment == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); - } else { - workloadNetworkSegment.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - workloadNetworkSegment, - accept, - context); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - Mono>> mono = - updateSegmentsWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkSegmentInner.class, - WorkloadNetworkSegmentInner.class, - this.client.getContext()); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateSegmentsWithResponseAsync( - resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkSegmentInner.class, - WorkloadNetworkSegmentInner.class, - context); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return this - .beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) - .getSyncPoller(); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return this - .beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .getSyncPoller(); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner updateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return updateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); - } - - /** - * Create or update a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner updateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return updateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .block(); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteSegmentWithResponseAsync( - String resourceGroupName, String privateCloudName, String segmentId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .deleteSegment( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteSegmentWithResponseAsync( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .deleteSegment( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - accept, - context); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId) { - Mono>> mono = - deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteSegment( - String resourceGroupName, String privateCloudName, String segmentId) { - return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).getSyncPoller(); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteSegment( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).getSyncPoller(); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { - deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).block(); - } - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { - deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).block(); - } - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDhcpSinglePageAsync( - String resourceGroupName, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDhcpSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listDhcpNextSinglePageAsync(nextLink)); - } - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDhcpAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listDhcpNextSinglePageAsync(nextLink, context)); - } - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName)); - } - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDhcp( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDhcpWithResponseAsync( - String resourceGroupName, String dhcpId, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dhcpId, - privateCloudName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDhcpWithResponseAsync( - String resourceGroupName, String dhcpId, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dhcpId, - privateCloudName, - accept, - context); - } - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDhcpAsync( - String resourceGroupName, String dhcpId, String privateCloudName) { - return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context) { - return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName, context).block(); - } - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName) { - return getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDhcpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); - } else { - workloadNetworkDhcp.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - workloadNetworkDhcp, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDhcpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); - } else { - workloadNetworkDhcp.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - workloadNetworkDhcp, - accept, - context); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono = - createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDhcpInner.class, - WorkloadNetworkDhcpInner.class, - this.client.getContext()); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDhcpInner.class, - WorkloadNetworkDhcpInner.class, - context); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return this - .beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) - .getSyncPoller(); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return this - .beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .getSyncPoller(); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner createDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); - } - - /** - * Create dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner createDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDhcpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); - } else { - workloadNetworkDhcp.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updateDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - workloadNetworkDhcp, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDhcpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); - } else { - workloadNetworkDhcp.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - workloadNetworkDhcp, - accept, - context); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono = - updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDhcpInner.class, - WorkloadNetworkDhcpInner.class, - this.client.getContext()); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDhcpInner.class, - WorkloadNetworkDhcpInner.class, - context); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return this - .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) - .getSyncPoller(); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return this - .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .getSyncPoller(); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner updateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); - } - - /** - * Create or update dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner updateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDhcpWithResponseAsync( - String resourceGroupName, String privateCloudName, String dhcpId) { - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .deleteDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDhcpWithResponseAsync( - String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .deleteDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - accept, - context); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId) { - Mono>> mono = - deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDhcp( - String resourceGroupName, String privateCloudName, String dhcpId) { - return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).getSyncPoller(); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).getSyncPoller(); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId) { - return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { - deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).block(); - } - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).block(); - } - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGatewaysSinglePageAsync( - String resourceGroupName, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listGateways( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGatewaysSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listGateways( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGatewaysAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listGatewaysNextSinglePageAsync(nextLink)); - } - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGatewaysAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listGatewaysNextSinglePageAsync(nextLink, context)); - } - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName)); - } - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGateways( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a gateway by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getGatewayWithResponseAsync( - String resourceGroupName, String privateCloudName, String gatewayId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (gatewayId == null) { - return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getGateway( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - gatewayId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a gateway by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getGatewayWithResponseAsync( - String resourceGroupName, String privateCloudName, String gatewayId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (gatewayId == null) { - return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getGateway( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - gatewayId, - accept, - context); - } - - /** - * Get a gateway by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getGatewayAsync( - String resourceGroupName, String privateCloudName, String gatewayId) { - return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a gateway by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context) { - return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId, context).block(); - } - - /** - * Get a gateway by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { - return getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, Context.NONE).getValue(); - } - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringSinglePageAsync( - String resourceGroupName, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPortMirroringAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listPortMirroringNextSinglePageAsync(nextLink)); - } - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPortMirroringAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listPortMirroringNextSinglePageAsync(nextLink, context)); - } - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName)); - } - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPortMirroringWithResponseAsync( - String resourceGroupName, String privateCloudName, String portMirroringId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPortMirroringWithResponseAsync( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - accept, - context); - } - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getPortMirroringAsync( - String resourceGroupName, String privateCloudName, String portMirroringId) { - return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { - return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, context).block(); - } - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId) { - return getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) - .getValue(); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPortMirroringWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPortMirroringWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - accept, - context); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - Mono>> mono = - createPortMirroringWithResponseAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, - this.client.getContext()); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createPortMirroringWithResponseAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, - context); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return this - .beginCreatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .getSyncPoller(); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return this - .beginCreatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .getSyncPoller(); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginCreatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return beginCreatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner createPortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return createPortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .block(); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner createPortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return createPortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .block(); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updatePortMirroringWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updatePortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updatePortMirroringWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updatePortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - accept, - context); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - Mono>> mono = - updatePortMirroringWithResponseAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, - this.client.getContext()); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updatePortMirroringWithResponseAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, - context); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return this - .beginUpdatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .getSyncPoller(); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return this - .beginUpdatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .getSyncPoller(); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginUpdatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return beginUpdatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner updatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return updatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .block(); - } - - /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner updatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return updatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .block(); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePortMirroringWithResponseAsync( - String resourceGroupName, String portMirroringId, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .deletePortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - portMirroringId, - privateCloudName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePortMirroringWithResponseAsync( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .deletePortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - portMirroringId, - privateCloudName, - accept, - context); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePortMirroringAsync( - String resourceGroupName, String portMirroringId, String privateCloudName) { - Mono>> mono = - deletePortMirroringWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePortMirroringAsync( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deletePortMirroringWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName) { - return this.beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - return this - .beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context) - .getSyncPoller(); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePortMirroringAsync( - String resourceGroupName, String portMirroringId, String privateCloudName) { - return beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePortMirroringAsync( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - return beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { - deletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).block(); - } - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - deletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context).block(); - } - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMGroupsSinglePageAsync( - String resourceGroupName, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listVMGroups( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMGroupsSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listVMGroups( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVMGroupsAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listVMGroupsNextSinglePageAsync(nextLink)); - } - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVMGroupsAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listVMGroupsNextSinglePageAsync(nextLink, context)); - } - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName)); - } - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVMGroups( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVMGroupWithResponseAsync( - String resourceGroupName, String privateCloudName, String vmGroupId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVMGroupWithResponseAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - accept, - context); - } - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getVMGroupAsync( - String resourceGroupName, String privateCloudName, String vmGroupId) { - return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { - return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, context).block(); - } - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { - return getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createVMGroupWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); - } else { - workloadNetworkVMGroup.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createVMGroupWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); - } else { - workloadNetworkVMGroup.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - accept, - context); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - Mono>> mono = - createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkVMGroupInner.class, - WorkloadNetworkVMGroupInner.class, - this.client.getContext()); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createVMGroupWithResponseAsync( - resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkVMGroupInner.class, - WorkloadNetworkVMGroupInner.class, - context); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return this - .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) - .getSyncPoller(); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return this - .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .getSyncPoller(); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner createVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); - } - - /** - * Create a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner createVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .block(); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateVMGroupWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); - } else { - workloadNetworkVMGroup.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updateVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateVMGroupWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); - } else { - workloadNetworkVMGroup.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - accept, - context); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - Mono>> mono = - updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkVMGroupInner.class, - WorkloadNetworkVMGroupInner.class, - this.client.getContext()); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateVMGroupWithResponseAsync( - resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkVMGroupInner.class, - WorkloadNetworkVMGroupInner.class, - context); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return this - .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) - .getSyncPoller(); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return this - .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .getSyncPoller(); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner updateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); - } - - /** - * Create or update a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner updateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .block(); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteVMGroupWithResponseAsync( - String resourceGroupName, String vmGroupId, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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 - .deleteVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - vmGroupId, - privateCloudName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteVMGroupWithResponseAsync( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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 - .deleteVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - vmGroupId, - privateCloudName, - accept, - context); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteVMGroupAsync( - String resourceGroupName, String vmGroupId, String privateCloudName) { - Mono>> mono = - deleteVMGroupWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteVMGroupAsync( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteVMGroupWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteVMGroup( - String resourceGroupName, String vmGroupId, String privateCloudName) { - return this.beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteVMGroup( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - return this.beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).getSyncPoller(); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { - return beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteVMGroupAsync( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - return beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { - deleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).block(); - } - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - deleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).block(); - } - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesSinglePageAsync( - String resourceGroupName, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listVirtualMachines( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listVirtualMachines( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVirtualMachinesAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink)); - } - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVirtualMachinesAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink, context)); - } - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName)); - } - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a virtual machine by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine 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 virtual machine by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVirtualMachineWithResponseAsync( - String resourceGroupName, String privateCloudName, String virtualMachineId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (virtualMachineId == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getVirtualMachine( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - virtualMachineId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a virtual machine by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine 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 virtual machine by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVirtualMachineWithResponseAsync( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (virtualMachineId == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getVirtualMachine( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - virtualMachineId, - accept, - context); - } - - /** - * Get a virtual machine by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine 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 virtual machine by id in a private cloud workload network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getVirtualMachineAsync( - String resourceGroupName, String privateCloudName, String virtualMachineId) { - return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a virtual machine by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine 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 virtual machine by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { - return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId, context) - .block(); - } - - /** - * Get a virtual machine by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine 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 virtual machine by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVirtualMachineInner getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId) { - return getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, Context.NONE) - .getValue(); - } - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsServicesSinglePageAsync( - String resourceGroupName, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listDnsServices( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsServicesSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listDnsServices( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsServicesAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listDnsServicesNextSinglePageAsync(nextLink)); - } - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsServicesAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listDnsServicesNextSinglePageAsync(nextLink, context)); - } - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName)); - } - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDnsServiceWithResponseAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDnsServiceWithResponseAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - accept, - context); - } - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDnsServiceAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId) { - return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context) { - return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, context).block(); - } - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner getDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId) { - return getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE).getValue(); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDnsServiceWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDnsServiceWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - accept, - context); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> - beginCreateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - Mono>> mono = - createDnsServiceWithResponseAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsServiceInner.class, - WorkloadNetworkDnsServiceInner.class, - this.client.getContext()); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> - beginCreateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createDnsServiceWithResponseAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsServiceInner.class, - WorkloadNetworkDnsServiceInner.class, - context); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return this - .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .getSyncPoller(); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return this - .beginCreateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .getSyncPoller(); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return beginCreateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner createDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return createDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .block(); - } - - /** - * Create a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner createDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return createDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .block(); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDnsServiceWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updateDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDnsServiceWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - accept, - context); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> - beginUpdateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - Mono>> mono = - updateDnsServiceWithResponseAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsServiceInner.class, - WorkloadNetworkDnsServiceInner.class, - this.client.getContext()); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> - beginUpdateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateDnsServiceWithResponseAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsServiceInner.class, - WorkloadNetworkDnsServiceInner.class, - context); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return this - .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .getSyncPoller(); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return this - .beginUpdateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .getSyncPoller(); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return beginUpdateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner updateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return updateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .block(); - } - - /** - * Create or update a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner updateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return updateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .block(); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDnsServiceWithResponseAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .deleteDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dnsServiceId, - privateCloudName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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>> deleteDnsServiceWithResponseAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .deleteDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dnsServiceId, - privateCloudName, - accept, - context); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDnsServiceAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName) { - Mono>> mono = - deleteDnsServiceWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginDeleteDnsServiceAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteDnsServiceWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName) { - return this.beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginDeleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - return this - .beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context) - .getSyncPoller(); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, String privateCloudName) { - return beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 deleteDnsServiceAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - return beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName) { - deleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).block(); - } - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 deleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - deleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context).block(); - } - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsZonesSinglePageAsync( - String resourceGroupName, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listDnsZones( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsZonesSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listDnsZones( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsZonesAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listDnsZonesNextSinglePageAsync(nextLink)); - } - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsZonesAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listDnsZonesNextSinglePageAsync(nextLink, context)); - } - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName)); - } - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsZones( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDnsZoneWithResponseAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDnsZoneWithResponseAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - accept, - context); - } - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDnsZoneAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId) { - return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { - return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, context).block(); - } - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { - return getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDnsZoneWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDnsZoneWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - accept, - context); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono = - createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsZoneInner.class, - WorkloadNetworkDnsZoneInner.class, - this.client.getContext()); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createDnsZoneWithResponseAsync( - resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsZoneInner.class, - WorkloadNetworkDnsZoneInner.class, - context); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this - .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .getSyncPoller(); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return this - .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .getSyncPoller(); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner createDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner createDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .block(); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDnsZoneWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .updateDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDnsZoneWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .updateDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - accept, - context); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono = - updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsZoneInner.class, - WorkloadNetworkDnsZoneInner.class, - this.client.getContext()); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateDnsZoneWithResponseAsync( - resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsZoneInner.class, - WorkloadNetworkDnsZoneInner.class, - context); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this - .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .getSyncPoller(); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return this - .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .getSyncPoller(); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner updateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); - } - - /** - * Create or update a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner updateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .block(); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDnsZoneWithResponseAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .deleteDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dnsZoneId, - privateCloudName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDnsZoneWithResponseAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .deleteDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dnsZoneId, - privateCloudName, - accept, - context); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDnsZoneAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName) { - Mono>> mono = - deleteDnsZoneWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDnsZoneAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteDnsZoneWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDnsZone( - String resourceGroupName, String dnsZoneId, String privateCloudName) { - return this.beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDnsZone( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - return this.beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).getSyncPoller(); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, String privateCloudName) { - return beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDnsZoneAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - return beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName) { - deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).block(); - } - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).block(); - } - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsSinglePageAsync( - String resourceGroupName, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listPublicIPs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listPublicIPs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPublicIPsAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listPublicIPsNextSinglePageAsync(nextLink)); - } - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPublicIPsAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listPublicIPsNextSinglePageAsync(nextLink, context)); - } - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName)); - } - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPublicIpWithResponseAsync( - String resourceGroupName, String privateCloudName, String publicIpId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getPublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - publicIpId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPublicIpWithResponseAsync( - String resourceGroupName, String privateCloudName, String publicIpId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getPublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - publicIpId, - accept, - context); - } - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getPublicIpAsync( - String resourceGroupName, String privateCloudName, String publicIpId) { - return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context) { - return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId, context).block(); - } - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner getPublicIp( - String resourceGroupName, String privateCloudName, String publicIpId) { - return getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE).getValue(); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPublicIpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); - } - if (workloadNetworkPublicIp == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkPublicIp is required and cannot be null.")); - } else { - workloadNetworkPublicIp.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createPublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - publicIpId, - workloadNetworkPublicIp, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPublicIpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); - } - if (workloadNetworkPublicIp == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkPublicIp is required and cannot be null.")); - } else { - workloadNetworkPublicIp.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createPublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - publicIpId, - workloadNetworkPublicIp, - accept, - context); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { - Mono>> mono = - createPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPublicIpInner.class, - WorkloadNetworkPublicIpInner.class, - this.client.getContext()); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createPublicIpWithResponseAsync( - resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPublicIpInner.class, - WorkloadNetworkPublicIpInner.class, - context); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { - return this - .beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp) - .getSyncPoller(); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context) { - return this - .beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context) - .getSyncPoller(); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPublicIpAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { - return beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPublicIpAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context) { - return beginCreatePublicIpAsync( - resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner createPublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { - return createPublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp).block(); - } - - /** - * Create a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner createPublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context) { - return createPublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context) - .block(); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePublicIpWithResponseAsync( - String resourceGroupName, String publicIpId, String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .deletePublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - publicIpId, - privateCloudName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePublicIpWithResponseAsync( - String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .deletePublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - publicIpId, - privateCloudName, - accept, - context); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePublicIpAsync( - String resourceGroupName, String publicIpId, String privateCloudName) { - Mono>> mono = - deletePublicIpWithResponseAsync(resourceGroupName, publicIpId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePublicIpAsync( - String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deletePublicIpWithResponseAsync(resourceGroupName, publicIpId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePublicIp( - String resourceGroupName, String publicIpId, String privateCloudName) { - return this.beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePublicIp( - String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - return this.beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName, context).getSyncPoller(); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePublicIpAsync(String resourceGroupName, String publicIpId, String privateCloudName) { - return beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePublicIpAsync( - String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - return beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName) { - deletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName).block(); - } - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - deletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @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)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSegmentsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSegmentsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSegmentsNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSegmentsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDhcpNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listDhcpNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDhcpNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listDhcpNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGatewaysNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listGatewaysNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGatewaysNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listGatewaysNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringNextSinglePageAsync( - String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listPortMirroringNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listPortMirroringNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMGroupsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listVMGroupsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMGroupsNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listVMGroupsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesNextSinglePageAsync( - String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listVirtualMachinesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listVirtualMachinesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsServicesNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listDnsServicesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsServicesNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listDnsServicesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsZonesNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listDnsZonesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsZonesNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listDnsZonesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByPrivateCloudNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksImpl.java index 9ea22c33e54cb..b2e11b445e88e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.implementation; @@ -10,27 +10,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; -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.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; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -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 { @@ -40,30 +21,26 @@ public final class WorkloadNetworksImpl implements WorkloadNetworks { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public WorkloadNetworksImpl( - WorkloadNetworksClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public WorkloadNetworksImpl(WorkloadNetworksClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkloadNetwork get( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { - WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, workloadNetworkName); + public WorkloadNetwork get(String resourceGroupName, String privateCloudName) { + WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName); if (inner != null) { return new WorkloadNetworkImpl(inner, this.manager()); } else { @@ -71,1175 +48,17 @@ public WorkloadNetwork get( } } - public PagedIterable list(String resourceGroupName, String privateCloudName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByPrivateCloud(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); } - public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); - } - - public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listSegments(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); - } - - public PagedIterable listSegments( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listSegments(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); - } - - public Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - Response inner = - this.serviceClient().getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkSegmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId) { - WorkloadNetworkSegmentInner inner = - this.serviceClient().getSegment(resourceGroupName, privateCloudName, segmentId); - if (inner != null) { - return new WorkloadNetworkSegmentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { - this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId); - } - - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { - this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId, context); - } - - public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listDhcp(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); - } - - public PagedIterable listDhcp( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listDhcp(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); - } - - public Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context) { - Response inner = - this.serviceClient().getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkDhcpImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName) { - WorkloadNetworkDhcpInner inner = this.serviceClient().getDhcp(resourceGroupName, dhcpId, privateCloudName); - if (inner != null) { - return new WorkloadNetworkDhcpImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { - this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, dhcpId); - } - - public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, dhcpId, context); - } - - public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listGateways(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); - } - - public PagedIterable listGateways( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listGateways(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); - } - - public Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context) { - Response inner = - this.serviceClient().getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkGatewayImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { - WorkloadNetworkGatewayInner inner = - this.serviceClient().getGateway(resourceGroupName, privateCloudName, gatewayId); - if (inner != null) { - return new WorkloadNetworkGatewayImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); - } - - public PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); - } - - public Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { - Response inner = - this - .serviceClient() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkPortMirroringImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkPortMirroring getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId) { - WorkloadNetworkPortMirroringInner inner = - this.serviceClient().getPortMirroring(resourceGroupName, privateCloudName, portMirroringId); - if (inner != null) { - return new WorkloadNetworkPortMirroringImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { - this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName); - } - - public void deletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); - } - - public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listVMGroups(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); - } - - public PagedIterable listVMGroups( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); - } - - public Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { - Response inner = - this.serviceClient().getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkVMGroupImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { - WorkloadNetworkVMGroupInner inner = - this.serviceClient().getVMGroup(resourceGroupName, privateCloudName, vmGroupId); - if (inner != null) { - return new WorkloadNetworkVMGroupImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { - this.serviceClient().deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName); - } - - public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - this.serviceClient().deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, context); - } - - public PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); - } - - public PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); - } - - public Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { - Response inner = - this - .serviceClient() - .getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkVirtualMachineImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkVirtualMachine getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId) { - WorkloadNetworkVirtualMachineInner inner = - this.serviceClient().getVirtualMachine(resourceGroupName, privateCloudName, virtualMachineId); - if (inner != null) { - return new WorkloadNetworkVirtualMachineImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listDnsServices(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); - } - - public PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); - } - - public Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context) { - Response inner = - this.serviceClient().getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkDnsServiceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkDnsService getDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId) { - WorkloadNetworkDnsServiceInner inner = - this.serviceClient().getDnsService(resourceGroupName, privateCloudName, dnsServiceId); - if (inner != null) { - return new WorkloadNetworkDnsServiceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName) { - this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName); - } - - public void deleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); - } - - public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listDnsZones(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); - } - - public PagedIterable listDnsZones( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); - } - - public Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { - Response inner = - this.serviceClient().getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkDnsZoneImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { - WorkloadNetworkDnsZoneInner inner = - this.serviceClient().getDnsZone(resourceGroupName, privateCloudName, dnsZoneId); - if (inner != null) { - return new WorkloadNetworkDnsZoneImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName) { - this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName); - } - - public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); - } - - public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); - } - - public PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); - } - - public Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context) { - Response inner = - this.serviceClient().getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkPublicIpImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId) { - WorkloadNetworkPublicIpInner inner = - this.serviceClient().getPublicIp(resourceGroupName, privateCloudName, publicIpId); - if (inner != null) { - return new WorkloadNetworkPublicIpImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName) { - this.serviceClient().deletePublicIp(resourceGroupName, publicIpId, privateCloudName); - } - - public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - this.serviceClient().deletePublicIp(resourceGroupName, publicIpId, privateCloudName, context); - } - - public WorkloadNetworkSegment getSegmentById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String segmentId = Utils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); - } - return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); - } - - public Response getSegmentByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String segmentId = Utils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); - } - return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); - } - - public WorkloadNetworkDhcp getDhcpById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - return this.getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); - } - - public Response getDhcpByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - return this.getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context); - } - - public WorkloadNetworkPortMirroring getPortMirroringById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", - id))); - } - return this - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) - .getValue(); - } - - public Response getPortMirroringByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", - id))); - } - return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); - } - - public WorkloadNetworkVMGroup getVMGroupById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); - } - - public Response getVMGroupByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); - } - - public WorkloadNetworkDnsService getDnsServiceById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - return this - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) - .getValue(); - } - - public Response getDnsServiceByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); - } - - public WorkloadNetworkDnsZone getDnsZoneById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); - } - - public Response getDnsZoneByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); - } - - public WorkloadNetworkPublicIp getPublicIpById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); - if (publicIpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } - return this.getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE).getValue(); - } - - public Response getPublicIpByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); - if (publicIpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } - return this.getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, context); - } - - public void deleteSegmentById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String segmentId = Utils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); - } - this.deleteSegment(resourceGroupName, privateCloudName, segmentId, Context.NONE); - } - - public void deleteSegmentByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String segmentId = Utils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); - } - this.deleteSegment(resourceGroupName, privateCloudName, segmentId, context); - } - - public void deleteDhcpById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - this.deleteDhcp(resourceGroupName, privateCloudName, dhcpId, Context.NONE); - } - - public void deleteDhcpByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - this.deleteDhcp(resourceGroupName, privateCloudName, dhcpId, context); - } - - public void deletePortMirroringById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", - id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, Context.NONE); - } - - public void deletePortMirroringByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", - id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); - } - - public void deleteVMGroupById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, Context.NONE); - } - - public void deleteVMGroupByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, context); - } - - public void deleteDnsServiceById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, Context.NONE); - } - - public void deleteDnsServiceByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); - } - - public void deleteDnsZoneById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, Context.NONE); - } - - public void deleteDnsZoneByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); - } - - public void deletePublicIpById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); - if (publicIpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deletePublicIp(resourceGroupName, publicIpId, privateCloudName, Context.NONE); - } - - public void deletePublicIpByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); - if (publicIpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deletePublicIp(resourceGroupName, publicIpId, privateCloudName, context); + public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listByPrivateCloud(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); } private WorkloadNetworksClient serviceClient() { @@ -1249,32 +68,4 @@ private WorkloadNetworksClient serviceClient() { private com.azure.resourcemanager.avs.AvsManager manager() { return this.serviceManager; } - - public WorkloadNetworkSegmentImpl defineSegments(String name) { - return new WorkloadNetworkSegmentImpl(name, this.manager()); - } - - public WorkloadNetworkDhcpImpl defineDhcp(String name) { - return new WorkloadNetworkDhcpImpl(name, this.manager()); - } - - public WorkloadNetworkPortMirroringImpl definePortMirroring(String name) { - return new WorkloadNetworkPortMirroringImpl(name, this.manager()); - } - - public WorkloadNetworkVMGroupImpl defineVMGroup(String name) { - return new WorkloadNetworkVMGroupImpl(name, this.manager()); - } - - public WorkloadNetworkDnsServiceImpl defineDnsService(String name) { - return new WorkloadNetworkDnsServiceImpl(name, this.manager()); - } - - public WorkloadNetworkDnsZoneImpl defineDnsZone(String name) { - return new WorkloadNetworkDnsZoneImpl(name, this.manager()); - } - - public WorkloadNetworkPublicIpImpl definePublicIp(String name) { - return new WorkloadNetworkPublicIpImpl(name, this.manager()); - } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonListResult.java new file mode 100644 index 0000000000000..ae575c6da5059 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.AddonInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a Addon list operation. + */ +@Immutable +public final class AddonListResult { + /* + * The Addon items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of AddonListResult class. + */ + private AddonListResult() { + } + + /** + * Get the value property: The Addon items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AddonListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AddonListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkListResult.java new file mode 100644 index 0000000000000..51902e2e66921 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a CloudLink list operation. + */ +@Immutable +public final class CloudLinkListResult { + /* + * The CloudLink items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of CloudLinkListResult class. + */ + private CloudLinkListResult() { + } + + /** + * Get the value property: The CloudLink items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model CloudLinkListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudLinkListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterListResult.java new file mode 100644 index 0000000000000..028b80dcd4812 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ClusterInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a Cluster list operation. + */ +@Immutable +public final class ClusterListResult { + /* + * The Cluster items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ClusterListResult class. + */ + private ClusterListResult() { + } + + /** + * Get the value property: The Cluster items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ClusterListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreListResult.java new file mode 100644 index 0000000000000..6c073a6b1fec1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a Datastore list operation. + */ +@Immutable +public final class DatastoreListResult { + /* + * The Datastore items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of DatastoreListResult class. + */ + private DatastoreListResult() { + } + + /** + * Get the value property: The Datastore items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model DatastoreListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DatastoreListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationListResult.java new file mode 100644 index 0000000000000..af84b7d919cf3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ExpressRouteAuthorization list operation. + */ +@Immutable +public final class ExpressRouteAuthorizationListResult { + /* + * The ExpressRouteAuthorization items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ExpressRouteAuthorizationListResult class. + */ + private ExpressRouteAuthorizationListResult() { + } + + /** + * Get the value property: The ExpressRouteAuthorization items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ExpressRouteAuthorizationListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExpressRouteAuthorizationListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionListResult.java new file mode 100644 index 0000000000000..494bcc847f097 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a GlobalReachConnection list operation. + */ +@Immutable +public final class GlobalReachConnectionListResult { + /* + * The GlobalReachConnection items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of GlobalReachConnectionListResult class. + */ + private GlobalReachConnectionListResult() { + } + + /** + * Get the value property: The GlobalReachConnection items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model GlobalReachConnectionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GlobalReachConnectionListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteListResult.java new file mode 100644 index 0000000000000..cf09276a965fb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a HcxEnterpriseSite list operation. + */ +@Immutable +public final class HcxEnterpriseSiteListResult { + /* + * The HcxEnterpriseSite items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of HcxEnterpriseSiteListResult class. + */ + private HcxEnterpriseSiteListResult() { + } + + /** + * Get the value property: The HcxEnterpriseSite items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model HcxEnterpriseSiteListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HcxEnterpriseSiteListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java new file mode 100644 index 0000000000000..2b2445394a8e9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a IscsiPath list operation. + */ +@Immutable +public final class IscsiPathListResult { + /* + * The IscsiPath items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of IscsiPathListResult class. + */ + private IscsiPathListResult() { + } + + /** + * Get the value property: The IscsiPath items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model IscsiPathListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiPathListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedOperation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedOperation.java new file mode 100644 index 0000000000000..8107675da36ba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PagedOperation.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.OperationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class PagedOperation { + /* + * The Operation items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of PagedOperation class. + */ + private PagedOperation() { + } + + /** + * Get the value property: The Operation items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PagedOperation")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PagedOperation.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPolicyListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPolicyListResult.java new file mode 100644 index 0000000000000..e6d799bd468f0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPolicyListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a PlacementPolicy list operation. + */ +@Immutable +public final class PlacementPolicyListResult { + /* + * The PlacementPolicy items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of PlacementPolicyListResult class. + */ + private PlacementPolicyListResult() { + } + + /** + * Get the value property: The PlacementPolicy items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model PlacementPolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PlacementPolicyListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudListResult.java new file mode 100644 index 0000000000000..c869606ce6c35 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a PrivateCloud list operation. + */ +@Immutable +public final class PrivateCloudListResult { + /* + * The PrivateCloud items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of PrivateCloudListResult class. + */ + private PrivateCloudListResult() { + } + + /** + * Get the value property: The PrivateCloud items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PrivateCloudListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletListResult.java new file mode 100644 index 0000000000000..6fab349d788cb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ScriptCmdlet list operation. + */ +@Immutable +public final class ScriptCmdletListResult { + /* + * The ScriptCmdlet items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ScriptCmdletListResult class. + */ + private ScriptCmdletListResult() { + } + + /** + * Get the value property: The ScriptCmdlet items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ScriptCmdletListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptCmdletListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionListResult.java new file mode 100644 index 0000000000000..ae37a70dc166c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ScriptExecution list operation. + */ +@Immutable +public final class ScriptExecutionListResult { + /* + * The ScriptExecution items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ScriptExecutionListResult class. + */ + private ScriptExecutionListResult() { + } + + /** + * Get the value property: The ScriptExecution items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model ScriptExecutionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackageListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackageListResult.java new file mode 100644 index 0000000000000..9c96fbcd22394 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackageListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ScriptPackage list operation. + */ +@Immutable +public final class ScriptPackageListResult { + /* + * The ScriptPackage items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ScriptPackageListResult class. + */ + private ScriptPackageListResult() { + } + + /** + * Get the value property: The ScriptPackage items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ScriptPackageListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptPackageListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachineListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachineListResult.java new file mode 100644 index 0000000000000..5efae0b656014 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachineListResult.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a VirtualMachine list operation. + */ +@Immutable +public final class VirtualMachineListResult { + /* + * The VirtualMachine items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of VirtualMachineListResult class. + */ + private VirtualMachineListResult() { + } + + /** + * Get the value property: The VirtualMachine items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model VirtualMachineListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpListResult.java new file mode 100644 index 0000000000000..99f340db1108d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkDhcp list operation. + */ +@Immutable +public final class WorkloadNetworkDhcpListResult { + /* + * The WorkloadNetworkDhcp items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkDhcpListResult class. + */ + private WorkloadNetworkDhcpListResult() { + } + + /** + * Get the value property: The WorkloadNetworkDhcp items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkDhcpListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDhcpListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServiceListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServiceListResult.java new file mode 100644 index 0000000000000..a91bd10be67a7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServiceListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkDnsService list operation. + */ +@Immutable +public final class WorkloadNetworkDnsServiceListResult { + /* + * The WorkloadNetworkDnsService items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkDnsServiceListResult class. + */ + private WorkloadNetworkDnsServiceListResult() { + } + + /** + * Get the value property: The WorkloadNetworkDnsService items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkDnsServiceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsServiceListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZoneListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZoneListResult.java new file mode 100644 index 0000000000000..02f46d9573918 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZoneListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkDnsZone list operation. + */ +@Immutable +public final class WorkloadNetworkDnsZoneListResult { + /* + * The WorkloadNetworkDnsZone items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkDnsZoneListResult class. + */ + private WorkloadNetworkDnsZoneListResult() { + } + + /** + * Get the value property: The WorkloadNetworkDnsZone items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkDnsZoneListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsZoneListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayListResult.java new file mode 100644 index 0000000000000..a4a0b2653185c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkGateway list operation. + */ +@Immutable +public final class WorkloadNetworkGatewayListResult { + /* + * The WorkloadNetworkGateway items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkGatewayListResult class. + */ + private WorkloadNetworkGatewayListResult() { + } + + /** + * Get the value property: The WorkloadNetworkGateway items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkGatewayListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkGatewayListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkListResult.java new file mode 100644 index 0000000000000..f1e1f370f71f4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetwork list operation. + */ +@Immutable +public final class WorkloadNetworkListResult { + /* + * The WorkloadNetwork items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkListResult class. + */ + private WorkloadNetworkListResult() { + } + + /** + * Get the value property: The WorkloadNetwork items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model WorkloadNetworkListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringListResult.java new file mode 100644 index 0000000000000..9a852d3d99944 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkPortMirroring list operation. + */ +@Immutable +public final class WorkloadNetworkPortMirroringListResult { + /* + * The WorkloadNetworkPortMirroring items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkPortMirroringListResult class. + */ + private WorkloadNetworkPortMirroringListResult() { + } + + /** + * Get the value property: The WorkloadNetworkPortMirroring items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkPortMirroringListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPortMirroringListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPListResult.java new file mode 100644 index 0000000000000..0aa38ce4a8225 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkPublicIP list operation. + */ +@Immutable +public final class WorkloadNetworkPublicIPListResult { + /* + * The WorkloadNetworkPublicIP items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkPublicIPListResult class. + */ + private WorkloadNetworkPublicIPListResult() { + } + + /** + * Get the value property: The WorkloadNetworkPublicIP items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkPublicIPListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPublicIPListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentListResult.java new file mode 100644 index 0000000000000..30f3bd85fca37 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkSegment list operation. + */ +@Immutable +public final class WorkloadNetworkSegmentListResult { + /* + * The WorkloadNetworkSegment items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkSegmentListResult class. + */ + private WorkloadNetworkSegmentListResult() { + } + + /** + * Get the value property: The WorkloadNetworkSegment items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkSegmentListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkSegmentListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupListResult.java new file mode 100644 index 0000000000000..8e96ee1d58ddd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkVMGroup list operation. + */ +@Immutable +public final class WorkloadNetworkVMGroupListResult { + /* + * The WorkloadNetworkVMGroup items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkVMGroupListResult class. + */ + private WorkloadNetworkVMGroupListResult() { + } + + /** + * Get the value property: The WorkloadNetworkVMGroup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkVMGroupListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVMGroupListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachineListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachineListResult.java new file mode 100644 index 0000000000000..1cbb6b4abbb8b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachineListResult.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkVirtualMachine list operation. + */ +@Immutable +public final class WorkloadNetworkVirtualMachineListResult { + /* + * The WorkloadNetworkVirtualMachine items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkVirtualMachineListResult class. + */ + private WorkloadNetworkVirtualMachineListResult() { + } + + /** + * Get the value property: The WorkloadNetworkVirtualMachine items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkVirtualMachineListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVirtualMachineListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java index 98dd9ee386eb7..6b06533a637df 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -/** Package containing the implementations for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the implementations for Avs. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs.implementation; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java new file mode 100644 index 0000000000000..1e2b7e1a440fd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ +public final class ActionType extends ExpandableStringEnum { + /** + * Static value Internal for ActionType. + */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java index 7e3e4e79c9434..2e99ee4029b0d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java @@ -1,74 +1,92 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.AddonInner; -/** An immutable client-side representation of Addon. */ +/** + * An immutable client-side representation of Addon. + */ public interface Addon { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the properties property: The properties of an addon resource. - * + * Gets the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ AddonProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.AddonInner object. - * + * * @return the inner object. */ AddonInner innerModel(); - /** The entirety of the Addon definition. */ + /** + * The entirety of the Addon definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Addon definition stages. */ + /** + * The Addon definition stages. + */ interface DefinitionStages { - /** The first stage of the Addon definition. */ + /** + * The first stage of the Addon definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Addon definition allowing to specify parent resource. */ + /** + * The stage of the Addon definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -81,26 +99,28 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ Addon create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Addon create(Context context); } - /** The stage of the Addon definition allowing to specify properties. */ + /** + * The stage of the Addon definition allowing to specify properties. + */ interface WithProperties { /** - * Specifies the properties property: The properties of an addon resource. - * - * @param properties The properties of an addon resource. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ WithCreate withProperties(AddonProperties properties); @@ -109,53 +129,47 @@ interface WithProperties { /** * Begins update for the Addon resource. - * + * * @return the stage of resource update. */ Addon.Update update(); - /** The template for Addon update. */ - interface Update extends UpdateStages.WithProperties { + /** + * The template for Addon update. + */ + interface Update { /** * Executes the update request. - * + * * @return the updated resource. */ Addon apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Addon apply(Context context); } - /** The Addon update stages. */ + /** + * The Addon update stages. + */ interface UpdateStages { - /** The stage of the Addon update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: The properties of an addon resource. - * - * @param properties The properties of an addon resource. - * @return the next definition stage. - */ - Update withProperties(AddonProperties properties); - } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Addon refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java index 80446d49c90aa..770649b610aa8 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 @@ -1,32 +1,58 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of an Arc addon. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "addonType") +/** + * The properties of an Arc addon. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "addonType", + defaultImpl = AddonArcProperties.class, + visible = true) @JsonTypeName("Arc") @Fluent public final class AddonArcProperties extends AddonProperties { + /* + * Addon type + */ + @JsonTypeId + @JsonProperty(value = "addonType", required = true) + private AddonType addonType = AddonType.ARC; + /* * The VMware vCenter resource ID */ @JsonProperty(value = "vCenter") private String vCenter; - /** Creates an instance of AddonArcProperties class. */ + /** + * Creates an instance of AddonArcProperties class. + */ public AddonArcProperties() { } + /** + * Get the addonType property: Addon type. + * + * @return the addonType value. + */ + @Override + public AddonType addonType() { + return this.addonType; + } + /** * Get the vCenter property: The VMware vCenter resource ID. - * + * * @return the vCenter value. */ public String vCenter() { @@ -35,7 +61,7 @@ public String vCenter() { /** * Set the vCenter property: The VMware vCenter resource ID. - * + * * @param vCenter the vCenter value to set. * @return the AddonArcProperties object itself. */ @@ -46,7 +72,7 @@ public AddonArcProperties withVCenter(String vCenter) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java index ce29dab08cce3..62cf458248488 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 @@ -1,33 +1,59 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of an HCX addon. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "addonType") +/** + * The properties of an HCX addon. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "addonType", + defaultImpl = AddonHcxProperties.class, + visible = true) @JsonTypeName("HCX") @Fluent public final class AddonHcxProperties extends AddonProperties { + /* + * Addon type + */ + @JsonTypeId + @JsonProperty(value = "addonType", required = true) + private AddonType addonType = AddonType.HCX; + /* * The HCX offer, example VMware MaaS Cloud Provider (Enterprise) */ @JsonProperty(value = "offer", required = true) private String offer; - /** Creates an instance of AddonHcxProperties class. */ + /** + * Creates an instance of AddonHcxProperties class. + */ public AddonHcxProperties() { } + /** + * Get the addonType property: Addon type. + * + * @return the addonType value. + */ + @Override + public AddonType addonType() { + return this.addonType; + } + /** * Get the offer property: The HCX offer, example VMware MaaS Cloud Provider (Enterprise). - * + * * @return the offer value. */ public String offer() { @@ -36,7 +62,7 @@ public String offer() { /** * Set the offer property: The HCX offer, example VMware MaaS Cloud Provider (Enterprise). - * + * * @param offer the offer value to set. * @return the AddonHcxProperties object itself. */ @@ -47,16 +73,15 @@ public AddonHcxProperties withOffer(String offer) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (offer() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property offer in model AddonHcxProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property offer in model AddonHcxProperties")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonList.java deleted file mode 100644 index 0ee7ce36d6f69..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.AddonInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of addons. */ -@Immutable -public final class AddonList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of AddonList class. */ - public AddonList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java index 58efc7492e42c..2a94360247bb3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java @@ -1,43 +1,59 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of an addon. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "addonType", - defaultImpl = AddonProperties.class) +/** + * The properties of an addon. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "addonType", defaultImpl = AddonProperties.class, visible = true) @JsonTypeName("AddonProperties") @JsonSubTypes({ @JsonSubTypes.Type(name = "SRM", value = AddonSrmProperties.class), @JsonSubTypes.Type(name = "VR", value = AddonVrProperties.class), @JsonSubTypes.Type(name = "HCX", value = AddonHcxProperties.class), - @JsonSubTypes.Type(name = "Arc", value = AddonArcProperties.class) -}) + @JsonSubTypes.Type(name = "Arc", value = AddonArcProperties.class) }) @Immutable public class AddonProperties { + /* + * Addon type + */ + @JsonTypeId + @JsonProperty(value = "addonType", required = true) + private AddonType addonType = AddonType.fromString("AddonProperties"); + /* * The state of the addon provisioning */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private AddonProvisioningState provisioningState; - /** Creates an instance of AddonProperties class. */ + /** + * Creates an instance of AddonProperties class. + */ public AddonProperties() { } + /** + * Get the addonType property: Addon type. + * + * @return the addonType value. + */ + public AddonType addonType() { + return this.addonType; + } + /** * Get the provisioningState property: The state of the addon provisioning. - * + * * @return the provisioningState value. */ public AddonProvisioningState provisioningState() { @@ -46,7 +62,7 @@ public AddonProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java index ad48d216d0a7b..97f859a2dab0c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the addon provisioning. */ +/** + * Addon provisioning state. + */ public final class AddonProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for AddonProvisioningState. */ + /** + * Static value Succeeded for AddonProvisioningState. + */ public static final AddonProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for AddonProvisioningState. */ + /** + * Static value Failed for AddonProvisioningState. + */ public static final AddonProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelled for AddonProvisioningState. */ + /** + * Static value Canceled for AddonProvisioningState. + */ + public static final AddonProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Cancelled for AddonProvisioningState. + */ public static final AddonProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Building for AddonProvisioningState. */ + /** + * Static value Building for AddonProvisioningState. + */ public static final AddonProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for AddonProvisioningState. */ + /** + * Static value Deleting for AddonProvisioningState. + */ public static final AddonProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for AddonProvisioningState. */ + /** + * Static value Updating for AddonProvisioningState. + */ public static final AddonProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for AddonProvisioningState. */ - public static final AddonProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of AddonProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public AddonProvisioningState() { /** * Creates or finds a AddonProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding AddonProvisioningState. */ @@ -53,7 +69,7 @@ public static AddonProvisioningState fromString(String name) { /** * Gets known AddonProvisioningState values. - * + * * @return known AddonProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java index 669eca9222a20..76ba8c9c95dd2 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 @@ -1,32 +1,58 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of a Site Recovery Manager (SRM) addon. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "addonType") +/** + * The properties of a Site Recovery Manager (SRM) addon. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "addonType", + defaultImpl = AddonSrmProperties.class, + visible = true) @JsonTypeName("SRM") @Fluent public final class AddonSrmProperties extends AddonProperties { + /* + * Addon type + */ + @JsonTypeId + @JsonProperty(value = "addonType", required = true) + private AddonType addonType = AddonType.SRM; + /* * The Site Recovery Manager (SRM) license */ @JsonProperty(value = "licenseKey") private String licenseKey; - /** Creates an instance of AddonSrmProperties class. */ + /** + * Creates an instance of AddonSrmProperties class. + */ public AddonSrmProperties() { } + /** + * Get the addonType property: Addon type. + * + * @return the addonType value. + */ + @Override + public AddonType addonType() { + return this.addonType; + } + /** * Get the licenseKey property: The Site Recovery Manager (SRM) license. - * + * * @return the licenseKey value. */ public String licenseKey() { @@ -35,7 +61,7 @@ public String licenseKey() { /** * Set the licenseKey property: The Site Recovery Manager (SRM) license. - * + * * @param licenseKey the licenseKey value to set. * @return the AddonSrmProperties object itself. */ @@ -46,7 +72,7 @@ public AddonSrmProperties withLicenseKey(String licenseKey) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java index dabcc00e6aa57..d1d8a0b7fe561 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of private cloud addon. */ +/** + * Addon type. + */ public final class AddonType extends ExpandableStringEnum { - /** Static value SRM for AddonType. */ + /** + * Static value SRM for AddonType. + */ public static final AddonType SRM = fromString("SRM"); - /** Static value VR for AddonType. */ + /** + * Static value VR for AddonType. + */ public static final AddonType VR = fromString("VR"); - /** Static value HCX for AddonType. */ + /** + * Static value HCX for AddonType. + */ public static final AddonType HCX = fromString("HCX"); - /** Static value Arc for AddonType. */ + /** + * Static value Arc for AddonType. + */ public static final AddonType ARC = fromString("Arc"); /** * Creates a new instance of AddonType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public AddonType() { /** * Creates or finds a AddonType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AddonType. */ @@ -44,7 +54,7 @@ public static AddonType fromString(String name) { /** * Gets known AddonType values. - * + * * @return known AddonType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java index 6ea7a60736e96..94be4fb3727db 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 @@ -1,32 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of a vSphere Replication (VR) addon. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "addonType") +/** + * The properties of a vSphere Replication (VR) addon. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "addonType", defaultImpl = AddonVrProperties.class, visible = true) @JsonTypeName("VR") @Fluent public final class AddonVrProperties extends AddonProperties { + /* + * Addon type + */ + @JsonTypeId + @JsonProperty(value = "addonType", required = true) + private AddonType addonType = AddonType.VR; + /* * The vSphere Replication Server (VRS) count */ @JsonProperty(value = "vrsCount", required = true) private int vrsCount; - /** Creates an instance of AddonVrProperties class. */ + /** + * Creates an instance of AddonVrProperties class. + */ public AddonVrProperties() { } + /** + * Get the addonType property: Addon type. + * + * @return the addonType value. + */ + @Override + public AddonType addonType() { + return this.addonType; + } + /** * Get the vrsCount property: The vSphere Replication Server (VRS) count. - * + * * @return the vrsCount value. */ public int vrsCount() { @@ -35,7 +57,7 @@ public int vrsCount() { /** * Set the vrsCount property: The vSphere Replication Server (VRS) count. - * + * * @param vrsCount the vrsCount value to set. * @return the AddonVrProperties object itself. */ @@ -46,7 +68,7 @@ public AddonVrProperties withVrsCount(int vrsCount) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addons.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addons.java index 200999a910969..dc501f68a62fa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addons.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addons.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,67 +8,69 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Addons. */ +/** + * Resource collection API of Addons. + */ public interface Addons { /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String addonName, + Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud. + * @return a Addon. */ Addon get(String resourceGroupName, String privateCloudName, String addonName); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -76,11 +78,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String addonName); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -89,31 +91,31 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String addonName, Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ Addon getById(String id); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,8 +124,8 @@ Response getWithResponse( void deleteById(String id); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getWithResponse( /** * Begins definition for a new Addon resource. - * + * * @param name resource name. * @return the first stage of the new Addon definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java index c8136800d2040..265d685b159a2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java @@ -1,44 +1,46 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; -/** An immutable client-side representation of AdminCredentials. */ +/** + * An immutable client-side representation of AdminCredentials. + */ public interface AdminCredentials { /** * Gets the nsxtUsername property: NSX-T Manager username. - * + * * @return the nsxtUsername value. */ String nsxtUsername(); /** * Gets the nsxtPassword property: NSX-T Manager password. - * + * * @return the nsxtPassword value. */ String nsxtPassword(); /** * Gets the vcenterUsername property: vCenter admin username. - * + * * @return the vcenterUsername value. */ String vcenterUsername(); /** * Gets the vcenterPassword property: vCenter admin password. - * + * * @return the vcenterPassword value. */ String vcenterPassword(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner object. - * + * * @return the inner object. */ AdminCredentialsInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java index 7516139f3feff..f4c84d0b511a4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** VM-Host placement policy affinity strength (should/must). */ +/** + * Affinity Strength. + */ public final class AffinityStrength extends ExpandableStringEnum { - /** Static value Should for AffinityStrength. */ + /** + * Static value Should for AffinityStrength. + */ public static final AffinityStrength SHOULD = fromString("Should"); - /** Static value Must for AffinityStrength. */ + /** + * Static value Must for AffinityStrength. + */ public static final AffinityStrength MUST = fromString("Must"); /** * Creates a new instance of AffinityStrength value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AffinityStrength() { /** * Creates or finds a AffinityStrength from its string representation. - * + * * @param name a name to look for. * @return the corresponding AffinityStrength. */ @@ -38,7 +44,7 @@ public static AffinityStrength fromString(String name) { /** * Gets known AffinityStrength values. - * + * * @return known AffinityStrength values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java index 7e918dde4c640..6737aee1af2a3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Placement policy affinity type. */ +/** + * Affinity type. + */ public final class AffinityType extends ExpandableStringEnum { - /** Static value Affinity for AffinityType. */ + /** + * Static value Affinity for AffinityType. + */ public static final AffinityType AFFINITY = fromString("Affinity"); - /** Static value AntiAffinity for AffinityType. */ + /** + * Static value AntiAffinity for AffinityType. + */ public static final AffinityType ANTI_AFFINITY = fromString("AntiAffinity"); /** * Creates a new instance of AffinityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AffinityType() { /** * Creates or finds a AffinityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AffinityType. */ @@ -38,7 +44,7 @@ public static AffinityType fromString(String name) { /** * Gets known AffinityType values. - * + * * @return known AffinityType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java index 5ad49c3b81471..715c100724cbc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,67 +8,71 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Authorizations. */ +/** + * Resource collection API of Authorizations. + */ public interface Authorizations { /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. + * @return a ExpressRouteAuthorization along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String authorizationName, Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ExpressRoute Circuit Authorization by name in a private cloud. + * @return a ExpressRouteAuthorization. */ ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -76,11 +80,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String authorizationName); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -89,31 +93,31 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String authorizationName, Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. + * @return a ExpressRouteAuthorization along with {@link Response}. */ ExpressRouteAuthorization getById(String id); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. + * @return a ExpressRouteAuthorization along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,8 +126,8 @@ Response getWithResponse( void deleteById(String id); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +138,7 @@ Response getWithResponse( /** * Begins definition for a new ExpressRouteAuthorization resource. - * + * * @param name resource name. * @return the first stage of the new ExpressRouteAuthorization definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java index c1f9a63e202c5..5d5efeb1974cf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties describing private cloud availability zone distribution. */ +/** + * The properties describing private cloud availability zone distribution. + */ @Fluent public final class AvailabilityProperties { /* @@ -28,13 +30,15 @@ public final class AvailabilityProperties { @JsonProperty(value = "secondaryZone") private Integer secondaryZone; - /** Creates an instance of AvailabilityProperties class. */ + /** + * Creates an instance of AvailabilityProperties class. + */ public AvailabilityProperties() { } /** * Get the strategy property: The availability strategy for the private cloud. - * + * * @return the strategy value. */ public AvailabilityStrategy strategy() { @@ -43,7 +47,7 @@ public AvailabilityStrategy strategy() { /** * Set the strategy property: The availability strategy for the private cloud. - * + * * @param strategy the strategy value to set. * @return the AvailabilityProperties object itself. */ @@ -54,7 +58,7 @@ public AvailabilityProperties withStrategy(AvailabilityStrategy strategy) { /** * Get the zone property: The primary availability zone for the private cloud. - * + * * @return the zone value. */ public Integer zone() { @@ -63,7 +67,7 @@ public Integer zone() { /** * Set the zone property: The primary availability zone for the private cloud. - * + * * @param zone the zone value to set. * @return the AvailabilityProperties object itself. */ @@ -74,7 +78,7 @@ public AvailabilityProperties withZone(Integer zone) { /** * Get the secondaryZone property: The secondary availability zone for the private cloud. - * + * * @return the secondaryZone value. */ public Integer secondaryZone() { @@ -83,7 +87,7 @@ public Integer secondaryZone() { /** * Set the secondaryZone property: The secondary availability zone for the private cloud. - * + * * @param secondaryZone the secondaryZone value to set. * @return the AvailabilityProperties object itself. */ @@ -94,7 +98,7 @@ public AvailabilityProperties withSecondaryZone(Integer secondaryZone) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java index 65177e6afdc1b..042f51e5b69c3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The availability strategy for the private cloud. */ +/** + * Whether the private clouds is available in a single zone or two zones. + */ public final class AvailabilityStrategy extends ExpandableStringEnum { - /** Static value SingleZone for AvailabilityStrategy. */ + /** + * Static value SingleZone for AvailabilityStrategy. + */ public static final AvailabilityStrategy SINGLE_ZONE = fromString("SingleZone"); - /** Static value DualZone for AvailabilityStrategy. */ + /** + * Static value DualZone for AvailabilityStrategy. + */ public static final AvailabilityStrategy DUAL_ZONE = fromString("DualZone"); /** * Creates a new instance of AvailabilityStrategy value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AvailabilityStrategy() { /** * Creates or finds a AvailabilityStrategy from its string representation. - * + * * @param name a name to look for. * @return the corresponding AvailabilityStrategy. */ @@ -38,7 +44,7 @@ public static AvailabilityStrategy fromString(String name) { /** * Gets known AvailabilityStrategy values. - * + * * @return known AvailabilityStrategy values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java index 7de79deb10e31..e95e2487e4e45 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Placement policy hosts opt-in Azure Hybrid Benefit type. */ +/** + * Azure Hybrid Benefit type. + */ public final class AzureHybridBenefitType extends ExpandableStringEnum { - /** Static value SqlHost for AzureHybridBenefitType. */ + /** + * Static value SqlHost for AzureHybridBenefitType. + */ public static final AzureHybridBenefitType SQL_HOST = fromString("SqlHost"); - /** Static value None for AzureHybridBenefitType. */ + /** + * Static value None for AzureHybridBenefitType. + */ public static final AzureHybridBenefitType NONE = fromString("None"); /** * Creates a new instance of AzureHybridBenefitType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AzureHybridBenefitType() { /** * Creates or finds a AzureHybridBenefitType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AzureHybridBenefitType. */ @@ -38,7 +44,7 @@ public static AzureHybridBenefitType fromString(String name) { /** * Gets known AzureHybridBenefitType values. - * + * * @return known AzureHybridBenefitType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java index c2754622da1a2..95542b2a4456a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** An ExpressRoute Circuit. */ +/** + * An ExpressRoute Circuit. + */ @Immutable public final class Circuit { /* @@ -34,13 +36,15 @@ public final class Circuit { @JsonProperty(value = "expressRoutePrivatePeeringID", access = JsonProperty.Access.WRITE_ONLY) private String expressRoutePrivatePeeringId; - /** Creates an instance of Circuit class. */ + /** + * Creates an instance of Circuit class. + */ public Circuit() { } /** * Get the primarySubnet property: CIDR of primary subnet. - * + * * @return the primarySubnet value. */ public String primarySubnet() { @@ -49,7 +53,7 @@ public String primarySubnet() { /** * Get the secondarySubnet property: CIDR of secondary subnet. - * + * * @return the secondarySubnet value. */ public String secondarySubnet() { @@ -58,7 +62,7 @@ public String secondarySubnet() { /** * Get the expressRouteId property: Identifier of the ExpressRoute Circuit (Microsoft Colo only). - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -67,7 +71,7 @@ public String expressRouteId() { /** * Get the expressRoutePrivatePeeringId property: ExpressRoute Circuit private peering identifier. - * + * * @return the expressRoutePrivatePeeringId value. */ public String expressRoutePrivatePeeringId() { @@ -76,7 +80,7 @@ public String expressRoutePrivatePeeringId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java index 29233605b78f3..be1b1f75fd0ed 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java @@ -1,81 +1,106 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.CloudLinkInner; -/** An immutable client-side representation of CloudLink. */ +/** + * An immutable client-side representation of CloudLink. + */ public interface CloudLink { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + CloudLinkProvisioningState provisioningState(); + /** * Gets the status property: The state of the cloud link. - * + * * @return the status value. */ CloudLinkStatus status(); /** * Gets the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @return the linkedCloud value. */ String linkedCloud(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.CloudLinkInner object. - * + * * @return the inner object. */ CloudLinkInner innerModel(); - /** The entirety of the CloudLink definition. */ + /** + * The entirety of the CloudLink definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The CloudLink definition stages. */ + /** + * The CloudLink definition stages. + */ interface DefinitionStages { - /** The first stage of the CloudLink definition. */ + /** + * The first stage of the CloudLink definition. + */ interface Blank extends WithParentResource { } - /** The stage of the CloudLink definition allowing to specify parent resource. */ + /** + * The stage of the CloudLink definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -88,25 +113,27 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithLinkedCloud { /** * Executes the create request. - * + * * @return the created resource. */ CloudLink create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ CloudLink create(Context context); } - /** The stage of the CloudLink definition allowing to specify linkedCloud. */ + /** + * The stage of the CloudLink definition allowing to specify linkedCloud. + */ interface WithLinkedCloud { /** * Specifies the linkedCloud property: Identifier of the other private cloud participating in the link.. - * + * * @param linkedCloud Identifier of the other private cloud participating in the link. * @return the next definition stage. */ @@ -116,36 +143,42 @@ interface WithLinkedCloud { /** * Begins update for the CloudLink resource. - * + * * @return the stage of resource update. */ CloudLink.Update update(); - /** The template for CloudLink update. */ + /** + * The template for CloudLink update. + */ interface Update extends UpdateStages.WithLinkedCloud { /** * Executes the update request. - * + * * @return the updated resource. */ CloudLink apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ CloudLink apply(Context context); } - /** The CloudLink update stages. */ + /** + * The CloudLink update stages. + */ interface UpdateStages { - /** The stage of the CloudLink update allowing to specify linkedCloud. */ + /** + * The stage of the CloudLink update allowing to specify linkedCloud. + */ interface WithLinkedCloud { /** * Specifies the linkedCloud property: Identifier of the other private cloud participating in the link.. - * + * * @param linkedCloud Identifier of the other private cloud participating in the link. * @return the next definition stage. */ @@ -155,14 +188,14 @@ interface WithLinkedCloud { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ CloudLink refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkList.java deleted file mode 100644 index 0a50fa8b50c87..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of cloud links. */ -@Immutable -public final class CloudLinkList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of CloudLinkList class. */ - public CloudLinkList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java new file mode 100644 index 0000000000000..16b507f1636a8 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * cloud link provisioning state. + */ +public final class CloudLinkProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for CloudLinkProvisioningState. + */ + public static final CloudLinkProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for CloudLinkProvisioningState. + */ + public static final CloudLinkProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for CloudLinkProvisioningState. + */ + public static final CloudLinkProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of CloudLinkProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CloudLinkProvisioningState() { + } + + /** + * Creates or finds a CloudLinkProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CloudLinkProvisioningState. + */ + @JsonCreator + public static CloudLinkProvisioningState fromString(String name) { + return fromString(name, CloudLinkProvisioningState.class); + } + + /** + * Gets known CloudLinkProvisioningState values. + * + * @return known CloudLinkProvisioningState values. + */ + public static Collection values() { + return values(CloudLinkProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java index a4d109073518e..3d8a7fcd51814 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the cloud link. */ +/** + * Cloud Link status. + */ public final class CloudLinkStatus extends ExpandableStringEnum { - /** Static value Active for CloudLinkStatus. */ + /** + * Static value Active for CloudLinkStatus. + */ public static final CloudLinkStatus ACTIVE = fromString("Active"); - /** Static value Building for CloudLinkStatus. */ + /** + * Static value Building for CloudLinkStatus. + */ public static final CloudLinkStatus BUILDING = fromString("Building"); - /** Static value Deleting for CloudLinkStatus. */ + /** + * Static value Deleting for CloudLinkStatus. + */ public static final CloudLinkStatus DELETING = fromString("Deleting"); - /** Static value Failed for CloudLinkStatus. */ + /** + * Static value Failed for CloudLinkStatus. + */ public static final CloudLinkStatus FAILED = fromString("Failed"); - /** Static value Disconnected for CloudLinkStatus. */ + /** + * Static value Disconnected for CloudLinkStatus. + */ public static final CloudLinkStatus DISCONNECTED = fromString("Disconnected"); /** * Creates a new instance of CloudLinkStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public CloudLinkStatus() { /** * Creates or finds a CloudLinkStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding CloudLinkStatus. */ @@ -47,7 +59,7 @@ public static CloudLinkStatus fromString(String name) { /** * Gets known CloudLinkStatus values. - * + * * @return known CloudLinkStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java index bd7761b6b158b..f7a0d33b55432 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,67 +8,69 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of CloudLinks. */ +/** + * Resource collection API of CloudLinks. + */ public interface CloudLinks { /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, + Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud. + * @return a CloudLink. */ CloudLink get(String resourceGroupName, String privateCloudName, String cloudLinkName); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -76,11 +78,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String cloudLinkName); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -89,31 +91,31 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ CloudLink getById(String id); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,8 +124,8 @@ Response getWithResponse( void deleteById(String id); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getWithResponse( /** * Begins definition for a new CloudLink resource. - * + * * @param name resource name. * @return the first stage of the new CloudLink definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Cluster.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Cluster.java index 7a37a868ef3e6..c3599367fd311 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Cluster.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Cluster.java @@ -1,118 +1,142 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import java.util.List; -/** An immutable client-side representation of Cluster. */ +/** + * An immutable client-side representation of Cluster. + */ public interface Cluster { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the sku property: The cluster SKU. - * + * Gets the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @return the sku value. */ Sku sku(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the clusterSize property: The cluster size. - * + * * @return the clusterSize value. */ Integer clusterSize(); /** * Gets the provisioningState property: The state of the cluster provisioning. - * + * * @return the provisioningState value. */ ClusterProvisioningState provisioningState(); /** * Gets the clusterId property: The identity. - * + * * @return the clusterId value. */ Integer clusterId(); /** * Gets the hosts property: The hosts. - * + * * @return the hosts value. */ List hosts(); + /** + * Gets the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @return the vsanDatastoreName value. + */ + String vsanDatastoreName(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ClusterInner object. - * + * * @return the inner object. */ ClusterInner innerModel(); - /** The entirety of the Cluster definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithSku, - DefinitionStages.WithCreate { + /** + * The entirety of the Cluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithSku, + DefinitionStages.WithCreate { } - /** The Cluster definition stages. */ + /** + * The Cluster definition stages. + */ interface DefinitionStages { - /** The first stage of the Cluster definition. */ + /** + * The first stage of the Cluster definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Cluster definition allowing to specify parent resource. */ + /** + * The stage of the Cluster definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithSku withExistingPrivateCloud(String resourceGroupName, String privateCloudName); } - /** The stage of the Cluster definition allowing to specify sku. */ + /** + * The stage of the Cluster definition allowing to specify sku. + */ interface WithSku { /** - * Specifies the sku property: The cluster SKU. - * - * @param sku The cluster SKU. + * Specifies the sku property: The SKU (Stock Keeping Unit) assigned to this resource.. + * + * @param sku The SKU (Stock Keeping Unit) assigned to this resource. * @return the next definition stage. */ WithCreate withSku(Sku sku); @@ -122,89 +146,128 @@ interface WithSku { * The stage of the Cluster definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithClusterSize, DefinitionStages.WithHosts { + interface WithCreate extends DefinitionStages.WithClusterSize, DefinitionStages.WithHosts, + DefinitionStages.WithVsanDatastoreName { /** * Executes the create request. - * + * * @return the created resource. */ Cluster create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Cluster create(Context context); } - /** The stage of the Cluster definition allowing to specify clusterSize. */ + /** + * The stage of the Cluster definition allowing to specify clusterSize. + */ interface WithClusterSize { /** * Specifies the clusterSize property: The cluster size. - * + * * @param clusterSize The cluster size. * @return the next definition stage. */ WithCreate withClusterSize(Integer clusterSize); } - /** The stage of the Cluster definition allowing to specify hosts. */ + /** + * The stage of the Cluster definition allowing to specify hosts. + */ interface WithHosts { /** * Specifies the hosts property: The hosts. - * + * * @param hosts The hosts. * @return the next definition stage. */ WithCreate withHosts(List hosts); } + + /** + * The stage of the Cluster definition allowing to specify vsanDatastoreName. + */ + interface WithVsanDatastoreName { + /** + * Specifies the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @param vsanDatastoreName Name of the vsan datastore associated with the cluster. + * @return the next definition stage. + */ + WithCreate withVsanDatastoreName(String vsanDatastoreName); + } } /** * Begins update for the Cluster resource. - * + * * @return the stage of resource update. */ Cluster.Update update(); - /** The template for Cluster update. */ - interface Update extends UpdateStages.WithClusterSize, UpdateStages.WithHosts { + /** + * The template for Cluster update. + */ + interface Update extends UpdateStages.WithSku, UpdateStages.WithClusterSize, UpdateStages.WithHosts { /** * Executes the update request. - * + * * @return the updated resource. */ Cluster apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Cluster apply(Context context); } - /** The Cluster update stages. */ + /** + * The Cluster update stages. + */ interface UpdateStages { - /** The stage of the Cluster update allowing to specify clusterSize. */ + /** + * The stage of the Cluster update allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: The SKU (Stock Keeping Unit) assigned to this resource.. + * + * @param sku The SKU (Stock Keeping Unit) assigned to this resource. + * @return the next definition stage. + */ + Update withSku(Sku sku); + } + + /** + * The stage of the Cluster update allowing to specify clusterSize. + */ interface WithClusterSize { /** * Specifies the clusterSize property: The cluster size. - * + * * @param clusterSize The cluster size. * @return the next definition stage. */ Update withClusterSize(Integer clusterSize); } - /** The stage of the Cluster update allowing to specify hosts. */ + /** + * The stage of the Cluster update allowing to specify hosts. + */ interface WithHosts { /** * Specifies the hosts property: The hosts. - * + * * @param hosts The hosts. * @return the next definition stage. */ @@ -214,14 +277,14 @@ interface WithHosts { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Cluster refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -229,7 +292,7 @@ interface WithHosts { /** * List hosts by zone in a cluster. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -240,7 +303,7 @@ interface WithHosts { /** * List hosts by zone in a cluster. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all zones and associated hosts for a cluster. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterList.java deleted file mode 100644 index 698ec28a47053..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ClusterInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of clusters. */ -@Immutable -public final class ClusterList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ClusterList class. */ - public ClusterList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java index 3101b6cec15ed..62d9c9ab36207 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the cluster provisioning. */ +/** + * Cluster provisioning state. + */ public final class ClusterProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for ClusterProvisioningState. */ + /** + * Static value Succeeded for ClusterProvisioningState. + */ public static final ClusterProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ClusterProvisioningState. */ + /** + * Static value Failed for ClusterProvisioningState. + */ public static final ClusterProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelled for ClusterProvisioningState. */ + /** + * Static value Canceled for ClusterProvisioningState. + */ + public static final ClusterProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Cancelled for ClusterProvisioningState. + */ public static final ClusterProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Deleting for ClusterProvisioningState. */ + /** + * Static value Deleting for ClusterProvisioningState. + */ public static final ClusterProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for ClusterProvisioningState. */ + /** + * Static value Updating for ClusterProvisioningState. + */ public static final ClusterProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for ClusterProvisioningState. */ - public static final ClusterProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of ClusterProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public ClusterProvisioningState() { /** * Creates or finds a ClusterProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ClusterProvisioningState. */ @@ -50,7 +64,7 @@ public static ClusterProvisioningState fromString(String name) { /** * Gets known ClusterProvisioningState values. - * + * * @return known ClusterProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java index 4262fdfbb8676..404e7b8dd03c1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -9,22 +9,52 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** An update of a cluster resource. */ +/** + * An update of a cluster resource. + */ @Fluent public final class ClusterUpdate { + /* + * The SKU (Stock Keeping Unit) assigned to this resource. + */ + @JsonProperty(value = "sku") + private Sku sku; + /* * The properties of a cluster resource that may be updated */ @JsonProperty(value = "properties") private ClusterUpdateProperties innerProperties; - /** Creates an instance of ClusterUpdate class. */ + /** + * Creates an instance of ClusterUpdate class. + */ public ClusterUpdate() { } + /** + * Get the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * + * @param sku the sku value to set. + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withSku(Sku sku) { + this.sku = sku; + return this; + } + /** * Get the innerProperties property: The properties of a cluster resource that may be updated. - * + * * @return the innerProperties value. */ private ClusterUpdateProperties innerProperties() { @@ -33,7 +63,7 @@ private ClusterUpdateProperties innerProperties() { /** * Get the clusterSize property: The cluster size. - * + * * @return the clusterSize value. */ public Integer clusterSize() { @@ -42,7 +72,7 @@ public Integer clusterSize() { /** * Set the clusterSize property: The cluster size. - * + * * @param clusterSize the clusterSize value to set. * @return the ClusterUpdate object itself. */ @@ -56,7 +86,7 @@ public ClusterUpdate withClusterSize(Integer clusterSize) { /** * Get the hosts property: The hosts. - * + * * @return the hosts value. */ public List hosts() { @@ -65,7 +95,7 @@ public List hosts() { /** * Set the hosts property: The hosts. - * + * * @param hosts the hosts value to set. * @return the ClusterUpdate object itself. */ @@ -79,10 +109,13 @@ public ClusterUpdate withHosts(List hosts) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (sku() != null) { + sku().validate(); + } if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java index 7d1dcfc2aba50..af36ef2ca495c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Zone and associated hosts info. */ +/** + * Zone and associated hosts info. + */ @Immutable public final class ClusterZone { /* @@ -23,13 +25,15 @@ public final class ClusterZone { @JsonProperty(value = "zone", access = JsonProperty.Access.WRITE_ONLY) private String zone; - /** Creates an instance of ClusterZone class. */ - public ClusterZone() { + /** + * Creates an instance of ClusterZone class. + */ + private ClusterZone() { } /** * Get the hosts property: List of hosts belonging to the availability zone in a cluster. - * + * * @return the hosts value. */ public List hosts() { @@ -38,7 +42,7 @@ public List hosts() { /** * Get the zone property: Availability zone identifier. - * + * * @return the zone value. */ public String zone() { @@ -47,7 +51,7 @@ public String zone() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java index eb2a3d1a71b2a..ee23460ef2110 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java @@ -1,24 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; import java.util.List; -/** An immutable client-side representation of ClusterZoneList. */ +/** + * An immutable client-side representation of ClusterZoneList. + */ public interface ClusterZoneList { /** * Gets the zones property: Zone and associated hosts info. - * + * * @return the zones value. */ List zones(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner object. - * + * * @return the inner object. */ ClusterZoneListInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Clusters.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Clusters.java index d6132d16b850e..43a52f8d6d0a9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Clusters.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Clusters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,67 +8,69 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Clusters. */ +/** + * Resource collection API of Clusters. + */ public interface Clusters { /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud. + * @return a Cluster. */ Cluster get(String resourceGroupName, String privateCloudName, String clusterName); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -76,11 +78,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String clusterName); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -90,25 +92,25 @@ Response getWithResponse( /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all zones and associated hosts for a cluster along with {@link Response}. */ - Response listZonesWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + Response listZonesWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, Context context); /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -117,31 +119,31 @@ Response listZonesWithResponse( ClusterZoneList listZones(String resourceGroupName, String privateCloudName, String clusterName); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ Cluster getById(String id); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -150,8 +152,8 @@ Response listZonesWithResponse( void deleteById(String id); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -162,7 +164,7 @@ Response listZonesWithResponse( /** * Begins definition for a new Cluster resource. - * + * * @param name resource name. * @return the first stage of the new Cluster definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java new file mode 100644 index 0000000000000..71943a806dd68 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ClustersUpdateHeaders model. + */ +@Immutable +public final class ClustersUpdateHeaders { + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of ClustersUpdateHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public ClustersUpdateHeaders(HttpHeaders rawHeaders) { + String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); + if (retryAfter != null) { + this.retryAfter = Integer.parseInt(retryAfter); + } + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateResponse.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateResponse.java new file mode 100644 index 0000000000000..359210ef2a639 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateResponse.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.avs.fluent.models.ClusterInner; + +/** + * Contains all response data for the update operation. + */ +public final class ClustersUpdateResponse extends ResponseBase { + /** + * Creates an instance of ClustersUpdateResponse. + * + * @param request the request which resulted in this ClustersUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ClustersUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, ClusterInner value, + ClustersUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ + @Override + public ClusterInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CommonClusterProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CommonClusterProperties.java deleted file mode 100644 index 4b007a2eb5639..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CommonClusterProperties.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The common properties of a cluster. */ -@Fluent -public class CommonClusterProperties { - /* - * The cluster size - */ - @JsonProperty(value = "clusterSize") - private Integer clusterSize; - - /* - * The state of the cluster provisioning - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ClusterProvisioningState provisioningState; - - /* - * The identity - */ - @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) - private Integer clusterId; - - /* - * The hosts - */ - @JsonProperty(value = "hosts") - private List hosts; - - /** Creates an instance of CommonClusterProperties class. */ - public CommonClusterProperties() { - } - - /** - * Get the clusterSize property: The cluster size. - * - * @return the clusterSize value. - */ - public Integer clusterSize() { - return this.clusterSize; - } - - /** - * Set the clusterSize property: The cluster size. - * - * @param clusterSize the clusterSize value to set. - * @return the CommonClusterProperties object itself. - */ - public CommonClusterProperties withClusterSize(Integer clusterSize) { - this.clusterSize = clusterSize; - return this; - } - - /** - * Get the provisioningState property: The state of the cluster provisioning. - * - * @return the provisioningState value. - */ - public ClusterProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the clusterId property: The identity. - * - * @return the clusterId value. - */ - public Integer clusterId() { - return this.clusterId; - } - - /** - * Get the hosts property: The hosts. - * - * @return the hosts value. - */ - public List hosts() { - return this.hosts; - } - - /** - * Set the hosts property: The hosts. - * - * @param hosts the hosts value to set. - * @return the CommonClusterProperties object itself. - */ - public CommonClusterProperties withHosts(List hosts) { - this.hosts = hosts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastore.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastore.java index 413275082b8a3..1c81e4a61a83f 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 @@ -1,96 +1,121 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.DatastoreInner; -/** An immutable client-side representation of Datastore. */ +/** + * An immutable client-side representation of Datastore. + */ public interface Datastore { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provisioningState property: The state of the datastore provisioning. - * + * * @return the provisioningState value. */ DatastoreProvisioningState provisioningState(); /** * Gets the netAppVolume property: An Azure NetApp Files volume. - * + * * @return the netAppVolume value. */ NetAppVolume netAppVolume(); /** * Gets the diskPoolVolume property: An iSCSI volume. - * + * * @return the diskPoolVolume value. */ DiskPoolVolume diskPoolVolume(); + /** + * Gets the elasticSanVolume property: An Elastic SAN volume. + * + * @return the elasticSanVolume value. + */ + ElasticSanVolume elasticSanVolume(); + /** * Gets the status property: The operational status of the datastore. - * + * * @return the status value. */ DatastoreStatus status(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.DatastoreInner object. - * + * * @return the inner object. */ DatastoreInner innerModel(); - /** The entirety of the Datastore definition. */ + /** + * The entirety of the Datastore definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Datastore definition stages. */ + /** + * The Datastore definition stages. + */ interface DefinitionStages { - /** The first stage of the Datastore definition. */ + /** + * The first stage of the Datastore definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Datastore definition allowing to specify parent resource. */ + /** + * The stage of the Datastore definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName, clusterName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @return the next definition stage. */ WithCreate withExistingCluster(String resourceGroupName, String privateCloudName, String clusterName); @@ -100,106 +125,146 @@ interface WithParentResource { * The stage of the Datastore definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithNetAppVolume, DefinitionStages.WithDiskPoolVolume { + interface WithCreate extends DefinitionStages.WithNetAppVolume, DefinitionStages.WithDiskPoolVolume, + DefinitionStages.WithElasticSanVolume { /** * Executes the create request. - * + * * @return the created resource. */ Datastore create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Datastore create(Context context); } - /** The stage of the Datastore definition allowing to specify netAppVolume. */ + /** + * The stage of the Datastore definition allowing to specify netAppVolume. + */ interface WithNetAppVolume { /** * Specifies the netAppVolume property: An Azure NetApp Files volume. - * + * * @param netAppVolume An Azure NetApp Files volume. * @return the next definition stage. */ WithCreate withNetAppVolume(NetAppVolume netAppVolume); } - /** The stage of the Datastore definition allowing to specify diskPoolVolume. */ + /** + * The stage of the Datastore definition allowing to specify diskPoolVolume. + */ interface WithDiskPoolVolume { /** * Specifies the diskPoolVolume property: An iSCSI volume. - * + * * @param diskPoolVolume An iSCSI volume. * @return the next definition stage. */ WithCreate withDiskPoolVolume(DiskPoolVolume diskPoolVolume); } + + /** + * The stage of the Datastore definition allowing to specify elasticSanVolume. + */ + interface WithElasticSanVolume { + /** + * Specifies the elasticSanVolume property: An Elastic SAN volume. + * + * @param elasticSanVolume An Elastic SAN volume. + * @return the next definition stage. + */ + WithCreate withElasticSanVolume(ElasticSanVolume elasticSanVolume); + } } /** * Begins update for the Datastore resource. - * + * * @return the stage of resource update. */ Datastore.Update update(); - /** The template for Datastore update. */ - interface Update extends UpdateStages.WithNetAppVolume, UpdateStages.WithDiskPoolVolume { + /** + * The template for Datastore update. + */ + interface Update + extends UpdateStages.WithNetAppVolume, UpdateStages.WithDiskPoolVolume, UpdateStages.WithElasticSanVolume { /** * Executes the update request. - * + * * @return the updated resource. */ Datastore apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Datastore apply(Context context); } - /** The Datastore update stages. */ + /** + * The Datastore update stages. + */ interface UpdateStages { - /** The stage of the Datastore update allowing to specify netAppVolume. */ + /** + * The stage of the Datastore update allowing to specify netAppVolume. + */ interface WithNetAppVolume { /** * Specifies the netAppVolume property: An Azure NetApp Files volume. - * + * * @param netAppVolume An Azure NetApp Files volume. * @return the next definition stage. */ Update withNetAppVolume(NetAppVolume netAppVolume); } - /** The stage of the Datastore update allowing to specify diskPoolVolume. */ + /** + * The stage of the Datastore update allowing to specify diskPoolVolume. + */ interface WithDiskPoolVolume { /** * Specifies the diskPoolVolume property: An iSCSI volume. - * + * * @param diskPoolVolume An iSCSI volume. * @return the next definition stage. */ Update withDiskPoolVolume(DiskPoolVolume diskPoolVolume); } + + /** + * The stage of the Datastore update allowing to specify elasticSanVolume. + */ + interface WithElasticSanVolume { + /** + * Specifies the elasticSanVolume property: An Elastic SAN volume. + * + * @param elasticSanVolume An Elastic SAN volume. + * @return the next definition stage. + */ + Update withElasticSanVolume(ElasticSanVolume elasticSanVolume); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Datastore refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreList.java deleted file mode 100644 index fc4350052c9b3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of datastores. */ -@Immutable -public final class DatastoreList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of DatastoreList class. */ - public DatastoreList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java index a935a7c377899..c7e9aa7b45af5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,35 +8,53 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the datastore provisioning. */ +/** + * datastore provisioning state. + */ public final class DatastoreProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for DatastoreProvisioningState. */ + /** + * Static value Succeeded for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for DatastoreProvisioningState. */ + /** + * Static value Failed for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelled for DatastoreProvisioningState. */ + /** + * Static value Canceled for DatastoreProvisioningState. + */ + public static final DatastoreProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Cancelled for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Pending for DatastoreProvisioningState. */ + /** + * Static value Pending for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState PENDING = fromString("Pending"); - /** Static value Creating for DatastoreProvisioningState. */ + /** + * Static value Creating for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState CREATING = fromString("Creating"); - /** Static value Updating for DatastoreProvisioningState. */ + /** + * Static value Updating for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState UPDATING = fromString("Updating"); - /** Static value Deleting for DatastoreProvisioningState. */ + /** + * Static value Deleting for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState DELETING = fromString("Deleting"); - /** Static value Canceled for DatastoreProvisioningState. */ - public static final DatastoreProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of DatastoreProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +63,7 @@ public DatastoreProvisioningState() { /** * Creates or finds a DatastoreProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatastoreProvisioningState. */ @@ -56,7 +74,7 @@ public static DatastoreProvisioningState fromString(String name) { /** * Gets known DatastoreProvisioningState values. - * + * * @return known DatastoreProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java index 86c524b6673d7..dac8a488be951 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The operational status of the datastore. */ +/** + * datastore status. + */ public final class DatastoreStatus extends ExpandableStringEnum { - /** Static value Unknown for DatastoreStatus. */ + /** + * Static value Unknown for DatastoreStatus. + */ public static final DatastoreStatus UNKNOWN = fromString("Unknown"); - /** Static value Accessible for DatastoreStatus. */ + /** + * Static value Accessible for DatastoreStatus. + */ public static final DatastoreStatus ACCESSIBLE = fromString("Accessible"); - /** Static value Inaccessible for DatastoreStatus. */ + /** + * Static value Inaccessible for DatastoreStatus. + */ public static final DatastoreStatus INACCESSIBLE = fromString("Inaccessible"); - /** Static value Attached for DatastoreStatus. */ + /** + * Static value Attached for DatastoreStatus. + */ public static final DatastoreStatus ATTACHED = fromString("Attached"); - /** Static value Detached for DatastoreStatus. */ + /** + * Static value Detached for DatastoreStatus. + */ public static final DatastoreStatus DETACHED = fromString("Detached"); - /** Static value LostCommunication for DatastoreStatus. */ + /** + * Static value LostCommunication for DatastoreStatus. + */ public static final DatastoreStatus LOST_COMMUNICATION = fromString("LostCommunication"); - /** Static value DeadOrError for DatastoreStatus. */ + /** + * Static value DeadOrError for DatastoreStatus. + */ public static final DatastoreStatus DEAD_OR_ERROR = fromString("DeadOrError"); /** * Creates a new instance of DatastoreStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public DatastoreStatus() { /** * Creates or finds a DatastoreStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatastoreStatus. */ @@ -53,7 +69,7 @@ public static DatastoreStatus fromString(String name) { /** * Gets known DatastoreStatus values. - * + * * @return known DatastoreStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastores.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastores.java index d17b66844d949..cf0dad4336d89 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastores.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastores.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,73 +8,75 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Datastores. */ +/** + * Resource collection API of Datastores. + */ public interface Datastores { /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a datastore in a private cloud cluster along with {@link Response}. + * @return a Datastore along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a datastore in a private cloud cluster. + * @return a Datastore. */ Datastore get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -82,46 +84,46 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, + Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a datastore in a private cloud cluster along with {@link Response}. + * @return a Datastore along with {@link Response}. */ Datastore getById(String id); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a datastore in a private cloud cluster along with {@link Response}. + * @return a Datastore along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -130,8 +132,8 @@ void delete( void deleteById(String id); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,7 +144,7 @@ void delete( /** * Begins definition for a new Datastore resource. - * + * * @param name resource name. * @return the first stage of the new Datastore definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java index 6401c1ea5a32a..01669779e0bf9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of DHCP: SERVER or RELAY. */ +/** + * Type of DHCP: SERVER or RELAY. + */ public final class DhcpTypeEnum extends ExpandableStringEnum { - /** Static value SERVER for DhcpTypeEnum. */ + /** + * Static value SERVER for DhcpTypeEnum. + */ public static final DhcpTypeEnum SERVER = fromString("SERVER"); - /** Static value RELAY for DhcpTypeEnum. */ + /** + * Static value RELAY for DhcpTypeEnum. + */ public static final DhcpTypeEnum RELAY = fromString("RELAY"); /** * Creates a new instance of DhcpTypeEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public DhcpTypeEnum() { /** * Creates or finds a DhcpTypeEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding DhcpTypeEnum. */ @@ -38,7 +44,7 @@ public static DhcpTypeEnum fromString(String name) { /** * Gets known DhcpTypeEnum values. - * + * * @return known DhcpTypeEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java index dfdb8fc94aab5..a610724aa61ba 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** An iSCSI volume from Microsoft.StoragePool provider. */ +/** + * An iSCSI volume from Microsoft.StoragePool provider. + */ @Fluent public final class DiskPoolVolume { /* @@ -24,7 +26,8 @@ public final class DiskPoolVolume { private String lunName; /* - * Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN + * Mode that describes whether the LUN has to be mounted as a datastore or + * attached as a LUN */ @JsonProperty(value = "mountOption") private MountOptionEnum mountOption; @@ -35,13 +38,15 @@ public final class DiskPoolVolume { @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) private String path; - /** Creates an instance of DiskPoolVolume class. */ + /** + * Creates an instance of DiskPoolVolume class. + */ public DiskPoolVolume() { } /** * Get the targetId property: Azure resource ID of the iSCSI target. - * + * * @return the targetId value. */ public String targetId() { @@ -50,7 +55,7 @@ public String targetId() { /** * Set the targetId property: Azure resource ID of the iSCSI target. - * + * * @param targetId the targetId value to set. * @return the DiskPoolVolume object itself. */ @@ -61,7 +66,7 @@ public DiskPoolVolume withTargetId(String targetId) { /** * Get the lunName property: Name of the LUN to be used for datastore. - * + * * @return the lunName value. */ public String lunName() { @@ -70,7 +75,7 @@ public String lunName() { /** * Set the lunName property: Name of the LUN to be used for datastore. - * + * * @param lunName the lunName value to set. * @return the DiskPoolVolume object itself. */ @@ -80,9 +85,9 @@ public DiskPoolVolume withLunName(String lunName) { } /** - * Get the mountOption property: Mode that describes whether the LUN has to be mounted as a datastore or attached as - * a LUN. - * + * Get the mountOption property: Mode that describes whether the LUN has to be mounted as a datastore or + * attached as a LUN. + * * @return the mountOption value. */ public MountOptionEnum mountOption() { @@ -90,9 +95,9 @@ public MountOptionEnum mountOption() { } /** - * Set the mountOption property: Mode that describes whether the LUN has to be mounted as a datastore or attached as - * a LUN. - * + * Set the mountOption property: Mode that describes whether the LUN has to be mounted as a datastore or + * attached as a LUN. + * * @param mountOption the mountOption value to set. * @return the DiskPoolVolume object itself. */ @@ -103,7 +108,7 @@ public DiskPoolVolume withMountOption(MountOptionEnum mountOption) { /** * Get the path property: Device path. - * + * * @return the path value. */ public String path() { @@ -112,19 +117,17 @@ public String path() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (targetId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property targetId in model DiskPoolVolume")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property targetId in model DiskPoolVolume")); } if (lunName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property lunName in model DiskPoolVolume")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property lunName in model DiskPoolVolume")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java index bf521fde586df..0149e9a6215ef 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** DNS Service log level. */ +/** + * DNS service log level. + */ public final class DnsServiceLogLevelEnum extends ExpandableStringEnum { - /** Static value DEBUG for DnsServiceLogLevelEnum. */ + /** + * Static value DEBUG for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum DEBUG = fromString("DEBUG"); - /** Static value INFO for DnsServiceLogLevelEnum. */ + /** + * Static value INFO for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum INFO = fromString("INFO"); - /** Static value WARNING for DnsServiceLogLevelEnum. */ + /** + * Static value WARNING for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum WARNING = fromString("WARNING"); - /** Static value ERROR for DnsServiceLogLevelEnum. */ + /** + * Static value ERROR for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum ERROR = fromString("ERROR"); - /** Static value FATAL for DnsServiceLogLevelEnum. */ + /** + * Static value FATAL for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum FATAL = fromString("FATAL"); /** * Creates a new instance of DnsServiceLogLevelEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public DnsServiceLogLevelEnum() { /** * Creates or finds a DnsServiceLogLevelEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding DnsServiceLogLevelEnum. */ @@ -47,7 +59,7 @@ public static DnsServiceLogLevelEnum fromString(String name) { /** * Gets known DnsServiceLogLevelEnum values. - * + * * @return known DnsServiceLogLevelEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java index f1fd54ee59842..3c4515e7963cc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** DNS Service status. */ +/** + * DNS service status. + */ public final class DnsServiceStatusEnum extends ExpandableStringEnum { - /** Static value SUCCESS for DnsServiceStatusEnum. */ + /** + * Static value SUCCESS for DnsServiceStatusEnum. + */ public static final DnsServiceStatusEnum SUCCESS = fromString("SUCCESS"); - /** Static value FAILURE for DnsServiceStatusEnum. */ + /** + * Static value FAILURE for DnsServiceStatusEnum. + */ public static final DnsServiceStatusEnum FAILURE = fromString("FAILURE"); /** * Creates a new instance of DnsServiceStatusEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public DnsServiceStatusEnum() { /** * Creates or finds a DnsServiceStatusEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding DnsServiceStatusEnum. */ @@ -38,7 +44,7 @@ public static DnsServiceStatusEnum fromString(String name) { /** * Gets known DnsServiceStatusEnum values. - * + * * @return known DnsServiceStatusEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java new file mode 100644 index 0000000000000..244416261c6df --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The type of DNS zone. + */ +public final class DnsZoneType extends ExpandableStringEnum { + /** + * Static value Public for DnsZoneType. + */ + public static final DnsZoneType PUBLIC = fromString("Public"); + + /** + * Static value Private for DnsZoneType. + */ + public static final DnsZoneType PRIVATE = fromString("Private"); + + /** + * Creates a new instance of DnsZoneType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DnsZoneType() { + } + + /** + * Creates or finds a DnsZoneType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DnsZoneType. + */ + @JsonCreator + public static DnsZoneType fromString(String name) { + return fromString(name, DnsZoneType.class); + } + + /** + * Gets known DnsZoneType values. + * + * @return known DnsZoneType values. + */ + public static Collection values() { + return values(DnsZoneType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java new file mode 100644 index 0000000000000..5918b457024ec --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An Elastic SAN volume from Microsoft.ElasticSan provider. + */ +@Fluent +public final class ElasticSanVolume { + /* + * Azure resource ID of the Elastic SAN Volume + */ + @JsonProperty(value = "targetId", required = true) + private String targetId; + + /** + * Creates an instance of ElasticSanVolume class. + */ + public ElasticSanVolume() { + } + + /** + * Get the targetId property: Azure resource ID of the Elastic SAN Volume. + * + * @return the targetId value. + */ + public String targetId() { + return this.targetId; + } + + /** + * Set the targetId property: Azure resource ID of the Elastic SAN Volume. + * + * @param targetId the targetId value to set. + * @return the ElasticSanVolume object itself. + */ + public ElasticSanVolume withTargetId(String targetId) { + this.targetId = targetId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property targetId in model ElasticSanVolume")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSanVolume.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java index 96c7d0e8c1e5b..cbf60213ebd09 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of customer managed encryption key. */ +/** + * The properties of customer managed encryption key. + */ @Fluent public final class Encryption { /* @@ -22,13 +24,15 @@ public final class Encryption { @JsonProperty(value = "keyVaultProperties") private EncryptionKeyVaultProperties keyVaultProperties; - /** Creates an instance of Encryption class. */ + /** + * Creates an instance of Encryption class. + */ public Encryption() { } /** * Get the status property: Status of customer managed encryption key. - * + * * @return the status value. */ public EncryptionState status() { @@ -37,7 +41,7 @@ public EncryptionState status() { /** * Set the status property: Status of customer managed encryption key. - * + * * @param status the status value to set. * @return the Encryption object itself. */ @@ -48,7 +52,7 @@ public Encryption withStatus(EncryptionState status) { /** * Get the keyVaultProperties property: The key vault where the encryption key is stored. - * + * * @return the keyVaultProperties value. */ public EncryptionKeyVaultProperties keyVaultProperties() { @@ -57,7 +61,7 @@ public EncryptionKeyVaultProperties keyVaultProperties() { /** * Set the keyVaultProperties property: The key vault where the encryption key is stored. - * + * * @param keyVaultProperties the keyVaultProperties value to set. * @return the Encryption object itself. */ @@ -68,7 +72,7 @@ public Encryption withKeyVaultProperties(EncryptionKeyVaultProperties keyVaultPr /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java index 3d7f2f7174298..6bd6583f53a2d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of key provided. */ +/** + * Whether the the encryption key is connected or access denied. + */ public final class EncryptionKeyStatus extends ExpandableStringEnum { - /** Static value Connected for EncryptionKeyStatus. */ + /** + * Static value Connected for EncryptionKeyStatus. + */ public static final EncryptionKeyStatus CONNECTED = fromString("Connected"); - /** Static value AccessDenied for EncryptionKeyStatus. */ + /** + * Static value AccessDenied for EncryptionKeyStatus. + */ public static final EncryptionKeyStatus ACCESS_DENIED = fromString("AccessDenied"); /** * Creates a new instance of EncryptionKeyStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EncryptionKeyStatus() { /** * Creates or finds a EncryptionKeyStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding EncryptionKeyStatus. */ @@ -38,7 +44,7 @@ public static EncryptionKeyStatus fromString(String name) { /** * Gets known EncryptionKeyStatus values. - * + * * @return known EncryptionKeyStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java index bf93ec50e582e..5a62734620fa5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** An Encryption Key. */ +/** + * An Encryption Key. + */ @Fluent public final class EncryptionKeyVaultProperties { /* @@ -46,13 +48,15 @@ public final class EncryptionKeyVaultProperties { @JsonProperty(value = "versionType", access = JsonProperty.Access.WRITE_ONLY) private EncryptionVersionType versionType; - /** Creates an instance of EncryptionKeyVaultProperties class. */ + /** + * Creates an instance of EncryptionKeyVaultProperties class. + */ public EncryptionKeyVaultProperties() { } /** * Get the keyName property: The name of the key. - * + * * @return the keyName value. */ public String keyName() { @@ -61,7 +65,7 @@ public String keyName() { /** * Set the keyName property: The name of the key. - * + * * @param keyName the keyName value to set. * @return the EncryptionKeyVaultProperties object itself. */ @@ -72,7 +76,7 @@ public EncryptionKeyVaultProperties withKeyName(String keyName) { /** * Get the keyVersion property: The version of the key. - * + * * @return the keyVersion value. */ public String keyVersion() { @@ -81,7 +85,7 @@ public String keyVersion() { /** * Set the keyVersion property: The version of the key. - * + * * @param keyVersion the keyVersion value to set. * @return the EncryptionKeyVaultProperties object itself. */ @@ -92,7 +96,7 @@ public EncryptionKeyVaultProperties withKeyVersion(String keyVersion) { /** * Get the autoDetectedKeyVersion property: The auto-detected version of the key if versionType is auto-detected. - * + * * @return the autoDetectedKeyVersion value. */ public String autoDetectedKeyVersion() { @@ -101,7 +105,7 @@ public String autoDetectedKeyVersion() { /** * Get the keyVaultUrl property: The URL of the vault. - * + * * @return the keyVaultUrl value. */ public String keyVaultUrl() { @@ -110,7 +114,7 @@ public String keyVaultUrl() { /** * Set the keyVaultUrl property: The URL of the vault. - * + * * @param keyVaultUrl the keyVaultUrl value to set. * @return the EncryptionKeyVaultProperties object itself. */ @@ -121,7 +125,7 @@ public EncryptionKeyVaultProperties withKeyVaultUrl(String keyVaultUrl) { /** * Get the keyState property: The state of key provided. - * + * * @return the keyState value. */ public EncryptionKeyStatus keyState() { @@ -130,7 +134,7 @@ public EncryptionKeyStatus keyState() { /** * Get the versionType property: Property of the key if user provided or auto detected. - * + * * @return the versionType value. */ public EncryptionVersionType versionType() { @@ -139,7 +143,7 @@ public EncryptionVersionType versionType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java index e28216412a77a..90d39b0b04f53 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Status of customer managed encryption key. */ +/** + * Whether encryption is enabled or disabled. + */ public final class EncryptionState extends ExpandableStringEnum { - /** Static value Enabled for EncryptionState. */ + /** + * Static value Enabled for EncryptionState. + */ public static final EncryptionState ENABLED = fromString("Enabled"); - /** Static value Disabled for EncryptionState. */ + /** + * Static value Disabled for EncryptionState. + */ public static final EncryptionState DISABLED = fromString("Disabled"); /** * Creates a new instance of EncryptionState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EncryptionState() { /** * Creates or finds a EncryptionState from its string representation. - * + * * @param name a name to look for. * @return the corresponding EncryptionState. */ @@ -38,7 +44,7 @@ public static EncryptionState fromString(String name) { /** * Gets known EncryptionState values. - * + * * @return known EncryptionState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java index d7db1505fd842..56e45c51104e5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Property of the key if user provided or auto detected. */ +/** + * Whether the encryption version is fixed or auto-detected. + */ public final class EncryptionVersionType extends ExpandableStringEnum { - /** Static value Fixed for EncryptionVersionType. */ + /** + * Static value Fixed for EncryptionVersionType. + */ public static final EncryptionVersionType FIXED = fromString("Fixed"); - /** Static value AutoDetected for EncryptionVersionType. */ + /** + * Static value AutoDetected for EncryptionVersionType. + */ public static final EncryptionVersionType AUTO_DETECTED = fromString("AutoDetected"); /** * Creates a new instance of EncryptionVersionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EncryptionVersionType() { /** * Creates or finds a EncryptionVersionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding EncryptionVersionType. */ @@ -38,7 +44,7 @@ public static EncryptionVersionType fromString(String name) { /** * Gets known EncryptionVersionType values. - * + * * @return known EncryptionVersionType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java index b17d025d67235..e9e31207fe3a5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java @@ -1,40 +1,62 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Endpoint addresses. */ +/** + * Endpoint addresses. + */ @Immutable public final class Endpoints { /* - * Endpoint for the NSX-T Data Center manager + * Endpoint FQDN for the NSX-T Data Center manager */ @JsonProperty(value = "nsxtManager", access = JsonProperty.Access.WRITE_ONLY) private String nsxtManager; /* - * Endpoint for Virtual Center Server Appliance + * Endpoint FQDN for Virtual Center Server Appliance */ @JsonProperty(value = "vcsa", access = JsonProperty.Access.WRITE_ONLY) private String vcsa; /* - * Endpoint for the HCX Cloud Manager + * Endpoint FQDN for the HCX Cloud Manager */ @JsonProperty(value = "hcxCloudManager", access = JsonProperty.Access.WRITE_ONLY) private String hcxCloudManager; - /** Creates an instance of Endpoints class. */ - public Endpoints() { + /* + * Endpoint IP for the NSX-T Data Center manager + */ + @JsonProperty(value = "nsxtManagerIp", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtManagerIp; + + /* + * Endpoint IP for Virtual Center Server Appliance + */ + @JsonProperty(value = "vcenterIp", access = JsonProperty.Access.WRITE_ONLY) + private String vcenterIp; + + /* + * Endpoint IP for the HCX Cloud Manager + */ + @JsonProperty(value = "hcxCloudManagerIp", access = JsonProperty.Access.WRITE_ONLY) + private String hcxCloudManagerIp; + + /** + * Creates an instance of Endpoints class. + */ + private Endpoints() { } /** - * Get the nsxtManager property: Endpoint for the NSX-T Data Center manager. - * + * Get the nsxtManager property: Endpoint FQDN for the NSX-T Data Center manager. + * * @return the nsxtManager value. */ public String nsxtManager() { @@ -42,8 +64,8 @@ public String nsxtManager() { } /** - * Get the vcsa property: Endpoint for Virtual Center Server Appliance. - * + * Get the vcsa property: Endpoint FQDN for Virtual Center Server Appliance. + * * @return the vcsa value. */ public String vcsa() { @@ -51,17 +73,44 @@ public String vcsa() { } /** - * Get the hcxCloudManager property: Endpoint for the HCX Cloud Manager. - * + * Get the hcxCloudManager property: Endpoint FQDN for the HCX Cloud Manager. + * * @return the hcxCloudManager value. */ public String hcxCloudManager() { return this.hcxCloudManager; } + /** + * Get the nsxtManagerIp property: Endpoint IP for the NSX-T Data Center manager. + * + * @return the nsxtManagerIp value. + */ + public String nsxtManagerIp() { + return this.nsxtManagerIp; + } + + /** + * Get the vcenterIp property: Endpoint IP for Virtual Center Server Appliance. + * + * @return the vcenterIp value. + */ + public String vcenterIp() { + return this.vcenterIp; + } + + /** + * Get the hcxCloudManagerIp property: Endpoint IP for the HCX Cloud Manager. + * + * @return the hcxCloudManagerIp value. + */ + public String hcxCloudManagerIp() { + return this.hcxCloudManagerIp; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java index 19644c48840cf..c0e51c1020487 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java @@ -1,95 +1,113 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.ExpressRouteAuthorizationInner; -/** An immutable client-side representation of ExpressRouteAuthorization. */ +/** + * An immutable client-side representation of ExpressRouteAuthorization. + */ public interface ExpressRouteAuthorization { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ ExpressRouteAuthorizationProvisioningState provisioningState(); /** * Gets the expressRouteAuthorizationId property: The ID of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationId value. */ String expressRouteAuthorizationId(); /** * Gets the expressRouteAuthorizationKey property: The key of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationKey value. */ String expressRouteAuthorizationKey(); /** * Gets the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @return the expressRouteId value. */ String expressRouteId(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner object. - * + * * @return the inner object. */ ExpressRouteAuthorizationInner innerModel(); - /** The entirety of the ExpressRouteAuthorization definition. */ + /** + * The entirety of the ExpressRouteAuthorization definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ExpressRouteAuthorization definition stages. */ + /** + * The ExpressRouteAuthorization definition stages. + */ interface DefinitionStages { - /** The first stage of the ExpressRouteAuthorization definition. */ + /** + * The first stage of the ExpressRouteAuthorization definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ExpressRouteAuthorization definition allowing to specify parent resource. */ + /** + * The stage of the ExpressRouteAuthorization definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -99,63 +117,92 @@ interface WithParentResource { * The stage of the ExpressRouteAuthorization definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate { + interface WithCreate extends DefinitionStages.WithExpressRouteId { /** * Executes the create request. - * + * * @return the created resource. */ ExpressRouteAuthorization create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ExpressRouteAuthorization create(Context context); } + + /** + * The stage of the ExpressRouteAuthorization definition allowing to specify expressRouteId. + */ + interface WithExpressRouteId { + /** + * Specifies the expressRouteId property: The ID of the ExpressRoute Circuit. + * + * @param expressRouteId The ID of the ExpressRoute Circuit. + * @return the next definition stage. + */ + WithCreate withExpressRouteId(String expressRouteId); + } } /** * Begins update for the ExpressRouteAuthorization resource. - * + * * @return the stage of resource update. */ ExpressRouteAuthorization.Update update(); - /** The template for ExpressRouteAuthorization update. */ - interface Update { + /** + * The template for ExpressRouteAuthorization update. + */ + interface Update extends UpdateStages.WithExpressRouteId { /** * Executes the update request. - * + * * @return the updated resource. */ ExpressRouteAuthorization apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ExpressRouteAuthorization apply(Context context); } - /** The ExpressRouteAuthorization update stages. */ + /** + * The ExpressRouteAuthorization update stages. + */ interface UpdateStages { + /** + * The stage of the ExpressRouteAuthorization update allowing to specify expressRouteId. + */ + interface WithExpressRouteId { + /** + * Specifies the expressRouteId property: The ID of the ExpressRoute Circuit. + * + * @param expressRouteId The ID of the ExpressRoute Circuit. + * @return the next definition stage. + */ + Update withExpressRouteId(String expressRouteId); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ExpressRouteAuthorization refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationList.java deleted file mode 100644 index 21a78e738c8ca..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of ExpressRoute Circuit Authorizations. */ -@Immutable -public final class ExpressRouteAuthorizationList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ExpressRouteAuthorizationList class. */ - public ExpressRouteAuthorizationList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java index ad07c10cb86ca..30a3bc34cc576 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,24 +8,34 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the ExpressRoute Circuit Authorization provisioning. */ +/** + * Express Route Circuit Authorization provisioning state. + */ public final class ExpressRouteAuthorizationProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for ExpressRouteAuthorizationProvisioningState. */ + /** + * Static value Succeeded for ExpressRouteAuthorizationProvisioningState. + */ public static final ExpressRouteAuthorizationProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ExpressRouteAuthorizationProvisioningState. */ + /** + * Static value Failed for ExpressRouteAuthorizationProvisioningState. + */ public static final ExpressRouteAuthorizationProvisioningState FAILED = fromString("Failed"); - /** Static value Updating for ExpressRouteAuthorizationProvisioningState. */ - public static final ExpressRouteAuthorizationProvisioningState UPDATING = fromString("Updating"); - - /** Static value Canceled for ExpressRouteAuthorizationProvisioningState. */ + /** + * Static value Canceled for ExpressRouteAuthorizationProvisioningState. + */ public static final ExpressRouteAuthorizationProvisioningState CANCELED = fromString("Canceled"); + /** + * Static value Updating for ExpressRouteAuthorizationProvisioningState. + */ + public static final ExpressRouteAuthorizationProvisioningState UPDATING = fromString("Updating"); + /** * Creates a new instance of ExpressRouteAuthorizationProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public ExpressRouteAuthorizationProvisioningState() { /** * Creates or finds a ExpressRouteAuthorizationProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ExpressRouteAuthorizationProvisioningState. */ @@ -45,7 +55,7 @@ public static ExpressRouteAuthorizationProvisioningState fromString(String name) /** * Gets known ExpressRouteAuthorizationProvisioningState values. - * + * * @return known ExpressRouteAuthorizationProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java index 1f7000469cbbf..455f3b860742b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java @@ -1,38 +1,48 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.GlobalReachConnectionInner; -/** An immutable client-side representation of GlobalReachConnection. */ +/** + * An immutable client-side representation of GlobalReachConnection. + */ public interface GlobalReachConnection { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ GlobalReachConnectionProvisioningState provisioningState(); @@ -40,7 +50,7 @@ public interface GlobalReachConnection { /** * Gets the addressPrefix property: The network used for global reach carved out from the original network block * provided for the private cloud. - * + * * @return the addressPrefix value. */ String addressPrefix(); @@ -48,22 +58,23 @@ public interface GlobalReachConnection { /** * Gets the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @return the authorizationKey value. */ String authorizationKey(); /** * Gets the circuitConnectionStatus property: The connection status of the global reach connection. - * + * * @return the circuitConnectionStatus value. */ GlobalReachConnectionStatus circuitConnectionStatus(); /** * Gets the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global - * reach connection. - * + * reach + * connection. + * * @return the peerExpressRouteCircuit value. */ String peerExpressRouteCircuit(); @@ -71,43 +82,51 @@ public interface GlobalReachConnection { /** * Gets the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @return the expressRouteId value. */ String expressRouteId(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner object. - * + * * @return the inner object. */ GlobalReachConnectionInner innerModel(); - /** The entirety of the GlobalReachConnection definition. */ + /** + * The entirety of the GlobalReachConnection definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The GlobalReachConnection definition stages. */ + /** + * The GlobalReachConnection definition stages. + */ interface DefinitionStages { - /** The first stage of the GlobalReachConnection definition. */ + /** + * The first stage of the GlobalReachConnection definition. + */ interface Blank extends WithParentResource { } - /** The stage of the GlobalReachConnection definition allowing to specify parent resource. */ + /** + * The stage of the GlobalReachConnection definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -117,60 +136,67 @@ interface WithParentResource { * The stage of the GlobalReachConnection definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithAuthorizationKey, - DefinitionStages.WithPeerExpressRouteCircuit, - DefinitionStages.WithExpressRouteId { + interface WithCreate extends DefinitionStages.WithAuthorizationKey, + DefinitionStages.WithPeerExpressRouteCircuit, DefinitionStages.WithExpressRouteId { /** * Executes the create request. - * + * * @return the created resource. */ GlobalReachConnection create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ GlobalReachConnection create(Context context); } - /** The stage of the GlobalReachConnection definition allowing to specify authorizationKey. */ + /** + * The stage of the GlobalReachConnection definition allowing to specify authorizationKey. + */ interface WithAuthorizationKey { /** * Specifies the authorizationKey property: Authorization key from the peer express route used for the - * global reach connection. - * + * global reach + * connection. + * * @param authorizationKey Authorization key from the peer express route used for the global reach - * connection. + * connection. * @return the next definition stage. */ WithCreate withAuthorizationKey(String authorizationKey); } - /** The stage of the GlobalReachConnection definition allowing to specify peerExpressRouteCircuit. */ + /** + * The stage of the GlobalReachConnection definition allowing to specify peerExpressRouteCircuit. + */ interface WithPeerExpressRouteCircuit { /** * Specifies the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in - * the global reach connection. - * + * the global reach + * connection. + * * @param peerExpressRouteCircuit Identifier of the ExpressRoute Circuit to peer with in the global reach - * connection. + * connection. * @return the next definition stage. */ WithCreate withPeerExpressRouteCircuit(String peerExpressRouteCircuit); } - /** The stage of the GlobalReachConnection definition allowing to specify expressRouteId. */ + /** + * The stage of the GlobalReachConnection definition allowing to specify expressRouteId. + */ interface WithExpressRouteId { /** * Specifies the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is - * participating in the global reach connection. - * + * participating in the + * global reach connection. + * * @param expressRouteId The ID of the Private Cloud's ExpressRoute Circuit that is participating in the - * global reach connection. + * global reach connection. * @return the next definition stage. */ WithCreate withExpressRouteId(String expressRouteId); @@ -179,68 +205,79 @@ interface WithExpressRouteId { /** * Begins update for the GlobalReachConnection resource. - * + * * @return the stage of resource update. */ GlobalReachConnection.Update update(); - /** The template for GlobalReachConnection update. */ - interface Update - extends UpdateStages.WithAuthorizationKey, - UpdateStages.WithPeerExpressRouteCircuit, - UpdateStages.WithExpressRouteId { + /** + * The template for GlobalReachConnection update. + */ + interface Update extends UpdateStages.WithAuthorizationKey, UpdateStages.WithPeerExpressRouteCircuit, + UpdateStages.WithExpressRouteId { /** * Executes the update request. - * + * * @return the updated resource. */ GlobalReachConnection apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ GlobalReachConnection apply(Context context); } - /** The GlobalReachConnection update stages. */ + /** + * The GlobalReachConnection update stages. + */ interface UpdateStages { - /** The stage of the GlobalReachConnection update allowing to specify authorizationKey. */ + /** + * The stage of the GlobalReachConnection update allowing to specify authorizationKey. + */ interface WithAuthorizationKey { /** * Specifies the authorizationKey property: Authorization key from the peer express route used for the - * global reach connection. - * + * global reach + * connection. + * * @param authorizationKey Authorization key from the peer express route used for the global reach - * connection. + * connection. * @return the next definition stage. */ Update withAuthorizationKey(String authorizationKey); } - /** The stage of the GlobalReachConnection update allowing to specify peerExpressRouteCircuit. */ + /** + * The stage of the GlobalReachConnection update allowing to specify peerExpressRouteCircuit. + */ interface WithPeerExpressRouteCircuit { /** * Specifies the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in - * the global reach connection. - * + * the global reach + * connection. + * * @param peerExpressRouteCircuit Identifier of the ExpressRoute Circuit to peer with in the global reach - * connection. + * connection. * @return the next definition stage. */ Update withPeerExpressRouteCircuit(String peerExpressRouteCircuit); } - /** The stage of the GlobalReachConnection update allowing to specify expressRouteId. */ + /** + * The stage of the GlobalReachConnection update allowing to specify expressRouteId. + */ interface WithExpressRouteId { /** * Specifies the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is - * participating in the global reach connection. - * + * participating in the + * global reach connection. + * * @param expressRouteId The ID of the Private Cloud's ExpressRoute Circuit that is participating in the - * global reach connection. + * global reach connection. * @return the next definition stage. */ Update withExpressRouteId(String expressRouteId); @@ -249,14 +286,14 @@ interface WithExpressRouteId { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ GlobalReachConnection refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionList.java deleted file mode 100644 index e73d1e22c2fbe..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of global reach connections. */ -@Immutable -public final class GlobalReachConnectionList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of GlobalReachConnectionList class. */ - public GlobalReachConnectionList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java index 74a4289c7bffd..18c2464b67690 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,24 +8,34 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the ExpressRoute Circuit Authorization provisioning. */ +/** + * Global Reach Connection provisioning state. + */ public final class GlobalReachConnectionProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for GlobalReachConnectionProvisioningState. */ + /** + * Static value Succeeded for GlobalReachConnectionProvisioningState. + */ public static final GlobalReachConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for GlobalReachConnectionProvisioningState. */ + /** + * Static value Failed for GlobalReachConnectionProvisioningState. + */ public static final GlobalReachConnectionProvisioningState FAILED = fromString("Failed"); - /** Static value Updating for GlobalReachConnectionProvisioningState. */ - public static final GlobalReachConnectionProvisioningState UPDATING = fromString("Updating"); - - /** Static value Canceled for GlobalReachConnectionProvisioningState. */ + /** + * Static value Canceled for GlobalReachConnectionProvisioningState. + */ public static final GlobalReachConnectionProvisioningState CANCELED = fromString("Canceled"); + /** + * Static value Updating for GlobalReachConnectionProvisioningState. + */ + public static final GlobalReachConnectionProvisioningState UPDATING = fromString("Updating"); + /** * Creates a new instance of GlobalReachConnectionProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public GlobalReachConnectionProvisioningState() { /** * Creates or finds a GlobalReachConnectionProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding GlobalReachConnectionProvisioningState. */ @@ -45,7 +55,7 @@ public static GlobalReachConnectionProvisioningState fromString(String name) { /** * Gets known GlobalReachConnectionProvisioningState values. - * + * * @return known GlobalReachConnectionProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java index f48e652849f8b..6a419aec25cbf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The connection status of the global reach connection. */ +/** + * Global Reach Connection status. + */ public final class GlobalReachConnectionStatus extends ExpandableStringEnum { - /** Static value Connected for GlobalReachConnectionStatus. */ + /** + * Static value Connected for GlobalReachConnectionStatus. + */ public static final GlobalReachConnectionStatus CONNECTED = fromString("Connected"); - /** Static value Connecting for GlobalReachConnectionStatus. */ + /** + * Static value Connecting for GlobalReachConnectionStatus. + */ public static final GlobalReachConnectionStatus CONNECTING = fromString("Connecting"); - /** Static value Disconnected for GlobalReachConnectionStatus. */ + /** + * Static value Disconnected for GlobalReachConnectionStatus. + */ public static final GlobalReachConnectionStatus DISCONNECTED = fromString("Disconnected"); /** * Creates a new instance of GlobalReachConnectionStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public GlobalReachConnectionStatus() { /** * Creates or finds a GlobalReachConnectionStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding GlobalReachConnectionStatus. */ @@ -41,7 +49,7 @@ public static GlobalReachConnectionStatus fromString(String name) { /** * Gets known GlobalReachConnectionStatus values. - * + * * @return known GlobalReachConnectionStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java index 0836f07b11a1e..239a15c3bfd2d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,67 +8,69 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of GlobalReachConnections. */ +/** + * Resource collection API of GlobalReachConnections. + */ public interface GlobalReachConnections { /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a global reach connection by name in a private cloud along with {@link Response}. + * @return a GlobalReachConnection along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a global reach connection by name in a private cloud. + * @return a GlobalReachConnection. */ GlobalReachConnection get(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -76,11 +78,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -89,31 +91,31 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a global reach connection by name in a private cloud along with {@link Response}. + * @return a GlobalReachConnection along with {@link Response}. */ GlobalReachConnection getById(String id); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a global reach connection by name in a private cloud along with {@link Response}. + * @return a GlobalReachConnection along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,8 +124,8 @@ Response getWithResponse( void deleteById(String id); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getWithResponse( /** * Begins definition for a new GlobalReachConnection resource. - * + * * @param name resource name. * @return the first stage of the new GlobalReachConnection definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java index 5d11e3a57d543..dd8e9f165fe39 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java @@ -1,81 +1,106 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.HcxEnterpriseSiteInner; -/** An immutable client-side representation of HcxEnterpriseSite. */ +/** + * An immutable client-side representation of HcxEnterpriseSite. + */ public interface HcxEnterpriseSite { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + HcxEnterpriseSiteProvisioningState provisioningState(); + /** * Gets the activationKey property: The activation key. - * + * * @return the activationKey value. */ String activationKey(); /** * Gets the status property: The status of the HCX Enterprise Site. - * + * * @return the status value. */ HcxEnterpriseSiteStatus status(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner object. - * + * * @return the inner object. */ HcxEnterpriseSiteInner innerModel(); - /** The entirety of the HcxEnterpriseSite definition. */ + /** + * The entirety of the HcxEnterpriseSite definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The HcxEnterpriseSite definition stages. */ + /** + * The HcxEnterpriseSite definition stages. + */ interface DefinitionStages { - /** The first stage of the HcxEnterpriseSite definition. */ + /** + * The first stage of the HcxEnterpriseSite definition. + */ interface Blank extends WithParentResource { } - /** The stage of the HcxEnterpriseSite definition allowing to specify parent resource. */ + /** + * The stage of the HcxEnterpriseSite definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -88,14 +113,14 @@ interface WithParentResource { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ HcxEnterpriseSite create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ @@ -105,43 +130,47 @@ interface WithCreate { /** * Begins update for the HcxEnterpriseSite resource. - * + * * @return the stage of resource update. */ HcxEnterpriseSite.Update update(); - /** The template for HcxEnterpriseSite update. */ + /** + * The template for HcxEnterpriseSite update. + */ interface Update { /** * Executes the update request. - * + * * @return the updated resource. */ HcxEnterpriseSite apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ HcxEnterpriseSite apply(Context context); } - /** The HcxEnterpriseSite update stages. */ + /** + * The HcxEnterpriseSite update stages. + */ interface UpdateStages { } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ HcxEnterpriseSite refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteList.java deleted file mode 100644 index 46623c57f8baf..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of HCX Enterprise Sites. */ -@Immutable -public final class HcxEnterpriseSiteList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of HcxEnterpriseSiteList class. */ - public HcxEnterpriseSiteList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java new file mode 100644 index 0000000000000..578e9984329b2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * HCX Enterprise Site provisioning state. + */ +public final class HcxEnterpriseSiteProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for HcxEnterpriseSiteProvisioningState. + */ + public static final HcxEnterpriseSiteProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for HcxEnterpriseSiteProvisioningState. + */ + public static final HcxEnterpriseSiteProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for HcxEnterpriseSiteProvisioningState. + */ + public static final HcxEnterpriseSiteProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of HcxEnterpriseSiteProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HcxEnterpriseSiteProvisioningState() { + } + + /** + * Creates or finds a HcxEnterpriseSiteProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding HcxEnterpriseSiteProvisioningState. + */ + @JsonCreator + public static HcxEnterpriseSiteProvisioningState fromString(String name) { + return fromString(name, HcxEnterpriseSiteProvisioningState.class); + } + + /** + * Gets known HcxEnterpriseSiteProvisioningState values. + * + * @return known HcxEnterpriseSiteProvisioningState values. + */ + public static Collection values() { + return values(HcxEnterpriseSiteProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java index 26ac0f3183235..137f1d0d6547c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The status of the HCX Enterprise Site. */ +/** + * HCX Enterprise Site status. + */ public final class HcxEnterpriseSiteStatus extends ExpandableStringEnum { - /** Static value Available for HcxEnterpriseSiteStatus. */ + /** + * Static value Available for HcxEnterpriseSiteStatus. + */ public static final HcxEnterpriseSiteStatus AVAILABLE = fromString("Available"); - /** Static value Consumed for HcxEnterpriseSiteStatus. */ + /** + * Static value Consumed for HcxEnterpriseSiteStatus. + */ public static final HcxEnterpriseSiteStatus CONSUMED = fromString("Consumed"); - /** Static value Deactivated for HcxEnterpriseSiteStatus. */ + /** + * Static value Deactivated for HcxEnterpriseSiteStatus. + */ public static final HcxEnterpriseSiteStatus DEACTIVATED = fromString("Deactivated"); - /** Static value Deleted for HcxEnterpriseSiteStatus. */ + /** + * Static value Deleted for HcxEnterpriseSiteStatus. + */ public static final HcxEnterpriseSiteStatus DELETED = fromString("Deleted"); /** * Creates a new instance of HcxEnterpriseSiteStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public HcxEnterpriseSiteStatus() { /** * Creates or finds a HcxEnterpriseSiteStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding HcxEnterpriseSiteStatus. */ @@ -44,7 +54,7 @@ public static HcxEnterpriseSiteStatus fromString(String name) { /** * Gets known HcxEnterpriseSiteStatus values. - * + * * @return known HcxEnterpriseSiteStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java index 8490270770bab..6ef2570b0d280 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,82 +8,84 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of HcxEnterpriseSites. */ +/** + * Resource collection API of HcxEnterpriseSites. + */ public interface HcxEnterpriseSites { /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud. + * @return a HcxEnterpriseSite. */ HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + Response deleteWithResponse(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, + Context context); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -91,31 +93,31 @@ Response deleteWithResponse( void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ HcxEnterpriseSite getById(String id); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,8 +126,8 @@ Response deleteWithResponse( void deleteById(String id); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,7 +139,7 @@ Response deleteWithResponse( /** * Begins definition for a new HcxEnterpriseSite resource. - * + * * @param name resource name. * @return the first stage of the new HcxEnterpriseSite definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java index 9c44383590655..80eb5d1c973ca 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 @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** vCenter Single Sign On Identity Source. */ +/** + * vCenter Single Sign On Identity Source. + */ @Fluent public final class IdentitySource { /* @@ -59,24 +61,28 @@ public final class IdentitySource { private SslEnum ssl; /* - * The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group + * The ID of an Active Directory user with a minimum of read-only access to Base + * DN for users and group */ @JsonProperty(value = "username") private String username; /* - * The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. + * The password of the Active Directory user with a minimum of read-only access to + * Base DN for users and groups. */ @JsonProperty(value = "password") private String password; - /** Creates an instance of IdentitySource class. */ + /** + * Creates an instance of IdentitySource class. + */ public IdentitySource() { } /** * Get the name property: The name of the identity source. - * + * * @return the name value. */ public String name() { @@ -85,7 +91,7 @@ public String name() { /** * Set the name property: The name of the identity source. - * + * * @param name the name value to set. * @return the IdentitySource object itself. */ @@ -96,7 +102,7 @@ public IdentitySource withName(String name) { /** * Get the alias property: The domain's NetBIOS name. - * + * * @return the alias value. */ public String alias() { @@ -105,7 +111,7 @@ public String alias() { /** * Set the alias property: The domain's NetBIOS name. - * + * * @param alias the alias value to set. * @return the IdentitySource object itself. */ @@ -116,7 +122,7 @@ public IdentitySource withAlias(String alias) { /** * Get the domain property: The domain's dns name. - * + * * @return the domain value. */ public String domain() { @@ -125,7 +131,7 @@ public String domain() { /** * Set the domain property: The domain's dns name. - * + * * @param domain the domain value to set. * @return the IdentitySource object itself. */ @@ -136,7 +142,7 @@ public IdentitySource withDomain(String domain) { /** * Get the baseUserDN property: The base distinguished name for users. - * + * * @return the baseUserDN value. */ public String baseUserDN() { @@ -145,7 +151,7 @@ public String baseUserDN() { /** * Set the baseUserDN property: The base distinguished name for users. - * + * * @param baseUserDN the baseUserDN value to set. * @return the IdentitySource object itself. */ @@ -156,7 +162,7 @@ public IdentitySource withBaseUserDN(String baseUserDN) { /** * Get the baseGroupDN property: The base distinguished name for groups. - * + * * @return the baseGroupDN value. */ public String baseGroupDN() { @@ -165,7 +171,7 @@ public String baseGroupDN() { /** * Set the baseGroupDN property: The base distinguished name for groups. - * + * * @param baseGroupDN the baseGroupDN value to set. * @return the IdentitySource object itself. */ @@ -176,7 +182,7 @@ public IdentitySource withBaseGroupDN(String baseGroupDN) { /** * Get the primaryServer property: Primary server URL. - * + * * @return the primaryServer value. */ public String primaryServer() { @@ -185,7 +191,7 @@ public String primaryServer() { /** * Set the primaryServer property: Primary server URL. - * + * * @param primaryServer the primaryServer value to set. * @return the IdentitySource object itself. */ @@ -196,7 +202,7 @@ public IdentitySource withPrimaryServer(String primaryServer) { /** * Get the secondaryServer property: Secondary server URL. - * + * * @return the secondaryServer value. */ public String secondaryServer() { @@ -205,7 +211,7 @@ public String secondaryServer() { /** * Set the secondaryServer property: Secondary server URL. - * + * * @param secondaryServer the secondaryServer value to set. * @return the IdentitySource object itself. */ @@ -216,7 +222,7 @@ public IdentitySource withSecondaryServer(String secondaryServer) { /** * Get the ssl property: Protect LDAP communication using SSL certificate (LDAPS). - * + * * @return the ssl value. */ public SslEnum ssl() { @@ -225,7 +231,7 @@ public SslEnum ssl() { /** * Set the ssl property: Protect LDAP communication using SSL certificate (LDAPS). - * + * * @param ssl the ssl value to set. * @return the IdentitySource object itself. */ @@ -235,9 +241,9 @@ public IdentitySource withSsl(SslEnum ssl) { } /** - * Get the username property: The ID of an Active Directory user with a minimum of read-only access to Base DN for - * users and group. - * + * Get the username property: The ID of an Active Directory user with a minimum of read-only access to Base + * DN for users and group. + * * @return the username value. */ public String username() { @@ -245,9 +251,9 @@ public String username() { } /** - * Set the username property: The ID of an Active Directory user with a minimum of read-only access to Base DN for - * users and group. - * + * Set the username property: The ID of an Active Directory user with a minimum of read-only access to Base + * DN for users and group. + * * @param username the username value to set. * @return the IdentitySource object itself. */ @@ -257,9 +263,9 @@ public IdentitySource withUsername(String username) { } /** - * Get the password property: The password of the Active Directory user with a minimum of read-only access to Base - * DN for users and groups. - * + * Get the password property: The password of the Active Directory user with a minimum of read-only access to + * Base DN for users and groups. + * * @return the password value. */ public String password() { @@ -267,9 +273,9 @@ public String password() { } /** - * Set the password property: The password of the Active Directory user with a minimum of read-only access to Base - * DN for users and groups. - * + * Set the password property: The password of the Active Directory user with a minimum of read-only access to + * Base DN for users and groups. + * * @param password the password value to set. * @return the IdentitySource object itself. */ @@ -280,7 +286,7 @@ public IdentitySource withPassword(String password) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java index 972bc30b9bf2d..df34a0cd73a72 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Connectivity to internet is enabled or disabled. */ +/** + * Whether internet is enabled or disabled. + */ public final class InternetEnum extends ExpandableStringEnum { - /** Static value Enabled for InternetEnum. */ + /** + * Static value Enabled for InternetEnum. + */ public static final InternetEnum ENABLED = fromString("Enabled"); - /** Static value Disabled for InternetEnum. */ + /** + * Static value Disabled for InternetEnum. + */ public static final InternetEnum DISABLED = fromString("Disabled"); /** * Creates a new instance of InternetEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public InternetEnum() { /** * Creates or finds a InternetEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding InternetEnum. */ @@ -38,7 +44,7 @@ public static InternetEnum fromString(String name) { /** * Gets known InternetEnum values. - * + * * @return known InternetEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java new file mode 100644 index 0000000000000..5f993e09c4f10 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * An immutable client-side representation of IscsiPath. + */ +public interface IscsiPath { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The state of the iSCSI path provisioning. + * + * @return the provisioningState value. + */ + IscsiPathProvisioningState provisioningState(); + + /** + * Gets the networkBlock property: CIDR Block for iSCSI path. + * + * @return the networkBlock value. + */ + String networkBlock(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.IscsiPathInner object. + * + * @return the inner object. + */ + IscsiPathInner innerModel(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java new file mode 100644 index 0000000000000..c755bc5e5bc94 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * private cloud provisioning state. + */ +public final class IscsiPathProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Pending for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState PENDING = fromString("Pending"); + + /** + * Static value Building for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState BUILDING = fromString("Building"); + + /** + * Static value Deleting for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Updating for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of IscsiPathProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IscsiPathProvisioningState() { + } + + /** + * Creates or finds a IscsiPathProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding IscsiPathProvisioningState. + */ + @JsonCreator + public static IscsiPathProvisioningState fromString(String name) { + return fromString(name, IscsiPathProvisioningState.class); + } + + /** + * Gets known IscsiPathProvisioningState values. + * + * @return known IscsiPathProvisioningState values. + */ + public static Collection values() { + return values(IscsiPathProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java new file mode 100644 index 0000000000000..f73c348581079 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * Resource collection API of IscsiPaths. + */ +public interface IscsiPaths { + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName); + + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a IscsiPath along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a IscsiPath. + */ + IscsiPath get(String resourceGroupName, String privateCloudName); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an iSCSI path resource. + */ + IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an iSCSI path resource. + */ + IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String privateCloudName); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String privateCloudName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Locations.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Locations.java index 14b6b212efde1..c3a58e0e221d5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Locations.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Locations.java @@ -1,19 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Locations. */ +/** + * Resource collection API of Locations. + */ public interface Locations { /** * Return trial status for subscription by region. - * - * @param location Azure region. - * @param sku The sku to check for trial availability. + * + * @param location A location in a subscription. + * @param sku Optionally, check for a specific SKU. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -24,8 +26,8 @@ public interface Locations { /** * Return trial status for subscription by region. - * - * @param location Azure region. + * + * @param location A location in a subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -35,8 +37,8 @@ public interface Locations { /** * Return quota for subscription by region. - * - * @param location Azure region. + * + * @param location A location in a subscription. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -47,8 +49,8 @@ public interface Locations { /** * Return quota for subscription by region. - * - * @param location Azure region. + * + * @param location A location in a subscription. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LogSpecification.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LogSpecification.java deleted file mode 100644 index 4740950751a3f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LogSpecification.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Specifications of the Log for Azure Monitoring. */ -@Fluent -public final class LogSpecification { - /* - * Name of the log - */ - @JsonProperty(value = "name") - private String name; - - /* - * Localized friendly display name of the log - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Blob duration of the log - */ - @JsonProperty(value = "blobDuration") - private String blobDuration; - - /** Creates an instance of LogSpecification class. */ - public LogSpecification() { - } - - /** - * Get the name property: Name of the log. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the log. - * - * @param name the name value to set. - * @return the LogSpecification object itself. - */ - public LogSpecification withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: Localized friendly display name of the log. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Localized friendly display name of the log. - * - * @param displayName the displayName value to set. - * @return the LogSpecification object itself. - */ - public LogSpecification withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the blobDuration property: Blob duration of the log. - * - * @return the blobDuration value. - */ - public String blobDuration() { - return this.blobDuration; - } - - /** - * Set the blobDuration property: Blob duration of the log. - * - * @param blobDuration the blobDuration value to set. - * @return the LogSpecification object itself. - */ - public LogSpecification withBlobDuration(String blobDuration) { - this.blobDuration = blobDuration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java index 7f1e6434c851f..34b4587325b66 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java @@ -1,40 +1,137 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a management cluster. */ +/** + * The properties of a management cluster. + */ @Fluent -public final class ManagementCluster extends CommonClusterProperties { - /** Creates an instance of ManagementCluster class. */ +public final class ManagementCluster { + /* + * The cluster size + */ + @JsonProperty(value = "clusterSize") + private Integer clusterSize; + + /* + * The state of the cluster provisioning + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClusterProvisioningState provisioningState; + + /* + * The identity + */ + @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) + private Integer clusterId; + + /* + * The hosts + */ + @JsonProperty(value = "hosts") + private List hosts; + + /* + * Name of the vsan datastore associated with the cluster + */ + @JsonProperty(value = "vsanDatastoreName") + private String vsanDatastoreName; + + /** + * Creates an instance of ManagementCluster class. + */ public ManagementCluster() { } - /** {@inheritDoc} */ - @Override + /** + * Get the clusterSize property: The cluster size. + * + * @return the clusterSize value. + */ + public Integer clusterSize() { + return this.clusterSize; + } + + /** + * Set the clusterSize property: The cluster size. + * + * @param clusterSize the clusterSize value to set. + * @return the ManagementCluster object itself. + */ public ManagementCluster withClusterSize(Integer clusterSize) { - super.withClusterSize(clusterSize); + this.clusterSize = clusterSize; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the provisioningState property: The state of the cluster provisioning. + * + * @return the provisioningState value. + */ + public ClusterProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the clusterId property: The identity. + * + * @return the clusterId value. + */ + public Integer clusterId() { + return this.clusterId; + } + + /** + * Get the hosts property: The hosts. + * + * @return the hosts value. + */ + public List hosts() { + return this.hosts; + } + + /** + * Set the hosts property: The hosts. + * + * @param hosts the hosts value to set. + * @return the ManagementCluster object itself. + */ public ManagementCluster withHosts(List hosts) { - super.withHosts(hosts); + this.hosts = hosts; + return this; + } + + /** + * Get the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @return the vsanDatastoreName value. + */ + public String vsanDatastoreName() { + return this.vsanDatastoreName; + } + + /** + * Set the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @param vsanDatastoreName the vsanDatastoreName value to set. + * @return the ManagementCluster object itself. + */ + public ManagementCluster withVsanDatastoreName(String vsanDatastoreName) { + this.vsanDatastoreName = vsanDatastoreName; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricDimension.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricDimension.java deleted file mode 100644 index c46df6fe18e8a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricDimension.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Specifications of the Dimension of metrics. */ -@Fluent -public final class MetricDimension { - /* - * Name of the dimension - */ - @JsonProperty(value = "name") - private String name; - - /* - * Localized friendly display name of the dimension - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Name of the dimension as it appears in MDM - */ - @JsonProperty(value = "internalName") - private String internalName; - - /* - * A boolean flag indicating whether this dimension should be included for the shoebox export scenario - */ - @JsonProperty(value = "toBeExportedForShoebox") - private Boolean toBeExportedForShoebox; - - /** Creates an instance of MetricDimension class. */ - public MetricDimension() { - } - - /** - * Get the name property: Name of the dimension. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the dimension. - * - * @param name the name value to set. - * @return the MetricDimension object itself. - */ - public MetricDimension withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: Localized friendly display name of the dimension. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Localized friendly display name of the dimension. - * - * @param displayName the displayName value to set. - * @return the MetricDimension object itself. - */ - public MetricDimension withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the internalName property: Name of the dimension as it appears in MDM. - * - * @return the internalName value. - */ - public String internalName() { - return this.internalName; - } - - /** - * Set the internalName property: Name of the dimension as it appears in MDM. - * - * @param internalName the internalName value to set. - * @return the MetricDimension object itself. - */ - public MetricDimension withInternalName(String internalName) { - this.internalName = internalName; - return this; - } - - /** - * Get the toBeExportedForShoebox property: A boolean flag indicating whether this dimension should be included for - * the shoebox export scenario. - * - * @return the toBeExportedForShoebox value. - */ - public Boolean toBeExportedForShoebox() { - return this.toBeExportedForShoebox; - } - - /** - * Set the toBeExportedForShoebox property: A boolean flag indicating whether this dimension should be included for - * the shoebox export scenario. - * - * @param toBeExportedForShoebox the toBeExportedForShoebox value to set. - * @return the MetricDimension object itself. - */ - public MetricDimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox) { - this.toBeExportedForShoebox = toBeExportedForShoebox; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricSpecification.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricSpecification.java deleted file mode 100644 index dc41d71395563..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricSpecification.java +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Specifications of the Metrics for Azure Monitoring. */ -@Fluent -public final class MetricSpecification { - /* - * Name of the metric - */ - @JsonProperty(value = "name") - private String name; - - /* - * Localized friendly display name of the metric - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Localized friendly description of the metric - */ - @JsonProperty(value = "displayDescription") - private String displayDescription; - - /* - * Unit that makes sense for the metric - */ - @JsonProperty(value = "unit") - private String unit; - - /* - * Name of the metric category that the metric belongs to. A metric can only belong to a single category. - */ - @JsonProperty(value = "category") - private String category; - - /* - * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. - */ - @JsonProperty(value = "aggregationType") - private String aggregationType; - - /* - * Supported aggregation types - */ - @JsonProperty(value = "supportedAggregationTypes") - private List supportedAggregationTypes; - - /* - * Supported time grain types - */ - @JsonProperty(value = "supportedTimeGrainTypes") - private List supportedTimeGrainTypes; - - /* - * Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. - */ - @JsonProperty(value = "fillGapWithZero") - private Boolean fillGapWithZero; - - /* - * Dimensions of the metric - */ - @JsonProperty(value = "dimensions") - private List dimensions; - - /* - * Whether or not the service is using regional MDM accounts. - */ - @JsonProperty(value = "enableRegionalMdmAccount") - private String enableRegionalMdmAccount; - - /* - * The name of the MDM account. - */ - @JsonProperty(value = "sourceMdmAccount") - private String sourceMdmAccount; - - /* - * The name of the MDM namespace. - */ - @JsonProperty(value = "sourceMdmNamespace") - private String sourceMdmNamespace; - - /** Creates an instance of MetricSpecification class. */ - public MetricSpecification() { - } - - /** - * Get the name property: Name of the metric. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the metric. - * - * @param name the name value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: Localized friendly display name of the metric. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Localized friendly display name of the metric. - * - * @param displayName the displayName value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the displayDescription property: Localized friendly description of the metric. - * - * @return the displayDescription value. - */ - public String displayDescription() { - return this.displayDescription; - } - - /** - * Set the displayDescription property: Localized friendly description of the metric. - * - * @param displayDescription the displayDescription value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDisplayDescription(String displayDescription) { - this.displayDescription = displayDescription; - return this; - } - - /** - * Get the unit property: Unit that makes sense for the metric. - * - * @return the unit value. - */ - public String unit() { - return this.unit; - } - - /** - * Set the unit property: Unit that makes sense for the metric. - * - * @param unit the unit value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withUnit(String unit) { - this.unit = unit; - return this; - } - - /** - * Get the category property: Name of the metric category that the metric belongs to. A metric can only belong to a - * single category. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Name of the metric category that the metric belongs to. A metric can only belong to a - * single category. - * - * @param category the category value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the aggregationType property: Only provide one value for this field. Valid values: Average, Minimum, Maximum, - * Total, Count. - * - * @return the aggregationType value. - */ - public String aggregationType() { - return this.aggregationType; - } - - /** - * Set the aggregationType property: Only provide one value for this field. Valid values: Average, Minimum, Maximum, - * Total, Count. - * - * @param aggregationType the aggregationType value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withAggregationType(String aggregationType) { - this.aggregationType = aggregationType; - return this; - } - - /** - * Get the supportedAggregationTypes property: Supported aggregation types. - * - * @return the supportedAggregationTypes value. - */ - public List supportedAggregationTypes() { - return this.supportedAggregationTypes; - } - - /** - * Set the supportedAggregationTypes property: Supported aggregation types. - * - * @param supportedAggregationTypes the supportedAggregationTypes value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) { - this.supportedAggregationTypes = supportedAggregationTypes; - return this; - } - - /** - * Get the supportedTimeGrainTypes property: Supported time grain types. - * - * @return the supportedTimeGrainTypes value. - */ - public List supportedTimeGrainTypes() { - return this.supportedTimeGrainTypes; - } - - /** - * Set the supportedTimeGrainTypes property: Supported time grain types. - * - * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { - this.supportedTimeGrainTypes = supportedTimeGrainTypes; - return this; - } - - /** - * Get the fillGapWithZero property: Optional. If set to true, then zero will be returned for time duration where no - * metric is emitted/published. - * - * @return the fillGapWithZero value. - */ - public Boolean fillGapWithZero() { - return this.fillGapWithZero; - } - - /** - * Set the fillGapWithZero property: Optional. If set to true, then zero will be returned for time duration where no - * metric is emitted/published. - * - * @param fillGapWithZero the fillGapWithZero value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { - this.fillGapWithZero = fillGapWithZero; - return this; - } - - /** - * Get the dimensions property: Dimensions of the metric. - * - * @return the dimensions value. - */ - public List dimensions() { - return this.dimensions; - } - - /** - * Set the dimensions property: Dimensions of the metric. - * - * @param dimensions the dimensions value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDimensions(List dimensions) { - this.dimensions = dimensions; - return this; - } - - /** - * Get the enableRegionalMdmAccount property: Whether or not the service is using regional MDM accounts. - * - * @return the enableRegionalMdmAccount value. - */ - public String enableRegionalMdmAccount() { - return this.enableRegionalMdmAccount; - } - - /** - * Set the enableRegionalMdmAccount property: Whether or not the service is using regional MDM accounts. - * - * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withEnableRegionalMdmAccount(String enableRegionalMdmAccount) { - this.enableRegionalMdmAccount = enableRegionalMdmAccount; - return this; - } - - /** - * Get the sourceMdmAccount property: The name of the MDM account. - * - * @return the sourceMdmAccount value. - */ - public String sourceMdmAccount() { - return this.sourceMdmAccount; - } - - /** - * Set the sourceMdmAccount property: The name of the MDM account. - * - * @param sourceMdmAccount the sourceMdmAccount value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { - this.sourceMdmAccount = sourceMdmAccount; - return this; - } - - /** - * Get the sourceMdmNamespace property: The name of the MDM namespace. - * - * @return the sourceMdmNamespace value. - */ - public String sourceMdmNamespace() { - return this.sourceMdmNamespace; - } - - /** - * Set the sourceMdmNamespace property: The name of the MDM namespace. - * - * @param sourceMdmNamespace the sourceMdmNamespace value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { - this.sourceMdmNamespace = sourceMdmNamespace; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dimensions() != null) { - dimensions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java index 4825595db6d10..89ab687292529 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN. */ +/** + * mount option. + */ public final class MountOptionEnum extends ExpandableStringEnum { - /** Static value MOUNT for MountOptionEnum. */ + /** + * Static value MOUNT for MountOptionEnum. + */ public static final MountOptionEnum MOUNT = fromString("MOUNT"); - /** Static value ATTACH for MountOptionEnum. */ + /** + * Static value ATTACH for MountOptionEnum. + */ public static final MountOptionEnum ATTACH = fromString("ATTACH"); /** * Creates a new instance of MountOptionEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public MountOptionEnum() { /** * Creates or finds a MountOptionEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding MountOptionEnum. */ @@ -38,7 +44,7 @@ public static MountOptionEnum fromString(String name) { /** * Gets known MountOptionEnum values. - * + * * @return known MountOptionEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java index a891e2bbb9bf6..51f489f0aacfa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** An Azure NetApp Files volume from Microsoft.NetApp provider. */ +/** + * An Azure NetApp Files volume from Microsoft.NetApp provider. + */ @Fluent public final class NetAppVolume { /* @@ -17,13 +19,15 @@ public final class NetAppVolume { @JsonProperty(value = "id", required = true) private String id; - /** Creates an instance of NetAppVolume class. */ + /** + * Creates an instance of NetAppVolume class. + */ public NetAppVolume() { } /** * Get the id property: Azure resource ID of the NetApp volume. - * + * * @return the id value. */ public String id() { @@ -32,7 +36,7 @@ public String id() { /** * Set the id property: Azure resource ID of the NetApp volume. - * + * * @param id the id value to set. * @return the NetAppVolume object itself. */ @@ -43,14 +47,13 @@ public NetAppVolume withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (id() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property id in model NetAppVolume")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model NetAppVolume")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java index 97ba0c7705324..9c1c3995db870 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -9,18 +9,22 @@ import java.util.Collection; /** - * Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to 1024. + * NSX public IP quota raised. */ public final class NsxPublicIpQuotaRaisedEnum extends ExpandableStringEnum { - /** Static value Enabled for NsxPublicIpQuotaRaisedEnum. */ + /** + * Static value Enabled for NsxPublicIpQuotaRaisedEnum. + */ public static final NsxPublicIpQuotaRaisedEnum ENABLED = fromString("Enabled"); - /** Static value Disabled for NsxPublicIpQuotaRaisedEnum. */ + /** + * Static value Disabled for NsxPublicIpQuotaRaisedEnum. + */ public static final NsxPublicIpQuotaRaisedEnum DISABLED = fromString("Disabled"); /** * Creates a new instance of NsxPublicIpQuotaRaisedEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -29,7 +33,7 @@ public NsxPublicIpQuotaRaisedEnum() { /** * Creates or finds a NsxPublicIpQuotaRaisedEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding NsxPublicIpQuotaRaisedEnum. */ @@ -40,7 +44,7 @@ public static NsxPublicIpQuotaRaisedEnum fromString(String name) { /** * Gets known NsxPublicIpQuotaRaisedEnum values. - * + * * @return known NsxPublicIpQuotaRaisedEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operation.java index 6afa83bc4ba5e..31958ed9fe51a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operation.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operation.java @@ -1,51 +1,57 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.resourcemanager.avs.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** - * Gets the name property: Name of the operation being performed on this object. - * + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * * @return the name value. */ String name(); /** - * Gets the display property: Contains the localized display information for this operation. - * - * @return the display value. + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for Azure Resource Manager/control-plane operations. + * + * @return the isDataAction value. */ - OperationDisplay display(); + Boolean isDataAction(); /** - * Gets the isDataAction property: Gets or sets a value indicating whether the operation is a data action or not. - * - * @return the isDataAction value. + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. */ - Boolean isDataAction(); + OperationDisplay display(); /** - * Gets the origin property: Origin of the operation. - * + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * * @return the origin value. */ - String origin(); + Origin origin(); /** - * Gets the properties property: Properties of the operation. - * - * @return the properties value. + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + * + * @return the actionType value. */ - OperationProperties properties(); + ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java index 816f07571bdbd..a4e2620537dcd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java @@ -1,46 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Contains the localized display information for this operation. */ +/** + * Localized display information for and operation. + */ @Immutable public final class OperationDisplay { /* - * Localized friendly form of the resource provider name + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or + * "Microsoft Compute". */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "provider") private String provider; /* - * Localized friendly form of the resource type related to this operation + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or + * "Job Schedule Collections". */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "resource") private String resource; /* - * Localized friendly name for the operation + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "operation") private String operation; /* - * Localized friendly description for the operation + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "description") private String description; - /** Creates an instance of OperationDisplay class. */ - public OperationDisplay() { + /** + * Creates an instance of OperationDisplay class. + */ + private OperationDisplay() { } /** - * Get the provider property: Localized friendly form of the resource provider name. - * + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * * @return the provider value. */ public String provider() { @@ -48,8 +56,9 @@ public String provider() { } /** - * Get the resource property: Localized friendly form of the resource type related to this operation. - * + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". + * * @return the resource value. */ public String resource() { @@ -57,8 +66,9 @@ public String resource() { } /** - * Get the operation property: Localized friendly name for the operation. - * + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + * * @return the operation value. */ public String operation() { @@ -66,8 +76,9 @@ public String operation() { } /** - * Get the description property: Localized friendly description for the operation. - * + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. + * * @return the description value. */ public String description() { @@ -76,7 +87,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationList.java deleted file mode 100644 index db2ba6e2ae71c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Pageable list of operations. */ -@Immutable -public final class OperationList { - /* - * List of operations - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of OperationList class. */ - public OperationList() { - } - - /** - * Get the value property: List of operations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationProperties.java deleted file mode 100644 index 004cddca52d74..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationProperties.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Extra Operation properties. */ -@Fluent -public final class OperationProperties { - /* - * Service specifications of the operation - */ - @JsonProperty(value = "serviceSpecification") - private ServiceSpecification serviceSpecification; - - /** Creates an instance of OperationProperties class. */ - public OperationProperties() { - } - - /** - * Get the serviceSpecification property: Service specifications of the operation. - * - * @return the serviceSpecification value. - */ - public ServiceSpecification serviceSpecification() { - return this.serviceSpecification; - } - - /** - * Set the serviceSpecification property: Service specifications of the operation. - * - * @param serviceSpecification the serviceSpecification value to set. - * @return the OperationProperties object itself. - */ - public OperationProperties withServiceSpecification(ServiceSpecification serviceSpecification) { - this.serviceSpecification = serviceSpecification; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceSpecification() != null) { - serviceSpecification().validate(); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operations.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operations.java index 4fbbe1e188a65..edb07cd84786a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operations.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operations.java @@ -1,31 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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 Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java index bed8128e0e575..ded9e05298b90 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Is this parameter required or optional. */ +/** + * Optional Param. + */ public final class OptionalParamEnum extends ExpandableStringEnum { - /** Static value Optional for OptionalParamEnum. */ + /** + * Static value Optional for OptionalParamEnum. + */ public static final OptionalParamEnum OPTIONAL = fromString("Optional"); - /** Static value Required for OptionalParamEnum. */ + /** + * Static value Required for OptionalParamEnum. + */ public static final OptionalParamEnum REQUIRED = fromString("Required"); /** * Creates a new instance of OptionalParamEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public OptionalParamEnum() { /** * Creates or finds a OptionalParamEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding OptionalParamEnum. */ @@ -38,7 +44,7 @@ public static OptionalParamEnum fromString(String name) { /** * Gets known OptionalParamEnum values. - * + * * @return known OptionalParamEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java new file mode 100644 index 0000000000000..3bfb29adc6a86 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** + * Static value user for Origin. + */ + public static final Origin USER = fromString("user"); + + /** + * Static value system for Origin. + */ + public static final Origin SYSTEM = fromString("system"); + + /** + * Static value user,system for Origin. + */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java index 1f69de84e47a2..dd9ba716c9020 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java @@ -1,19 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** a powershell credential object. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +/** + * a powershell credential object. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "type", + defaultImpl = PSCredentialExecutionParameter.class, + visible = true) @JsonTypeName("Credential") @Fluent public final class PSCredentialExecutionParameter extends ScriptExecutionParameter { + /* + * script execution parameter type + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private ScriptExecutionParameterType type = ScriptExecutionParameterType.CREDENTIAL; + /* * username for login */ @@ -26,13 +40,25 @@ public final class PSCredentialExecutionParameter extends ScriptExecutionParamet @JsonProperty(value = "password") private String password; - /** Creates an instance of PSCredentialExecutionParameter class. */ + /** + * Creates an instance of PSCredentialExecutionParameter class. + */ public PSCredentialExecutionParameter() { } + /** + * Get the type property: script execution parameter type. + * + * @return the type value. + */ + @Override + public ScriptExecutionParameterType type() { + return this.type; + } + /** * Get the username property: username for login. - * + * * @return the username value. */ public String username() { @@ -41,7 +67,7 @@ public String username() { /** * Set the username property: username for login. - * + * * @param username the username value to set. * @return the PSCredentialExecutionParameter object itself. */ @@ -52,7 +78,7 @@ public PSCredentialExecutionParameter withUsername(String username) { /** * Get the password property: password for login. - * + * * @return the password value. */ public String password() { @@ -61,7 +87,7 @@ public String password() { /** * Set the password property: password for login. - * + * * @param password the password value to set. * @return the PSCredentialExecutionParameter object itself. */ @@ -70,7 +96,9 @@ public PSCredentialExecutionParameter withPassword(String password) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PSCredentialExecutionParameter withName(String name) { super.withName(name); @@ -79,7 +107,7 @@ public PSCredentialExecutionParameter withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java index 72f2987469ded..e21ed3848ed00 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,78 +8,76 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PlacementPolicies. */ +/** + * Resource collection API of PlacementPolicies. + */ public interface PlacementPolicies { /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster. + * @return a PlacementPolicy. */ - PlacementPolicy get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); + PlacementPolicy get(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -87,50 +85,46 @@ PlacementPolicy get( void delete(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + void delete(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ PlacementPolicy getById(String id); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -139,8 +133,8 @@ void delete( void deleteById(String id); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,7 +145,7 @@ void delete( /** * Begins definition for a new PlacementPolicy resource. - * + * * @param name resource name. * @return the first stage of the new PlacementPolicy definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesList.java deleted file mode 100644 index 29ec0afcf22b3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents list of placement policies. */ -@Immutable -public final class PlacementPoliciesList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of PlacementPoliciesList class. */ - public PlacementPoliciesList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java new file mode 100644 index 0000000000000..8fc49a9279066 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The PlacementPoliciesUpdateHeaders model. + */ +@Immutable +public final class PlacementPoliciesUpdateHeaders { + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PlacementPoliciesUpdateHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PlacementPoliciesUpdateHeaders(HttpHeaders rawHeaders) { + String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); + if (retryAfter != null) { + this.retryAfter = Integer.parseInt(retryAfter); + } + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateResponse.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateResponse.java new file mode 100644 index 0000000000000..f3c6e6af2b38a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateResponse.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; + +/** + * Contains all response data for the update operation. + */ +public final class PlacementPoliciesUpdateResponse + extends ResponseBase { + /** + * Creates an instance of PlacementPoliciesUpdateResponse. + * + * @param request the request which resulted in this PlacementPoliciesUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PlacementPoliciesUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, + PlacementPolicyInner value, PlacementPoliciesUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ + @Override + public PlacementPolicyInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java index 877cdd290cdda..835f15a347548 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java @@ -1,76 +1,94 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.PlacementPolicyInner; import java.util.List; -/** An immutable client-side representation of PlacementPolicy. */ +/** + * An immutable client-side representation of PlacementPolicy. + */ public interface PlacementPolicy { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the properties property: placement policy properties. - * + * Gets the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ PlacementPolicyProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner object. - * + * * @return the inner object. */ PlacementPolicyInner innerModel(); - /** The entirety of the PlacementPolicy definition. */ + /** + * The entirety of the PlacementPolicy definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The PlacementPolicy definition stages. */ + /** + * The PlacementPolicy definition stages. + */ interface DefinitionStages { - /** The first stage of the PlacementPolicy definition. */ + /** + * The first stage of the PlacementPolicy definition. + */ interface Blank extends WithParentResource { } - /** The stage of the PlacementPolicy definition allowing to specify parent resource. */ + /** + * The stage of the PlacementPolicy definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName, clusterName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @return the next definition stage. */ WithCreate withExistingCluster(String resourceGroupName, String privateCloudName, String clusterName); @@ -83,26 +101,28 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ PlacementPolicy create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ PlacementPolicy create(Context context); } - /** The stage of the PlacementPolicy definition allowing to specify properties. */ + /** + * The stage of the PlacementPolicy definition allowing to specify properties. + */ interface WithProperties { /** - * Specifies the properties property: placement policy properties. - * - * @param properties placement policy properties. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ WithCreate withProperties(PlacementPolicyProperties properties); @@ -111,85 +131,95 @@ interface WithProperties { /** * Begins update for the PlacementPolicy resource. - * + * * @return the stage of resource update. */ PlacementPolicy.Update update(); - /** The template for PlacementPolicy update. */ - interface Update - extends UpdateStages.WithState, - UpdateStages.WithVmMembers, - UpdateStages.WithHostMembers, - UpdateStages.WithAffinityStrength, - UpdateStages.WithAzureHybridBenefitType { + /** + * The template for PlacementPolicy update. + */ + interface Update extends UpdateStages.WithState, UpdateStages.WithVmMembers, UpdateStages.WithHostMembers, + UpdateStages.WithAffinityStrength, UpdateStages.WithAzureHybridBenefitType { /** * Executes the update request. - * + * * @return the updated resource. */ PlacementPolicy apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ PlacementPolicy apply(Context context); } - /** The PlacementPolicy update stages. */ + /** + * The PlacementPolicy update stages. + */ interface UpdateStages { - /** The stage of the PlacementPolicy update allowing to specify state. */ + /** + * The stage of the PlacementPolicy update allowing to specify state. + */ interface WithState { /** * Specifies the state property: Whether the placement policy is enabled or disabled. - * + * * @param state Whether the placement policy is enabled or disabled. * @return the next definition stage. */ Update withState(PlacementPolicyState state); } - /** The stage of the PlacementPolicy update allowing to specify vmMembers. */ + /** + * The stage of the PlacementPolicy update allowing to specify vmMembers. + */ interface WithVmMembers { /** * Specifies the vmMembers property: Virtual machine members list. - * + * * @param vmMembers Virtual machine members list. * @return the next definition stage. */ Update withVmMembers(List vmMembers); } - /** The stage of the PlacementPolicy update allowing to specify hostMembers. */ + /** + * The stage of the PlacementPolicy update allowing to specify hostMembers. + */ interface WithHostMembers { /** * Specifies the hostMembers property: Host members list. - * + * * @param hostMembers Host members list. * @return the next definition stage. */ Update withHostMembers(List hostMembers); } - /** The stage of the PlacementPolicy update allowing to specify affinityStrength. */ + /** + * The stage of the PlacementPolicy update allowing to specify affinityStrength. + */ interface WithAffinityStrength { /** * Specifies the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @param affinityStrength vm-host placement policy affinity strength (should/must). * @return the next definition stage. */ Update withAffinityStrength(AffinityStrength affinityStrength); } - /** The stage of the PlacementPolicy update allowing to specify azureHybridBenefitType. */ + /** + * The stage of the PlacementPolicy update allowing to specify azureHybridBenefitType. + */ interface WithAzureHybridBenefitType { /** * Specifies the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @param azureHybridBenefitType placement policy azure hybrid benefit opt-in type. * @return the next definition stage. */ @@ -199,14 +229,14 @@ interface WithAzureHybridBenefitType { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ PlacementPolicy refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java index 8ec701e857a4f..611556f5be65d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java @@ -1,28 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Abstract placement policy properties. */ +/** + * Abstract placement policy properties. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, property = "type", - defaultImpl = PlacementPolicyProperties.class) + defaultImpl = PlacementPolicyProperties.class, + visible = true) @JsonTypeName("PlacementPolicyProperties") @JsonSubTypes({ @JsonSubTypes.Type(name = "VmVm", value = VmPlacementPolicyProperties.class), - @JsonSubTypes.Type(name = "VmHost", value = VmHostPlacementPolicyProperties.class) -}) + @JsonSubTypes.Type(name = "VmHost", value = VmHostPlacementPolicyProperties.class) }) @Fluent public class PlacementPolicyProperties { + /* + * Placement Policy type + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private PlacementPolicyType type = PlacementPolicyType.fromString("PlacementPolicyProperties"); + /* * Whether the placement policy is enabled or disabled */ @@ -41,13 +50,24 @@ public class PlacementPolicyProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PlacementPolicyProvisioningState provisioningState; - /** Creates an instance of PlacementPolicyProperties class. */ + /** + * Creates an instance of PlacementPolicyProperties class. + */ public PlacementPolicyProperties() { } + /** + * Get the type property: Placement Policy type. + * + * @return the type value. + */ + public PlacementPolicyType type() { + return this.type; + } + /** * Get the state property: Whether the placement policy is enabled or disabled. - * + * * @return the state value. */ public PlacementPolicyState state() { @@ -56,7 +76,7 @@ public PlacementPolicyState state() { /** * Set the state property: Whether the placement policy is enabled or disabled. - * + * * @param state the state value to set. * @return the PlacementPolicyProperties object itself. */ @@ -67,7 +87,7 @@ public PlacementPolicyProperties withState(PlacementPolicyState state) { /** * Get the displayName property: Display name of the placement policy. - * + * * @return the displayName value. */ public String displayName() { @@ -76,7 +96,7 @@ public String displayName() { /** * Set the displayName property: Display name of the placement policy. - * + * * @param displayName the displayName value to set. * @return the PlacementPolicyProperties object itself. */ @@ -87,7 +107,7 @@ public PlacementPolicyProperties withDisplayName(String displayName) { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public PlacementPolicyProvisioningState provisioningState() { @@ -96,7 +116,7 @@ public PlacementPolicyProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java index a593addc8b656..2e80e3f0fd327 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Placement Policy provisioning state. + */ public final class PlacementPolicyProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for PlacementPolicyProvisioningState. */ + /** + * Static value Succeeded for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for PlacementPolicyProvisioningState. */ + /** + * Static value Failed for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState FAILED = fromString("Failed"); - /** Static value Building for PlacementPolicyProvisioningState. */ + /** + * Static value Canceled for PlacementPolicyProvisioningState. + */ + public static final PlacementPolicyProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for PlacementPolicyProvisioningState. */ + /** + * Static value Deleting for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for PlacementPolicyProvisioningState. */ + /** + * Static value Updating for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for PlacementPolicyProvisioningState. */ - public static final PlacementPolicyProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of PlacementPolicyProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public PlacementPolicyProvisioningState() { /** * Creates or finds a PlacementPolicyProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PlacementPolicyProvisioningState. */ @@ -50,7 +64,7 @@ public static PlacementPolicyProvisioningState fromString(String name) { /** * Gets known PlacementPolicyProvisioningState values. - * + * * @return known PlacementPolicyProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java index b0da8a18146f5..46550ba88cd77 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Whether the placement policy is enabled or disabled. */ +/** + * Placement Policy state. + */ public final class PlacementPolicyState extends ExpandableStringEnum { - /** Static value Enabled for PlacementPolicyState. */ + /** + * Static value Enabled for PlacementPolicyState. + */ public static final PlacementPolicyState ENABLED = fromString("Enabled"); - /** Static value Disabled for PlacementPolicyState. */ + /** + * Static value Disabled for PlacementPolicyState. + */ public static final PlacementPolicyState DISABLED = fromString("Disabled"); /** * Creates a new instance of PlacementPolicyState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PlacementPolicyState() { /** * Creates or finds a PlacementPolicyState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PlacementPolicyState. */ @@ -38,7 +44,7 @@ public static PlacementPolicyState fromString(String name) { /** * Gets known PlacementPolicyState values. - * + * * @return known PlacementPolicyState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java index dbff05b1f3db4..3824816537e2d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** placement policy type. */ +/** + * Placement Policy type. + */ public final class PlacementPolicyType extends ExpandableStringEnum { - /** Static value VmVm for PlacementPolicyType. */ + /** + * Static value VmVm for PlacementPolicyType. + */ public static final PlacementPolicyType VM_VM = fromString("VmVm"); - /** Static value VmHost for PlacementPolicyType. */ + /** + * Static value VmHost for PlacementPolicyType. + */ public static final PlacementPolicyType VM_HOST = fromString("VmHost"); /** * Creates a new instance of PlacementPolicyType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PlacementPolicyType() { /** * Creates or finds a PlacementPolicyType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PlacementPolicyType. */ @@ -38,7 +44,7 @@ public static PlacementPolicyType fromString(String name) { /** * Gets known PlacementPolicyType values. - * + * * @return known PlacementPolicyType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java index e02f60b975d48..95783b89ab2b4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** An update of a DRS placement policy resource. */ +/** + * An update of a DRS placement policy resource. + */ @Fluent public final class PlacementPolicyUpdate { /* @@ -18,13 +20,15 @@ public final class PlacementPolicyUpdate { @JsonProperty(value = "properties") private PlacementPolicyUpdateProperties innerProperties; - /** Creates an instance of PlacementPolicyUpdate class. */ + /** + * Creates an instance of PlacementPolicyUpdate class. + */ public PlacementPolicyUpdate() { } /** * Get the innerProperties property: The properties of a placement policy resource that may be updated. - * + * * @return the innerProperties value. */ private PlacementPolicyUpdateProperties innerProperties() { @@ -33,7 +37,7 @@ private PlacementPolicyUpdateProperties innerProperties() { /** * Get the state property: Whether the placement policy is enabled or disabled. - * + * * @return the state value. */ public PlacementPolicyState state() { @@ -42,7 +46,7 @@ public PlacementPolicyState state() { /** * Set the state property: Whether the placement policy is enabled or disabled. - * + * * @param state the state value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -56,7 +60,7 @@ public PlacementPolicyUpdate withState(PlacementPolicyState state) { /** * Get the vmMembers property: Virtual machine members list. - * + * * @return the vmMembers value. */ public List vmMembers() { @@ -65,7 +69,7 @@ public List vmMembers() { /** * Set the vmMembers property: Virtual machine members list. - * + * * @param vmMembers the vmMembers value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -79,7 +83,7 @@ public PlacementPolicyUpdate withVmMembers(List vmMembers) { /** * Get the hostMembers property: Host members list. - * + * * @return the hostMembers value. */ public List hostMembers() { @@ -88,7 +92,7 @@ public List hostMembers() { /** * Set the hostMembers property: Host members list. - * + * * @param hostMembers the hostMembers value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -102,7 +106,7 @@ public PlacementPolicyUpdate withHostMembers(List hostMembers) { /** * Get the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @return the affinityStrength value. */ public AffinityStrength affinityStrength() { @@ -111,7 +115,7 @@ public AffinityStrength affinityStrength() { /** * Set the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @param affinityStrength the affinityStrength value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -125,7 +129,7 @@ public PlacementPolicyUpdate withAffinityStrength(AffinityStrength affinityStren /** * Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @return the azureHybridBenefitType value. */ public AzureHybridBenefitType azureHybridBenefitType() { @@ -134,7 +138,7 @@ public AzureHybridBenefitType azureHybridBenefitType() { /** * Set the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @param azureHybridBenefitType the azureHybridBenefitType value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -148,7 +152,7 @@ public PlacementPolicyUpdate withAzureHybridBenefitType(AzureHybridBenefitType a /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java index be119f7f9110e..74e70df15abdb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Direction of port mirroring profile. */ +/** + * Port Mirroring Direction. + */ public final class PortMirroringDirectionEnum extends ExpandableStringEnum { - /** Static value INGRESS for PortMirroringDirectionEnum. */ + /** + * Static value INGRESS for PortMirroringDirectionEnum. + */ public static final PortMirroringDirectionEnum INGRESS = fromString("INGRESS"); - /** Static value EGRESS for PortMirroringDirectionEnum. */ + /** + * Static value EGRESS for PortMirroringDirectionEnum. + */ public static final PortMirroringDirectionEnum EGRESS = fromString("EGRESS"); - /** Static value BIDIRECTIONAL for PortMirroringDirectionEnum. */ + /** + * Static value BIDIRECTIONAL for PortMirroringDirectionEnum. + */ public static final PortMirroringDirectionEnum BIDIRECTIONAL = fromString("BIDIRECTIONAL"); /** * Creates a new instance of PortMirroringDirectionEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public PortMirroringDirectionEnum() { /** * Creates or finds a PortMirroringDirectionEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding PortMirroringDirectionEnum. */ @@ -41,7 +49,7 @@ public static PortMirroringDirectionEnum fromString(String name) { /** * Gets known PortMirroringDirectionEnum values. - * + * * @return known PortMirroringDirectionEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java index 7b3958456da34..6d4b5a6c95639 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Port Mirroring Status. */ +/** + * Port Mirroring status. + */ public final class PortMirroringStatusEnum extends ExpandableStringEnum { - /** Static value SUCCESS for PortMirroringStatusEnum. */ + /** + * Static value SUCCESS for PortMirroringStatusEnum. + */ public static final PortMirroringStatusEnum SUCCESS = fromString("SUCCESS"); - /** Static value FAILURE for PortMirroringStatusEnum. */ + /** + * Static value FAILURE for PortMirroringStatusEnum. + */ public static final PortMirroringStatusEnum FAILURE = fromString("FAILURE"); /** * Creates a new instance of PortMirroringStatusEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PortMirroringStatusEnum() { /** * Creates or finds a PortMirroringStatusEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding PortMirroringStatusEnum. */ @@ -38,7 +44,7 @@ public static PortMirroringStatusEnum fromString(String name) { /** * Gets known PortMirroringStatusEnum values. - * + * * @return known PortMirroringStatusEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java index dbe830b9d88bb..9b1d8a573b350 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 @@ -1,149 +1,205 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; import java.util.List; import java.util.Map; -/** An immutable client-side representation of PrivateCloud. */ +/** + * An immutable client-side representation of PrivateCloud. + */ public interface PrivateCloud { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** - * Gets the sku property: The private cloud SKU. - * + * Gets the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @return the sku value. */ Sku sku(); /** - * Gets the identity property: The identity of the private cloud, if configured. - * + * Gets the identity property: The managed service identities assigned to this resource. + * * @return the identity value. */ PrivateCloudIdentity identity(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the managementCluster property: The default cluster used for management. + * + * @return the managementCluster value. + */ + ManagementCluster managementCluster(); + + /** + * Gets the internet property: Connectivity to internet is enabled or disabled. + * + * @return the internet value. + */ + InternetEnum internet(); + + /** + * Gets the identitySources property: vCenter Single Sign On Identity Sources. + * + * @return the identitySources value. + */ + List identitySources(); + + /** + * Gets the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @return the availability value. + */ + AvailabilityProperties availability(); + + /** + * Gets the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @return the encryption value. + */ + Encryption encryption(); + + /** + * Gets the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @return the extendedNetworkBlocks value. + */ + List extendedNetworkBlocks(); + /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ PrivateCloudProvisioningState provisioningState(); /** * Gets the circuit property: An ExpressRoute Circuit. - * + * * @return the circuit value. */ Circuit circuit(); /** * Gets the endpoints property: The endpoints. - * + * * @return the endpoints value. */ Endpoints endpoints(); /** - * Gets the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Gets the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @return the networkBlock value. */ String networkBlock(); /** * Gets the managementNetwork property: Network used to access vCenter Server and NSX-T Manager. - * + * * @return the managementNetwork value. */ String managementNetwork(); /** * Gets the provisioningNetwork property: Used for virtual machine cold migration, cloning, and snapshot migration. - * + * * @return the provisioningNetwork value. */ String provisioningNetwork(); /** * Gets the vmotionNetwork property: Used for live migration of virtual machines. - * + * * @return the vmotionNetwork value. */ String vmotionNetwork(); /** * Gets the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @return the vcenterPassword value. */ String vcenterPassword(); /** * Gets the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @return the nsxtPassword value. */ String nsxtPassword(); /** * Gets the vcenterCertificateThumbprint property: Thumbprint of the vCenter Server SSL certificate. - * + * * @return the vcenterCertificateThumbprint value. */ String vcenterCertificateThumbprint(); /** * Gets the nsxtCertificateThumbprint property: Thumbprint of the NSX-T Manager SSL certificate. - * + * * @return the nsxtCertificateThumbprint value. */ String nsxtCertificateThumbprint(); /** * Gets the externalCloudLinks property: Array of cloud link IDs from other clouds that connect to this one. - * + * * @return the externalCloudLinks value. */ List externalCloudLinks(); @@ -151,111 +207,86 @@ public interface PrivateCloud { /** * Gets the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @return the secondaryCircuit value. */ Circuit secondaryCircuit(); /** * Gets the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for - * provisioned NSX Public IP count raised from 64 to 1024. - * + * provisioned NSX + * Public IP count raised from 64 to 1024. + * * @return the nsxPublicIpQuotaRaised value. */ NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised(); /** - * Gets the managementCluster property: The default cluster used for management. - * - * @return the managementCluster value. + * Gets the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @return the virtualNetworkId value. */ - ManagementCluster managementCluster(); + String virtualNetworkId(); /** - * Gets the internet property: Connectivity to internet is enabled or disabled. - * - * @return the internet value. + * Gets the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. */ - InternetEnum internet(); - - /** - * Gets the identitySources property: vCenter Single Sign On Identity Sources. - * - * @return the identitySources value. - */ - List identitySources(); - - /** - * Gets the availability property: Properties describing how the cloud is distributed across availability zones. - * - * @return the availability value. - */ - AvailabilityProperties availability(); - - /** - * Gets the encryption property: Customer managed key encryption, can be enabled or disabled. - * - * @return the encryption value. - */ - Encryption encryption(); - - /** - * Gets the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * - * @return the extendedNetworkBlocks value. - */ - List extendedNetworkBlocks(); + DnsZoneType dnsZoneType(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner object. - * + * * @return the inner object. */ PrivateCloudInner innerModel(); - /** The entirety of the PrivateCloud definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithSku, - DefinitionStages.WithCreate { + /** + * The entirety of the PrivateCloud definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithSku, DefinitionStages.WithCreate { } - /** The PrivateCloud definition stages. */ + /** + * The PrivateCloud definition stages. + */ interface DefinitionStages { - /** The first stage of the PrivateCloud definition. */ + /** + * The first stage of the PrivateCloud definition. + */ interface Blank extends WithLocation { } - /** The stage of the PrivateCloud definition allowing to specify location. */ + /** + * The stage of the PrivateCloud definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -263,30 +294,34 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the PrivateCloud definition allowing to specify parent resource. */ + /** + * The stage of the PrivateCloud definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithSku withExistingResourceGroup(String resourceGroupName); } - /** The stage of the PrivateCloud definition allowing to specify sku. */ + /** + * The stage of the PrivateCloud definition allowing to specify sku. + */ interface WithSku { /** - * Specifies the sku property: The private cloud SKU. - * - * @param sku The private cloud SKU. + * Specifies the sku property: The SKU (Stock Keeping Unit) assigned to this resource.. + * + * @param sku The SKU (Stock Keeping Unit) assigned to this resource. * @return the next definition stage. */ WithCreate withSku(Sku sku); @@ -297,318 +332,412 @@ interface WithSku { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithCircuit, - DefinitionStages.WithNetworkBlock, - DefinitionStages.WithVcenterPassword, - DefinitionStages.WithNsxtPassword, - DefinitionStages.WithSecondaryCircuit, - DefinitionStages.WithManagementCluster, - DefinitionStages.WithInternet, - DefinitionStages.WithIdentitySources, - DefinitionStages.WithAvailability, - DefinitionStages.WithEncryption, - DefinitionStages.WithExtendedNetworkBlocks { + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithManagementCluster, + DefinitionStages.WithInternet, DefinitionStages.WithIdentitySources, DefinitionStages.WithAvailability, + DefinitionStages.WithEncryption, DefinitionStages.WithExtendedNetworkBlocks, DefinitionStages.WithCircuit, + DefinitionStages.WithNetworkBlock, DefinitionStages.WithVcenterPassword, DefinitionStages.WithNsxtPassword, + DefinitionStages.WithSecondaryCircuit, DefinitionStages.WithVirtualNetworkId, + DefinitionStages.WithDnsZoneType { /** * Executes the create request. - * + * * @return the created resource. */ PrivateCloud create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ PrivateCloud create(Context context); } - /** The stage of the PrivateCloud definition allowing to specify tags. */ + /** + * The stage of the PrivateCloud definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the PrivateCloud definition allowing to specify identity. */ + /** + * The stage of the PrivateCloud definition allowing to specify identity. + */ interface WithIdentity { /** - * Specifies the identity property: The identity of the private cloud, if configured.. - * - * @param identity The identity of the private cloud, if configured. + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ WithCreate withIdentity(PrivateCloudIdentity identity); } - /** The stage of the PrivateCloud definition allowing to specify circuit. */ - interface WithCircuit { - /** - * Specifies the circuit property: An ExpressRoute Circuit. - * - * @param circuit An ExpressRoute Circuit. - * @return the next definition stage. - */ - WithCreate withCircuit(Circuit circuit); - } - - /** The stage of the PrivateCloud definition allowing to specify networkBlock. */ - interface WithNetworkBlock { - /** - * Specifies the networkBlock property: The block of addresses should be unique across VNet in your - * subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D - * are between 0 and 255, and X is between 0 and 22. - * - * @param networkBlock The block of addresses should be unique across VNet in your subscription as well as - * on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and - * 255, and X is between 0 and 22. - * @return the next definition stage. - */ - WithCreate withNetworkBlock(String networkBlock); - } - - /** The stage of the PrivateCloud definition allowing to specify vcenterPassword. */ - interface WithVcenterPassword { - /** - * Specifies the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud - * is created. - * - * @param vcenterPassword Optionally, set the vCenter admin password when the private cloud is created. - * @return the next definition stage. - */ - WithCreate withVcenterPassword(String vcenterPassword); - } - - /** The stage of the PrivateCloud definition allowing to specify nsxtPassword. */ - interface WithNsxtPassword { - /** - * Specifies the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is - * created. - * - * @param nsxtPassword Optionally, set the NSX-T Manager password when the private cloud is created. - * @return the next definition stage. - */ - WithCreate withNsxtPassword(String nsxtPassword); - } - - /** The stage of the PrivateCloud definition allowing to specify secondaryCircuit. */ - interface WithSecondaryCircuit { - /** - * Specifies the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only - * present in a stretched private cloud. - * - * @param secondaryCircuit A secondary expressRoute circuit from a separate AZ. Only present in a stretched - * private cloud. - * @return the next definition stage. - */ - WithCreate withSecondaryCircuit(Circuit secondaryCircuit); - } - - /** The stage of the PrivateCloud definition allowing to specify managementCluster. */ + /** + * The stage of the PrivateCloud definition allowing to specify managementCluster. + */ interface WithManagementCluster { /** * Specifies the managementCluster property: The default cluster used for management. - * + * * @param managementCluster The default cluster used for management. * @return the next definition stage. */ WithCreate withManagementCluster(ManagementCluster managementCluster); } - /** The stage of the PrivateCloud definition allowing to specify internet. */ + /** + * The stage of the PrivateCloud definition allowing to specify internet. + */ interface WithInternet { /** * Specifies the internet property: Connectivity to internet is enabled or disabled. - * + * * @param internet Connectivity to internet is enabled or disabled. * @return the next definition stage. */ WithCreate withInternet(InternetEnum internet); } - /** The stage of the PrivateCloud definition allowing to specify identitySources. */ + /** + * The stage of the PrivateCloud definition allowing to specify identitySources. + */ interface WithIdentitySources { /** * Specifies the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @param identitySources vCenter Single Sign On Identity Sources. * @return the next definition stage. */ WithCreate withIdentitySources(List identitySources); } - /** The stage of the PrivateCloud definition allowing to specify availability. */ + /** + * The stage of the PrivateCloud definition allowing to specify availability. + */ interface WithAvailability { /** * Specifies the availability property: Properties describing how the cloud is distributed across * availability zones. - * + * * @param availability Properties describing how the cloud is distributed across availability zones. * @return the next definition stage. */ WithCreate withAvailability(AvailabilityProperties availability); } - /** The stage of the PrivateCloud definition allowing to specify encryption. */ + /** + * The stage of the PrivateCloud definition allowing to specify encryption. + */ interface WithEncryption { /** * Specifies the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @param encryption Customer managed key encryption, can be enabled or disabled. * @return the next definition stage. */ WithCreate withEncryption(Encryption encryption); } - /** The stage of the PrivateCloud definition allowing to specify extendedNetworkBlocks. */ + /** + * The stage of the PrivateCloud definition allowing to specify extendedNetworkBlocks. + */ interface WithExtendedNetworkBlocks { /** * Specifies the extendedNetworkBlocks property: Array of additional networks noncontiguous with - * networkBlock. Networks must be unique and non-overlapping across VNet in your subscription, on-premise, - * and this privateCloud networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X).. - * + * networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X).. + * * @param extendedNetworkBlocks Array of additional networks noncontiguous with networkBlock. Networks must - * be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). + * be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). * @return the next definition stage. */ WithCreate withExtendedNetworkBlocks(List extendedNetworkBlocks); } + + /** + * The stage of the PrivateCloud definition allowing to specify circuit. + */ + interface WithCircuit { + /** + * Specifies the circuit property: An ExpressRoute Circuit. + * + * @param circuit An ExpressRoute Circuit. + * @return the next definition stage. + */ + WithCreate withCircuit(Circuit circuit); + } + + /** + * The stage of the PrivateCloud definition allowing to specify networkBlock. + */ + interface WithNetworkBlock { + /** + * Specifies the networkBlock property: The block of addresses should be unique across VNet in your + * subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * + * @param networkBlock The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * @return the next definition stage. + */ + WithCreate withNetworkBlock(String networkBlock); + } + + /** + * The stage of the PrivateCloud definition allowing to specify vcenterPassword. + */ + interface WithVcenterPassword { + /** + * Specifies the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud + * is created. + * + * @param vcenterPassword Optionally, set the vCenter admin password when the private cloud is created. + * @return the next definition stage. + */ + WithCreate withVcenterPassword(String vcenterPassword); + } + + /** + * The stage of the PrivateCloud definition allowing to specify nsxtPassword. + */ + interface WithNsxtPassword { + /** + * Specifies the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is + * created. + * + * @param nsxtPassword Optionally, set the NSX-T Manager password when the private cloud is created. + * @return the next definition stage. + */ + WithCreate withNsxtPassword(String nsxtPassword); + } + + /** + * The stage of the PrivateCloud definition allowing to specify secondaryCircuit. + */ + interface WithSecondaryCircuit { + /** + * Specifies the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only + * present in a + * stretched private cloud. + * + * @param secondaryCircuit A secondary expressRoute circuit from a separate AZ. Only present in a + * stretched private cloud. + * @return the next definition stage. + */ + WithCreate withSecondaryCircuit(Circuit secondaryCircuit); + } + + /** + * The stage of the PrivateCloud definition allowing to specify virtualNetworkId. + */ + interface WithVirtualNetworkId { + /** + * Specifies the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @param virtualNetworkId Azure resource ID of the virtual network. + * @return the next definition stage. + */ + WithCreate withVirtualNetworkId(String virtualNetworkId); + } + + /** + * The stage of the PrivateCloud definition allowing to specify dnsZoneType. + */ + interface WithDnsZoneType { + /** + * Specifies the dnsZoneType property: The type of DNS zone to use.. + * + * @param dnsZoneType The type of DNS zone to use. + * @return the next definition stage. + */ + WithCreate withDnsZoneType(DnsZoneType dnsZoneType); + } } /** * Begins update for the PrivateCloud resource. - * + * * @return the stage of resource update. */ PrivateCloud.Update update(); - /** The template for PrivateCloud update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithManagementCluster, - UpdateStages.WithInternet, - UpdateStages.WithIdentitySources, - UpdateStages.WithEncryption, - UpdateStages.WithExtendedNetworkBlocks { + /** + * The template for PrivateCloud update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity, + UpdateStages.WithManagementCluster, UpdateStages.WithInternet, UpdateStages.WithIdentitySources, + UpdateStages.WithEncryption, UpdateStages.WithExtendedNetworkBlocks, UpdateStages.WithDnsZoneType { /** * Executes the update request. - * + * * @return the updated resource. */ PrivateCloud apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ PrivateCloud apply(Context context); } - /** The PrivateCloud update stages. */ + /** + * The PrivateCloud update stages. + */ interface UpdateStages { - /** The stage of the PrivateCloud update allowing to specify tags. */ + /** + * The stage of the PrivateCloud update allowing to specify tags. + */ interface WithTags { /** - * Specifies the tags property: Resource tags. - * + * Specifies the tags property: Resource tags.. + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the PrivateCloud update allowing to specify identity. */ + /** + * The stage of the PrivateCloud update allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: The SKU (Stock Keeping Unit) assigned to this resource.. + * + * @param sku The SKU (Stock Keeping Unit) assigned to this resource. + * @return the next definition stage. + */ + Update withSku(Sku sku); + } + + /** + * The stage of the PrivateCloud update allowing to specify identity. + */ interface WithIdentity { /** - * Specifies the identity property: The identity of the private cloud, if configured.. - * - * @param identity The identity of the private cloud, if configured. + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ Update withIdentity(PrivateCloudIdentity identity); } - /** The stage of the PrivateCloud update allowing to specify managementCluster. */ + /** + * The stage of the PrivateCloud update allowing to specify managementCluster. + */ interface WithManagementCluster { /** * Specifies the managementCluster property: The default cluster used for management. - * + * * @param managementCluster The default cluster used for management. * @return the next definition stage. */ Update withManagementCluster(ManagementCluster managementCluster); } - /** The stage of the PrivateCloud update allowing to specify internet. */ + /** + * The stage of the PrivateCloud update allowing to specify internet. + */ interface WithInternet { /** * Specifies the internet property: Connectivity to internet is enabled or disabled. - * + * * @param internet Connectivity to internet is enabled or disabled. * @return the next definition stage. */ Update withInternet(InternetEnum internet); } - /** The stage of the PrivateCloud update allowing to specify identitySources. */ + /** + * The stage of the PrivateCloud update allowing to specify identitySources. + */ interface WithIdentitySources { /** * Specifies the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @param identitySources vCenter Single Sign On Identity Sources. * @return the next definition stage. */ Update withIdentitySources(List identitySources); } - /** The stage of the PrivateCloud update allowing to specify encryption. */ + /** + * The stage of the PrivateCloud update allowing to specify encryption. + */ interface WithEncryption { /** * Specifies the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @param encryption Customer managed key encryption, can be enabled or disabled. * @return the next definition stage. */ Update withEncryption(Encryption encryption); } - /** The stage of the PrivateCloud update allowing to specify extendedNetworkBlocks. */ + /** + * The stage of the PrivateCloud update allowing to specify extendedNetworkBlocks. + */ interface WithExtendedNetworkBlocks { /** * Specifies the extendedNetworkBlocks property: Array of additional networks noncontiguous with - * networkBlock. Networks must be unique and non-overlapping across VNet in your subscription, on-premise, - * and this privateCloud networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X).. - * + * networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X).. + * * @param extendedNetworkBlocks Array of additional networks noncontiguous with networkBlock. Networks must - * be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). + * be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). * @return the next definition stage. */ Update withExtendedNetworkBlocks(List extendedNetworkBlocks); } + + /** + * The stage of the PrivateCloud update allowing to specify dnsZoneType. + */ + interface WithDnsZoneType { + /** + * Specifies the dnsZoneType property: The type of DNS zone to use.. + * + * @param dnsZoneType The type of DNS zone to use. + * @return the next definition stage. + */ + Update withDnsZoneType(DnsZoneType dnsZoneType); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ PrivateCloud refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -616,7 +745,7 @@ interface WithExtendedNetworkBlocks { /** * Rotate the vCenter password. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -624,7 +753,7 @@ interface WithExtendedNetworkBlocks { /** * Rotate the vCenter password. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -634,7 +763,7 @@ interface WithExtendedNetworkBlocks { /** * Rotate the NSX-T Manager password. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -642,7 +771,7 @@ interface WithExtendedNetworkBlocks { /** * Rotate the NSX-T Manager password. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -652,7 +781,7 @@ interface WithExtendedNetworkBlocks { /** * List the admin credentials for the private cloud. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -663,7 +792,7 @@ interface WithExtendedNetworkBlocks { /** * List the admin credentials for the private cloud. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return administrative credentials for accessing vCenter and NSX-T. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java index 77e48dfab4ce0..f962c2e312c0a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java @@ -1,53 +1,45 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Identity for the virtual machine. */ +/** + * The properties of the service-assigned identity associated with this resource. + */ @Fluent public final class PrivateCloudIdentity { /* - * The principal ID of private cloud identity. This property will only be provided for a system assigned identity. + * The Active Directory tenant id of the principal. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; /* - * The tenant ID associated with the private cloud. This property will only be provided for a system assigned - * identity. + * The active directory identifier of this principal. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; /* - * The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created - * identity. The type 'None' will remove any identities from the Private Cloud. + * The type of managed identity assigned to this resource. */ - @JsonProperty(value = "type") + @JsonProperty(value = "type", required = true) private ResourceIdentityType type; - /** Creates an instance of PrivateCloudIdentity class. */ - public PrivateCloudIdentity() { - } - /** - * Get the principalId property: The principal ID of private cloud identity. This property will only be provided for - * a system assigned identity. - * - * @return the principalId value. + * Creates an instance of PrivateCloudIdentity class. */ - public String principalId() { - return this.principalId; + public PrivateCloudIdentity() { } /** - * Get the tenantId property: The tenant ID associated with the private cloud. This property will only be provided - * for a system assigned identity. - * + * Get the tenantId property: The Active Directory tenant id of the principal. + * * @return the tenantId value. */ public String tenantId() { @@ -55,9 +47,17 @@ public String tenantId() { } /** - * Get the type property: The type of identity used for the private cloud. The type 'SystemAssigned' refers to an - * implicitly created identity. The type 'None' will remove any identities from the Private Cloud. - * + * Get the principalId property: The active directory identifier of this principal. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the type property: The type of managed identity assigned to this resource. + * * @return the type value. */ public ResourceIdentityType type() { @@ -65,9 +65,8 @@ public ResourceIdentityType type() { } /** - * Set the type property: The type of identity used for the private cloud. The type 'SystemAssigned' refers to an - * implicitly created identity. The type 'None' will remove any identities from the Private Cloud. - * + * Set the type property: The type of managed identity assigned to this resource. + * * @param type the type value to set. * @return the PrivateCloudIdentity object itself. */ @@ -78,9 +77,15 @@ public PrivateCloudIdentity withType(ResourceIdentityType type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (type() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property type in model PrivateCloudIdentity")); + } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudIdentity.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudList.java deleted file mode 100644 index 74fb1b195e24c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of private clouds. */ -@Immutable -public final class PrivateCloudList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of PrivateCloudList class. */ - public PrivateCloudList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java index 5b4dd45d13a38..635678a88a456 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,35 +8,53 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * private cloud provisioning state. + */ public final class PrivateCloudProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for PrivateCloudProvisioningState. */ + /** + * Static value Succeeded for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for PrivateCloudProvisioningState. */ + /** + * Static value Failed for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelled for PrivateCloudProvisioningState. */ + /** + * Static value Canceled for PrivateCloudProvisioningState. + */ + public static final PrivateCloudProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Cancelled for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Pending for PrivateCloudProvisioningState. */ + /** + * Static value Pending for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState PENDING = fromString("Pending"); - /** Static value Building for PrivateCloudProvisioningState. */ + /** + * Static value Building for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for PrivateCloudProvisioningState. */ + /** + * Static value Deleting for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for PrivateCloudProvisioningState. */ + /** + * Static value Updating for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for PrivateCloudProvisioningState. */ - public static final PrivateCloudProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of PrivateCloudProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +63,7 @@ public PrivateCloudProvisioningState() { /** * Creates or finds a PrivateCloudProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateCloudProvisioningState. */ @@ -56,7 +74,7 @@ public static PrivateCloudProvisioningState fromString(String name) { /** * Gets known PrivateCloudProvisioningState values. - * + * * @return known PrivateCloudProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java index 3dc69016c1858..1e1c98da50c50 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -11,35 +11,45 @@ import java.util.List; import java.util.Map; -/** An update to a private cloud resource. */ +/** + * An update to a private cloud resource. + */ @Fluent public final class PrivateCloudUpdate { /* - * Resource tags + * Resource tags. */ @JsonProperty(value = "tags") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* - * The updatable properties of a private cloud resource + * The SKU (Stock Keeping Unit) assigned to this resource. */ - @JsonProperty(value = "properties") - private PrivateCloudUpdateProperties innerProperties; + @JsonProperty(value = "sku") + private Sku sku; /* - * The identity of the private cloud, if configured. + * The managed service identities assigned to this resource. */ @JsonProperty(value = "identity") private PrivateCloudIdentity identity; - /** Creates an instance of PrivateCloudUpdate class. */ + /* + * The updatable properties of a private cloud resource + */ + @JsonProperty(value = "properties") + private PrivateCloudUpdateProperties innerProperties; + + /** + * Creates an instance of PrivateCloudUpdate class. + */ public PrivateCloudUpdate() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -48,7 +58,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the PrivateCloudUpdate object itself. */ @@ -58,17 +68,28 @@ public PrivateCloudUpdate withTags(Map tags) { } /** - * Get the innerProperties property: The updatable properties of a private cloud resource. - * - * @return the innerProperties value. + * Get the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * + * @return the sku value. */ - private PrivateCloudUpdateProperties innerProperties() { - return this.innerProperties; + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * + * @param sku the sku value to set. + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withSku(Sku sku) { + this.sku = sku; + return this; } /** - * Get the identity property: The identity of the private cloud, if configured. - * + * Get the identity property: The managed service identities assigned to this resource. + * * @return the identity value. */ public PrivateCloudIdentity identity() { @@ -76,8 +97,8 @@ public PrivateCloudIdentity identity() { } /** - * Set the identity property: The identity of the private cloud, if configured. - * + * Set the identity property: The managed service identities assigned to this resource. + * * @param identity the identity value to set. * @return the PrivateCloudUpdate object itself. */ @@ -86,9 +107,18 @@ public PrivateCloudUpdate withIdentity(PrivateCloudIdentity identity) { return this; } + /** + * Get the innerProperties property: The updatable properties of a private cloud resource. + * + * @return the innerProperties value. + */ + private PrivateCloudUpdateProperties innerProperties() { + return this.innerProperties; + } + /** * Get the managementCluster property: The default cluster used for management. - * + * * @return the managementCluster value. */ public ManagementCluster managementCluster() { @@ -97,7 +127,7 @@ public ManagementCluster managementCluster() { /** * Set the managementCluster property: The default cluster used for management. - * + * * @param managementCluster the managementCluster value to set. * @return the PrivateCloudUpdate object itself. */ @@ -111,7 +141,7 @@ public PrivateCloudUpdate withManagementCluster(ManagementCluster managementClus /** * Get the internet property: Connectivity to internet is enabled or disabled. - * + * * @return the internet value. */ public InternetEnum internet() { @@ -120,7 +150,7 @@ public InternetEnum internet() { /** * Set the internet property: Connectivity to internet is enabled or disabled. - * + * * @param internet the internet value to set. * @return the PrivateCloudUpdate object itself. */ @@ -134,7 +164,7 @@ public PrivateCloudUpdate withInternet(InternetEnum internet) { /** * Get the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @return the identitySources value. */ public List identitySources() { @@ -143,7 +173,7 @@ public List identitySources() { /** * Set the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @param identitySources the identitySources value to set. * @return the PrivateCloudUpdate object itself. */ @@ -157,7 +187,7 @@ public PrivateCloudUpdate withIdentitySources(List identitySourc /** * Get the availability property: Properties describing how the cloud is distributed across availability zones. - * + * * @return the availability value. */ public AvailabilityProperties availability() { @@ -166,7 +196,7 @@ public AvailabilityProperties availability() { /** * Set the availability property: Properties describing how the cloud is distributed across availability zones. - * + * * @param availability the availability value to set. * @return the PrivateCloudUpdate object itself. */ @@ -180,7 +210,7 @@ public PrivateCloudUpdate withAvailability(AvailabilityProperties availability) /** * Get the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @return the encryption value. */ public Encryption encryption() { @@ -189,7 +219,7 @@ public Encryption encryption() { /** * Set the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @param encryption the encryption value to set. * @return the PrivateCloudUpdate object itself. */ @@ -203,9 +233,11 @@ public PrivateCloudUpdate withEncryption(Encryption encryption) { /** * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * * @return the extendedNetworkBlocks value. */ public List extendedNetworkBlocks() { @@ -214,9 +246,11 @@ public List extendedNetworkBlocks() { /** * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. * @return the PrivateCloudUpdate object itself. */ @@ -228,17 +262,43 @@ public PrivateCloudUpdate withExtendedNetworkBlocks(List extendedNetwork return this; } + /** + * Get the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. + */ + public DnsZoneType dnsZoneType() { + return this.innerProperties() == null ? null : this.innerProperties().dnsZoneType(); + } + + /** + * Set the dnsZoneType property: The type of DNS zone to use. + * + * @param dnsZoneType the dnsZoneType value to set. + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withDnsZoneType(DnsZoneType dnsZoneType) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudUpdateProperties(); + } + this.innerProperties().withDnsZoneType(dnsZoneType); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (sku() != null) { + sku().validate(); } if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java index 91d4e76b2f997..f0030b9ca740b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,80 +8,82 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PrivateClouds. */ +/** + * Resource collection API of PrivateClouds. + */ public interface PrivateClouds { /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * List private clouds in a resource group. - * + * List PrivateCloud resources by resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by subscription ID. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud. + * @return a PrivateCloud. */ PrivateCloud getByResourceGroup(String resourceGroupName, String privateCloudName); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -91,8 +93,8 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String privateCloudName); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -104,7 +106,7 @@ Response getByResourceGroupWithResponse( /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +117,7 @@ Response getByResourceGroupWithResponse( /** * Rotate the vCenter password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -127,7 +129,7 @@ Response getByResourceGroupWithResponse( /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,7 +140,7 @@ Response getByResourceGroupWithResponse( /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -150,7 +152,7 @@ Response getByResourceGroupWithResponse( /** * List the admin credentials for the private cloud. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -159,12 +161,12 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ - Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context); + Response listAdminCredentialsWithResponse(String resourceGroupName, String privateCloudName, + Context context); /** * List the admin credentials for the private cloud. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -175,31 +177,31 @@ Response listAdminCredentialsWithResponse( AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ PrivateCloud getById(String id); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -208,8 +210,8 @@ Response listAdminCredentialsWithResponse( void deleteById(String id); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,7 +222,7 @@ Response listAdminCredentialsWithResponse( /** * Begins definition for a new PrivateCloud resource. - * + * * @param name resource name. * @return the first stage of the new PrivateCloud definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateHeaders.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateHeaders.java new file mode 100644 index 0000000000000..2313280930011 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateHeaders.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The PrivateCloudsUpdateHeaders model. + */ +@Immutable +public final class PrivateCloudsUpdateHeaders { + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of PrivateCloudsUpdateHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public PrivateCloudsUpdateHeaders(HttpHeaders rawHeaders) { + String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); + if (retryAfter != null) { + this.retryAfter = Integer.parseInt(retryAfter); + } + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateResponse.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateResponse.java new file mode 100644 index 0000000000000..2e014e2d11cf6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateResponse.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; + +/** + * Contains all response data for the update operation. + */ +public final class PrivateCloudsUpdateResponse extends ResponseBase { + /** + * Creates an instance of PrivateCloudsUpdateResponse. + * + * @param request the request which resulted in this PrivateCloudsUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PrivateCloudsUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, + PrivateCloudInner value, PrivateCloudsUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** + * Gets the deserialized response body. + * + * @return the deserialized response body. + */ + @Override + public PrivateCloudInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Quota.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Quota.java index 45af6f6e6119b..af821a066affe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Quota.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Quota.java @@ -1,31 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.resourcemanager.avs.fluent.models.QuotaInner; import java.util.Map; -/** An immutable client-side representation of Quota. */ +/** + * An immutable client-side representation of Quota. + */ public interface Quota { /** * Gets the hostsRemaining property: Remaining hosts quota by sku type. - * + * * @return the hostsRemaining value. */ Map hostsRemaining(); /** * Gets the quotaEnabled property: Host quota is active for current subscription. - * + * * @return the quotaEnabled value. */ QuotaEnabled quotaEnabled(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.QuotaInner object. - * + * * @return the inner object. */ QuotaInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java index 4669cfe81bd0d..ac8bba4127a79 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Host quota is active for current subscription. */ +/** + * quota enabled. + */ public final class QuotaEnabled extends ExpandableStringEnum { - /** Static value Enabled for QuotaEnabled. */ + /** + * Static value Enabled for QuotaEnabled. + */ public static final QuotaEnabled ENABLED = fromString("Enabled"); - /** Static value Disabled for QuotaEnabled. */ + /** + * Static value Disabled for QuotaEnabled. + */ public static final QuotaEnabled DISABLED = fromString("Disabled"); /** * Creates a new instance of QuotaEnabled value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public QuotaEnabled() { /** * Creates or finds a QuotaEnabled from its string representation. - * + * * @param name a name to look for. * @return the corresponding QuotaEnabled. */ @@ -38,7 +44,7 @@ public static QuotaEnabled fromString(String name) { /** * Gets known QuotaEnabled values. - * + * * @return known QuotaEnabled values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java index 2d0d5b3e0e848..6aa4d8bd8a4a7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -9,19 +9,22 @@ import java.util.Collection; /** - * The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created identity. - * The type 'None' will remove any identities from the Private Cloud. + * The kind of managemed identity assigned to this resource. */ public final class ResourceIdentityType extends ExpandableStringEnum { - /** Static value SystemAssigned for ResourceIdentityType. */ - public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** Static value None for ResourceIdentityType. */ + /** + * Static value None for ResourceIdentityType. + */ public static final ResourceIdentityType NONE = fromString("None"); + /** + * Static value SystemAssigned for ResourceIdentityType. + */ + public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + /** * Creates a new instance of ResourceIdentityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +33,7 @@ public ResourceIdentityType() { /** * Creates or finds a ResourceIdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ResourceIdentityType. */ @@ -41,7 +44,7 @@ public static ResourceIdentityType fromString(String name) { /** * Gets known ResourceIdentityType values. - * + * * @return known ResourceIdentityType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java index cab17dc55526d..8c33d7dae39a1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java @@ -1,59 +1,84 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; import java.util.List; -/** An immutable client-side representation of ScriptCmdlet. */ +/** + * An immutable client-side representation of ScriptCmdlet. + */ public interface ScriptCmdlet { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + ScriptCmdletProvisioningState provisioningState(); + /** * Gets the description property: Description of the scripts functionality. - * + * * @return the description value. */ String description(); /** * Gets the timeout property: Recommended time limit for execution. - * + * * @return the timeout value. */ String timeout(); + /** + * Gets the audience property: Specifies whether a script cmdlet is intended to be invoked only through automation + * or visible to customers. + * + * @return the audience value. + */ + ScriptCmdletAudience audience(); + /** * Gets the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ List parameters(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner object. - * + * * @return the inner object. */ ScriptCmdletInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java new file mode 100644 index 0000000000000..e797ddec8bb8b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers. + */ +public final class ScriptCmdletAudience extends ExpandableStringEnum { + /** + * Static value Automation for ScriptCmdletAudience. + */ + public static final ScriptCmdletAudience AUTOMATION = fromString("Automation"); + + /** + * Static value Any for ScriptCmdletAudience. + */ + public static final ScriptCmdletAudience ANY = fromString("Any"); + + /** + * Creates a new instance of ScriptCmdletAudience value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScriptCmdletAudience() { + } + + /** + * Creates or finds a ScriptCmdletAudience from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScriptCmdletAudience. + */ + @JsonCreator + public static ScriptCmdletAudience fromString(String name) { + return fromString(name, ScriptCmdletAudience.class); + } + + /** + * Gets known ScriptCmdletAudience values. + * + * @return known ScriptCmdletAudience values. + */ + public static Collection values() { + return values(ScriptCmdletAudience.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java new file mode 100644 index 0000000000000..03ba6c931165c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * A script cmdlet provisioning state. + */ +public final class ScriptCmdletProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for ScriptCmdletProvisioningState. + */ + public static final ScriptCmdletProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ScriptCmdletProvisioningState. + */ + public static final ScriptCmdletProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ScriptCmdletProvisioningState. + */ + public static final ScriptCmdletProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ScriptCmdletProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScriptCmdletProvisioningState() { + } + + /** + * Creates or finds a ScriptCmdletProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScriptCmdletProvisioningState. + */ + @JsonCreator + public static ScriptCmdletProvisioningState fromString(String name) { + return fromString(name, ScriptCmdletProvisioningState.class); + } + + /** + * Gets known ScriptCmdletProvisioningState values. + * + * @return known ScriptCmdletProvisioningState values. + */ + public static Collection values() { + return values(ScriptCmdletProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java index 21db768aed70f..d1d79be5c4634 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,70 +8,66 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ScriptCmdlets. */ +/** + * Resource collection API of ScriptCmdlets. + */ public interface ScriptCmdlets { /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName); /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName, + Context context); /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cmdlet available for script execution along with {@link Response}. + * @return a ScriptCmdlet along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String scriptPackageName, + String scriptCmdletName, Context context); /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cmdlet available for script execution. + * @return a ScriptCmdlet. */ - ScriptCmdlet get( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName); + ScriptCmdlet get(String resourceGroupName, String privateCloudName, String scriptPackageName, + String scriptCmdletName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletsList.java deleted file mode 100644 index 005d7ef37f1a4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletsList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Pageable list of scripts/cmdlets. */ -@Immutable -public final class ScriptCmdletsList { - /* - * List of scripts - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ScriptCmdletsList class. */ - public ScriptCmdletsList() { - } - - /** - * Get the value property: List of scripts. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java index b48a7466bcf82..8ae8c62b9d1b4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java @@ -1,49 +1,59 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; -/** An immutable client-side representation of ScriptExecution. */ +/** + * An immutable client-side representation of ScriptExecution. + */ public interface ScriptExecution { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @return the scriptCmdletId value. */ String scriptCmdletId(); /** * Gets the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ List parameters(); @@ -51,128 +61,136 @@ public interface ScriptExecution { /** * Gets the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @return the hiddenParameters value. */ List hiddenParameters(); /** - * Gets the failureReason property: Error message if the script was able to run, but if the script itself had errors - * or powershell threw an exception. - * + * Gets the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * * @return the failureReason value. */ String failureReason(); /** * Gets the timeout property: Time limit for execution. - * + * * @return the timeout value. */ String timeout(); /** * Gets the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * + * * @return the retention value. */ String retention(); /** * Gets the submittedAt property: Time the script execution was submitted. - * + * * @return the submittedAt value. */ OffsetDateTime submittedAt(); /** * Gets the startedAt property: Time the script execution was started. - * + * * @return the startedAt value. */ OffsetDateTime startedAt(); /** * Gets the finishedAt property: Time the script execution was finished. - * + * * @return the finishedAt value. */ OffsetDateTime finishedAt(); /** * Gets the provisioningState property: The state of the script execution resource. - * + * * @return the provisioningState value. */ ScriptExecutionProvisioningState provisioningState(); /** * Gets the output property: Standard output stream from the powershell execution. - * + * * @return the output value. */ List output(); /** * Gets the namedOutputs property: User-defined dictionary. - * + * * @return the namedOutputs value. */ Map namedOutputs(); /** * Gets the information property: Standard information out stream from the powershell execution. - * + * * @return the information value. */ List information(); /** * Gets the warnings property: Standard warning out stream from the powershell execution. - * + * * @return the warnings value. */ List warnings(); /** * Gets the errors property: Standard error output stream from the powershell execution. - * + * * @return the errors value. */ List errors(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner object. - * + * * @return the inner object. */ ScriptExecutionInner innerModel(); - /** The entirety of the ScriptExecution definition. */ + /** + * The entirety of the ScriptExecution definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ScriptExecution definition stages. */ + /** + * The ScriptExecution definition stages. + */ interface DefinitionStages { - /** The first stage of the ScriptExecution definition. */ + /** + * The first stage of the ScriptExecution definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ScriptExecution definition allowing to specify parent resource. */ + /** + * The stage of the ScriptExecution definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -182,119 +200,131 @@ interface WithParentResource { * The stage of the ScriptExecution definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithScriptCmdletId, - DefinitionStages.WithParameters, - DefinitionStages.WithHiddenParameters, - DefinitionStages.WithFailureReason, - DefinitionStages.WithTimeout, - DefinitionStages.WithRetention, - DefinitionStages.WithOutput, - DefinitionStages.WithNamedOutputs { + interface WithCreate extends DefinitionStages.WithScriptCmdletId, DefinitionStages.WithParameters, + DefinitionStages.WithHiddenParameters, DefinitionStages.WithFailureReason, DefinitionStages.WithTimeout, + DefinitionStages.WithRetention, DefinitionStages.WithOutput, DefinitionStages.WithNamedOutputs { /** * Executes the create request. - * + * * @return the created resource. */ ScriptExecution create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ScriptExecution create(Context context); } - /** The stage of the ScriptExecution definition allowing to specify scriptCmdletId. */ + /** + * The stage of the ScriptExecution definition allowing to specify scriptCmdletId. + */ interface WithScriptCmdletId { /** * Specifies the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS * script. - * + * * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script. * @return the next definition stage. */ WithCreate withScriptCmdletId(String scriptCmdletId); } - /** The stage of the ScriptExecution definition allowing to specify parameters. */ + /** + * The stage of the ScriptExecution definition allowing to specify parameters. + */ interface WithParameters { /** * Specifies the parameters property: Parameters the script will accept. - * + * * @param parameters Parameters the script will accept. * @return the next definition stage. */ WithCreate withParameters(List parameters); } - /** The stage of the ScriptExecution definition allowing to specify hiddenParameters. */ + /** + * The stage of the ScriptExecution definition allowing to specify hiddenParameters. + */ interface WithHiddenParameters { /** * Specifies the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as - * passwords and credentials. - * + * passwords and + * credentials. + * * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. + * credentials. * @return the next definition stage. */ WithCreate withHiddenParameters(List hiddenParameters); } - /** The stage of the ScriptExecution definition allowing to specify failureReason. */ + /** + * The stage of the ScriptExecution definition allowing to specify failureReason. + */ interface WithFailureReason { /** * Specifies the failureReason property: Error message if the script was able to run, but if the script - * itself had errors or powershell threw an exception. - * - * @param failureReason Error message if the script was able to run, but if the script itself had errors or - * powershell threw an exception. + * itself had + * errors or powershell threw an exception. + * + * @param failureReason Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. * @return the next definition stage. */ WithCreate withFailureReason(String failureReason); } - /** The stage of the ScriptExecution definition allowing to specify timeout. */ + /** + * The stage of the ScriptExecution definition allowing to specify timeout. + */ interface WithTimeout { /** * Specifies the timeout property: Time limit for execution. - * + * * @param timeout Time limit for execution. * @return the next definition stage. */ WithCreate withTimeout(String timeout); } - /** The stage of the ScriptExecution definition allowing to specify retention. */ + /** + * The stage of the ScriptExecution definition allowing to specify retention. + */ interface WithRetention { /** * Specifies the retention property: Time to live for the resource. If not provided, will be available for * 60 days. - * + * * @param retention Time to live for the resource. If not provided, will be available for 60 days. * @return the next definition stage. */ WithCreate withRetention(String retention); } - /** The stage of the ScriptExecution definition allowing to specify output. */ + /** + * The stage of the ScriptExecution definition allowing to specify output. + */ interface WithOutput { /** * Specifies the output property: Standard output stream from the powershell execution. - * + * * @param output Standard output stream from the powershell execution. * @return the next definition stage. */ WithCreate withOutput(List output); } - /** The stage of the ScriptExecution definition allowing to specify namedOutputs. */ + /** + * The stage of the ScriptExecution definition allowing to specify namedOutputs. + */ interface WithNamedOutputs { /** * Specifies the namedOutputs property: User-defined dictionary.. - * + * * @param namedOutputs User-defined dictionary. * @return the next definition stage. */ @@ -304,127 +334,143 @@ interface WithNamedOutputs { /** * Begins update for the ScriptExecution resource. - * + * * @return the stage of resource update. */ ScriptExecution.Update update(); - /** The template for ScriptExecution update. */ - interface Update - extends UpdateStages.WithScriptCmdletId, - UpdateStages.WithParameters, - UpdateStages.WithHiddenParameters, - UpdateStages.WithFailureReason, - UpdateStages.WithTimeout, - UpdateStages.WithRetention, - UpdateStages.WithOutput, - UpdateStages.WithNamedOutputs { + /** + * The template for ScriptExecution update. + */ + interface Update extends UpdateStages.WithScriptCmdletId, UpdateStages.WithParameters, + UpdateStages.WithHiddenParameters, UpdateStages.WithFailureReason, UpdateStages.WithTimeout, + UpdateStages.WithRetention, UpdateStages.WithOutput, UpdateStages.WithNamedOutputs { /** * Executes the update request. - * + * * @return the updated resource. */ ScriptExecution apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ScriptExecution apply(Context context); } - /** The ScriptExecution update stages. */ + /** + * The ScriptExecution update stages. + */ interface UpdateStages { - /** The stage of the ScriptExecution update allowing to specify scriptCmdletId. */ + /** + * The stage of the ScriptExecution update allowing to specify scriptCmdletId. + */ interface WithScriptCmdletId { /** * Specifies the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS * script. - * + * * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script. * @return the next definition stage. */ Update withScriptCmdletId(String scriptCmdletId); } - /** The stage of the ScriptExecution update allowing to specify parameters. */ + /** + * The stage of the ScriptExecution update allowing to specify parameters. + */ interface WithParameters { /** * Specifies the parameters property: Parameters the script will accept. - * + * * @param parameters Parameters the script will accept. * @return the next definition stage. */ Update withParameters(List parameters); } - /** The stage of the ScriptExecution update allowing to specify hiddenParameters. */ + /** + * The stage of the ScriptExecution update allowing to specify hiddenParameters. + */ interface WithHiddenParameters { /** * Specifies the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as - * passwords and credentials. - * + * passwords and + * credentials. + * * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. + * credentials. * @return the next definition stage. */ Update withHiddenParameters(List hiddenParameters); } - /** The stage of the ScriptExecution update allowing to specify failureReason. */ + /** + * The stage of the ScriptExecution update allowing to specify failureReason. + */ interface WithFailureReason { /** * Specifies the failureReason property: Error message if the script was able to run, but if the script - * itself had errors or powershell threw an exception. - * - * @param failureReason Error message if the script was able to run, but if the script itself had errors or - * powershell threw an exception. + * itself had + * errors or powershell threw an exception. + * + * @param failureReason Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. * @return the next definition stage. */ Update withFailureReason(String failureReason); } - /** The stage of the ScriptExecution update allowing to specify timeout. */ + /** + * The stage of the ScriptExecution update allowing to specify timeout. + */ interface WithTimeout { /** * Specifies the timeout property: Time limit for execution. - * + * * @param timeout Time limit for execution. * @return the next definition stage. */ Update withTimeout(String timeout); } - /** The stage of the ScriptExecution update allowing to specify retention. */ + /** + * The stage of the ScriptExecution update allowing to specify retention. + */ interface WithRetention { /** * Specifies the retention property: Time to live for the resource. If not provided, will be available for * 60 days. - * + * * @param retention Time to live for the resource. If not provided, will be available for 60 days. * @return the next definition stage. */ Update withRetention(String retention); } - /** The stage of the ScriptExecution update allowing to specify output. */ + /** + * The stage of the ScriptExecution update allowing to specify output. + */ interface WithOutput { /** * Specifies the output property: Standard output stream from the powershell execution. - * + * * @param output Standard output stream from the powershell execution. * @return the next definition stage. */ Update withOutput(List output); } - /** The stage of the ScriptExecution update allowing to specify namedOutputs. */ + /** + * The stage of the ScriptExecution update allowing to specify namedOutputs. + */ interface WithNamedOutputs { /** * Specifies the namedOutputs property: User-defined dictionary.. - * + * * @param namedOutputs User-defined dictionary. * @return the next definition stage. */ @@ -434,14 +480,14 @@ interface WithNamedOutputs { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ScriptExecution refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -449,21 +495,21 @@ interface WithNamedOutputs { /** * Return the logs for a script execution resource. - * + * * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. + * empty array will return nothing. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. */ - Response getExecutionLogsWithResponse( - List scriptOutputStreamType, Context context); + Response getExecutionLogsWithResponse(List scriptOutputStreamType, + Context context); /** * Return the logs for a script execution resource. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an instance of a script executed by a user - custom or AVS. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java index 874d0a6d00137..f664ed6d8c223 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,36 +8,56 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The arguments passed in to the execution. */ +/** + * The arguments passed in to the execution. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, property = "type", - defaultImpl = ScriptExecutionParameter.class) + defaultImpl = ScriptExecutionParameter.class, + visible = true) @JsonTypeName("ScriptExecutionParameter") @JsonSubTypes({ @JsonSubTypes.Type(name = "SecureValue", value = ScriptSecureStringExecutionParameter.class), @JsonSubTypes.Type(name = "Value", value = ScriptStringExecutionParameter.class), - @JsonSubTypes.Type(name = "Credential", value = PSCredentialExecutionParameter.class) -}) + @JsonSubTypes.Type(name = "Credential", value = PSCredentialExecutionParameter.class) }) @Fluent public class ScriptExecutionParameter { + /* + * script execution parameter type + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private ScriptExecutionParameterType type = ScriptExecutionParameterType.fromString("ScriptExecutionParameter"); + /* * The parameter name */ @JsonProperty(value = "name", required = true) private String name; - /** Creates an instance of ScriptExecutionParameter class. */ + /** + * Creates an instance of ScriptExecutionParameter class. + */ public ScriptExecutionParameter() { } + /** + * Get the type property: script execution parameter type. + * + * @return the type value. + */ + public ScriptExecutionParameterType type() { + return this.type; + } + /** * Get the name property: The parameter name. - * + * * @return the name value. */ public String name() { @@ -46,7 +66,7 @@ public String name() { /** * Set the name property: The parameter name. - * + * * @param name the name value to set. * @return the ScriptExecutionParameter object itself. */ @@ -57,14 +77,13 @@ public ScriptExecutionParameter withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model ScriptExecutionParameter")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ScriptExecutionParameter")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java index 736ae6a32b8d2..e1d03da8e94ef 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of execution parameter. */ +/** + * script execution parameter type. + */ public final class ScriptExecutionParameterType extends ExpandableStringEnum { - /** Static value Value for ScriptExecutionParameterType. */ + /** + * Static value Value for ScriptExecutionParameterType. + */ public static final ScriptExecutionParameterType VALUE = fromString("Value"); - /** Static value SecureValue for ScriptExecutionParameterType. */ + /** + * Static value SecureValue for ScriptExecutionParameterType. + */ public static final ScriptExecutionParameterType SECURE_VALUE = fromString("SecureValue"); - /** Static value Credential for ScriptExecutionParameterType. */ + /** + * Static value Credential for ScriptExecutionParameterType. + */ public static final ScriptExecutionParameterType CREDENTIAL = fromString("Credential"); /** * Creates a new instance of ScriptExecutionParameterType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ScriptExecutionParameterType() { /** * Creates or finds a ScriptExecutionParameterType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScriptExecutionParameterType. */ @@ -41,7 +49,7 @@ public static ScriptExecutionParameterType fromString(String name) { /** * Gets known ScriptExecutionParameterType values. - * + * * @return known ScriptExecutionParameterType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java index 249803f384f6f..350de3278c1e4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,35 +8,53 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the script execution resource. */ +/** + * Script Execution provisioning state. + */ public final class ScriptExecutionProvisioningState extends ExpandableStringEnum { - /** Static value Pending for ScriptExecutionProvisioningState. */ - public static final ScriptExecutionProvisioningState PENDING = fromString("Pending"); - - /** Static value Running for ScriptExecutionProvisioningState. */ - public static final ScriptExecutionProvisioningState RUNNING = fromString("Running"); - - /** Static value Succeeded for ScriptExecutionProvisioningState. */ + /** + * Static value Succeeded for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ScriptExecutionProvisioningState. */ + /** + * Static value Failed for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelling for ScriptExecutionProvisioningState. */ + /** + * Static value Canceled for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Pending for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState PENDING = fromString("Pending"); + + /** + * Static value Running for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState RUNNING = fromString("Running"); + + /** + * Static value Cancelling for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState CANCELLING = fromString("Cancelling"); - /** Static value Cancelled for ScriptExecutionProvisioningState. */ + /** + * Static value Cancelled for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Deleting for ScriptExecutionProvisioningState. */ + /** + * Static value Deleting for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState DELETING = fromString("Deleting"); - /** Static value Canceled for ScriptExecutionProvisioningState. */ - public static final ScriptExecutionProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of ScriptExecutionProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +63,7 @@ public ScriptExecutionProvisioningState() { /** * Creates or finds a ScriptExecutionProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScriptExecutionProvisioningState. */ @@ -56,7 +74,7 @@ public static ScriptExecutionProvisioningState fromString(String name) { /** * Gets known ScriptExecutionProvisioningState values. - * + * * @return known ScriptExecutionProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java index 96e89fdfe2823..751fd80070b2e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -9,67 +9,69 @@ import com.azure.core.util.Context; import java.util.List; -/** Resource collection API of ScriptExecutions. */ +/** + * Resource collection API of ScriptExecutions. + */ public interface ScriptExecutions { /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an script execution by name in a private cloud along with {@link Response}. + * @return a ScriptExecution along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an script execution by name in a private cloud. + * @return a ScriptExecution. */ ScriptExecution get(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -77,11 +79,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -91,31 +93,27 @@ Response getWithResponse( /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. + * empty array will return nothing. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. */ - Response getExecutionLogsWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType, - Context context); + Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, List scriptOutputStreamType, Context context); /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -124,31 +122,31 @@ Response getExecutionLogsWithResponse( ScriptExecution getExecutionLogs(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an script execution by name in a private cloud along with {@link Response}. + * @return a ScriptExecution along with {@link Response}. */ ScriptExecution getById(String id); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an script execution by name in a private cloud along with {@link Response}. + * @return a ScriptExecution along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -157,8 +155,8 @@ Response getExecutionLogsWithResponse( void deleteById(String id); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,7 +167,7 @@ Response getExecutionLogsWithResponse( /** * Begins definition for a new ScriptExecution resource. - * + * * @param name resource name. * @return the first stage of the new ScriptExecution definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionsList.java deleted file mode 100644 index efa59a4a74d2f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionsList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Pageable list of script executions. */ -@Immutable -public final class ScriptExecutionsList { - /* - * List of scripts - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ScriptExecutionsList class. */ - public ScriptExecutionsList() { - } - - /** - * Get the value property: List of scripts. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java index f4f15bd8c6215..e8952d495b155 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScriptOutputStreamType. */ +/** + * Script Output Stream type. + */ public final class ScriptOutputStreamType extends ExpandableStringEnum { - /** Static value Information for ScriptOutputStreamType. */ + /** + * Static value Information for ScriptOutputStreamType. + */ public static final ScriptOutputStreamType INFORMATION = fromString("Information"); - /** Static value Warning for ScriptOutputStreamType. */ + /** + * Static value Warning for ScriptOutputStreamType. + */ public static final ScriptOutputStreamType WARNING = fromString("Warning"); - /** Static value Output for ScriptOutputStreamType. */ + /** + * Static value Output for ScriptOutputStreamType. + */ public static final ScriptOutputStreamType OUTPUT = fromString("Output"); - /** Static value Error for ScriptOutputStreamType. */ + /** + * Static value Error for ScriptOutputStreamType. + */ public static final ScriptOutputStreamType ERROR = fromString("Error"); /** * Creates a new instance of ScriptOutputStreamType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ScriptOutputStreamType() { /** * Creates or finds a ScriptOutputStreamType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScriptOutputStreamType. */ @@ -44,7 +54,7 @@ public static ScriptOutputStreamType fromString(String name) { /** * Gets known ScriptOutputStreamType values. - * + * * @return known ScriptOutputStreamType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java index beff089fb54e6..33ba11e89d2c1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java @@ -1,65 +1,82 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; -/** An immutable client-side representation of ScriptPackage. */ +/** + * An immutable client-side representation of ScriptPackage. + */ public interface ScriptPackage { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + ScriptPackageProvisioningState provisioningState(); + /** * Gets the description property: User friendly description of the package. - * + * * @return the description value. */ String description(); /** * Gets the version property: Module version. - * + * * @return the version value. */ String version(); /** * Gets the company property: Company that created and supports the package. - * + * * @return the company value. */ String company(); /** * Gets the uri property: Link to support by the package vendor. - * + * * @return the uri value. */ String uri(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner object. - * + * * @return the inner object. */ ScriptPackageInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java new file mode 100644 index 0000000000000..86a3f0efaca05 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Script Package provisioning state. + */ +public final class ScriptPackageProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for ScriptPackageProvisioningState. + */ + public static final ScriptPackageProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ScriptPackageProvisioningState. + */ + public static final ScriptPackageProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ScriptPackageProvisioningState. + */ + public static final ScriptPackageProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ScriptPackageProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScriptPackageProvisioningState() { + } + + /** + * Creates or finds a ScriptPackageProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScriptPackageProvisioningState. + */ + @JsonCreator + public static ScriptPackageProvisioningState fromString(String name) { + return fromString(name, ScriptPackageProvisioningState.class); + } + + /** + * Gets known ScriptPackageProvisioningState values. + * + * @return known ScriptPackageProvisioningState values. + */ + public static Collection values() { + return values(ScriptPackageProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java index 9951320526c58..0c3e2f0101f58 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,58 +8,60 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ScriptPackages. */ +/** + * Resource collection API of ScriptPackages. + */ public interface ScriptPackages { /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a script package available to run on a private cloud along with {@link Response}. + * @return a ScriptPackage along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String scriptPackageName, + Context context); /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a script package available to run on a private cloud. + * @return a ScriptPackage. */ ScriptPackage get(String resourceGroupName, String privateCloudName, String scriptPackageName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackagesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackagesList.java deleted file mode 100644 index 8cea424d7b629..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackagesList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of the available script packages. */ -@Immutable -public final class ScriptPackagesList { - /* - * List of script package resources - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ScriptPackagesList class. */ - public ScriptPackagesList() { - } - - /** - * Get the value property: List of script package resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java index f626c36b226d2..4e516d22e7a7e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java @@ -1,17 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** An parameter that the script will accept. */ -@Fluent +/** + * An parameter that the script will accept. + */ +@Immutable public final class ScriptParameter { /* - * The type of parameter the script is expecting. psCredential is a PSCredentialObject + * The type of parameter the script is expecting. psCredential is a + * PSCredentialObject */ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private ScriptParameterTypes type; @@ -29,7 +32,8 @@ public final class ScriptParameter { private String description; /* - * Should this parameter be visible to arm and passed in the parameters argument when executing + * Should this parameter be visible to arm and passed in the parameters argument + * when executing */ @JsonProperty(value = "visibility", access = JsonProperty.Access.WRITE_ONLY) private VisibilityParameterEnum visibility; @@ -40,13 +44,16 @@ public final class ScriptParameter { @JsonProperty(value = "optional", access = JsonProperty.Access.WRITE_ONLY) private OptionalParamEnum optional; - /** Creates an instance of ScriptParameter class. */ - public ScriptParameter() { + /** + * Creates an instance of ScriptParameter class. + */ + private ScriptParameter() { } /** - * Get the type property: The type of parameter the script is expecting. psCredential is a PSCredentialObject. - * + * Get the type property: The type of parameter the script is expecting. psCredential is a + * PSCredentialObject. + * * @return the type value. */ public ScriptParameterTypes type() { @@ -55,27 +62,16 @@ public ScriptParameterTypes type() { /** * Get the name property: The parameter name that the script will expect a parameter value for. - * + * * @return the name value. */ public String name() { return this.name; } - /** - * Set the name property: The parameter name that the script will expect a parameter value for. - * - * @param name the name value to set. - * @return the ScriptParameter object itself. - */ - public ScriptParameter withName(String name) { - this.name = name; - return this; - } - /** * Get the description property: User friendly description of the parameter. - * + * * @return the description value. */ public String description() { @@ -83,9 +79,9 @@ public String description() { } /** - * Get the visibility property: Should this parameter be visible to arm and passed in the parameters argument when - * executing. - * + * Get the visibility property: Should this parameter be visible to arm and passed in the parameters argument + * when executing. + * * @return the visibility value. */ public VisibilityParameterEnum visibility() { @@ -94,7 +90,7 @@ public VisibilityParameterEnum visibility() { /** * Get the optional property: Is this parameter required or optional. - * + * * @return the optional value. */ public OptionalParamEnum optional() { @@ -103,7 +99,7 @@ public OptionalParamEnum optional() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java index 4e2302248c420..bf2593b5ff872 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of parameter the script is expecting. psCredential is a PSCredentialObject. */ +/** + * Script Parameter types. + */ public final class ScriptParameterTypes extends ExpandableStringEnum { - /** Static value String for ScriptParameterTypes. */ + /** + * Static value String for ScriptParameterTypes. + */ public static final ScriptParameterTypes STRING = fromString("String"); - /** Static value SecureString for ScriptParameterTypes. */ + /** + * Static value SecureString for ScriptParameterTypes. + */ public static final ScriptParameterTypes SECURE_STRING = fromString("SecureString"); - /** Static value Credential for ScriptParameterTypes. */ + /** + * Static value Credential for ScriptParameterTypes. + */ public static final ScriptParameterTypes CREDENTIAL = fromString("Credential"); - /** Static value Int for ScriptParameterTypes. */ + /** + * Static value Int for ScriptParameterTypes. + */ public static final ScriptParameterTypes INT = fromString("Int"); - /** Static value Bool for ScriptParameterTypes. */ + /** + * Static value Bool for ScriptParameterTypes. + */ public static final ScriptParameterTypes BOOL = fromString("Bool"); - /** Static value Float for ScriptParameterTypes. */ + /** + * Static value Float for ScriptParameterTypes. + */ public static final ScriptParameterTypes FLOAT = fromString("Float"); /** * Creates a new instance of ScriptParameterTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public ScriptParameterTypes() { /** * Creates or finds a ScriptParameterTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScriptParameterTypes. */ @@ -50,7 +64,7 @@ public static ScriptParameterTypes fromString(String name) { /** * Gets known ScriptParameterTypes values. - * + * * @return known ScriptParameterTypes values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java index 9f7c01b71ca83..eca966e7f3681 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java @@ -1,32 +1,58 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** a plain text value execution parameter. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +/** + * a plain text value execution parameter. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "type", + defaultImpl = ScriptSecureStringExecutionParameter.class, + visible = true) @JsonTypeName("SecureValue") @Fluent public final class ScriptSecureStringExecutionParameter extends ScriptExecutionParameter { + /* + * script execution parameter type + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private ScriptExecutionParameterType type = ScriptExecutionParameterType.SECURE_VALUE; + /* * A secure value for the passed parameter, not to be stored in logs */ @JsonProperty(value = "secureValue") private String secureValue; - /** Creates an instance of ScriptSecureStringExecutionParameter class. */ + /** + * Creates an instance of ScriptSecureStringExecutionParameter class. + */ public ScriptSecureStringExecutionParameter() { } + /** + * Get the type property: script execution parameter type. + * + * @return the type value. + */ + @Override + public ScriptExecutionParameterType type() { + return this.type; + } + /** * Get the secureValue property: A secure value for the passed parameter, not to be stored in logs. - * + * * @return the secureValue value. */ public String secureValue() { @@ -35,7 +61,7 @@ public String secureValue() { /** * Set the secureValue property: A secure value for the passed parameter, not to be stored in logs. - * + * * @param secureValue the secureValue value to set. * @return the ScriptSecureStringExecutionParameter object itself. */ @@ -44,7 +70,9 @@ public ScriptSecureStringExecutionParameter withSecureValue(String secureValue) return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScriptSecureStringExecutionParameter withName(String name) { super.withName(name); @@ -53,7 +81,7 @@ public ScriptSecureStringExecutionParameter withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java index 5b013c585b4f2..f9e1c3ae9b9d6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java @@ -1,32 +1,58 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** a plain text value execution parameter. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +/** + * a plain text value execution parameter. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "type", + defaultImpl = ScriptStringExecutionParameter.class, + visible = true) @JsonTypeName("Value") @Fluent public final class ScriptStringExecutionParameter extends ScriptExecutionParameter { + /* + * script execution parameter type + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private ScriptExecutionParameterType type = ScriptExecutionParameterType.VALUE; + /* * The value for the passed parameter */ @JsonProperty(value = "value") private String value; - /** Creates an instance of ScriptStringExecutionParameter class. */ + /** + * Creates an instance of ScriptStringExecutionParameter class. + */ public ScriptStringExecutionParameter() { } + /** + * Get the type property: script execution parameter type. + * + * @return the type value. + */ + @Override + public ScriptExecutionParameterType type() { + return this.type; + } + /** * Get the value property: The value for the passed parameter. - * + * * @return the value value. */ public String value() { @@ -35,7 +61,7 @@ public String value() { /** * Set the value property: The value for the passed parameter. - * + * * @param value the value value to set. * @return the ScriptStringExecutionParameter object itself. */ @@ -44,7 +70,9 @@ public ScriptStringExecutionParameter withValue(String value) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScriptStringExecutionParameter withName(String name) { super.withName(name); @@ -53,7 +81,7 @@ public ScriptStringExecutionParameter withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java index 41285ae17c5ab..6e4e5259f6c2b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Segment status. */ +/** + * Segment status. + */ public final class SegmentStatusEnum extends ExpandableStringEnum { - /** Static value SUCCESS for SegmentStatusEnum. */ + /** + * Static value SUCCESS for SegmentStatusEnum. + */ public static final SegmentStatusEnum SUCCESS = fromString("SUCCESS"); - /** Static value FAILURE for SegmentStatusEnum. */ + /** + * Static value FAILURE for SegmentStatusEnum. + */ public static final SegmentStatusEnum FAILURE = fromString("FAILURE"); /** * Creates a new instance of SegmentStatusEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SegmentStatusEnum() { /** * Creates or finds a SegmentStatusEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding SegmentStatusEnum. */ @@ -38,7 +44,7 @@ public static SegmentStatusEnum fromString(String name) { /** * Gets known SegmentStatusEnum values. - * + * * @return known SegmentStatusEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ServiceSpecification.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ServiceSpecification.java deleted file mode 100644 index 90674af3ee143..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ServiceSpecification.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Service specification payload. */ -@Fluent -public final class ServiceSpecification { - /* - * Specifications of the Log for Azure Monitoring - */ - @JsonProperty(value = "logSpecifications") - private List logSpecifications; - - /* - * Specifications of the Metrics for Azure Monitoring - */ - @JsonProperty(value = "metricSpecifications") - private List metricSpecifications; - - /** Creates an instance of ServiceSpecification class. */ - public ServiceSpecification() { - } - - /** - * Get the logSpecifications property: Specifications of the Log for Azure Monitoring. - * - * @return the logSpecifications value. - */ - public List logSpecifications() { - return this.logSpecifications; - } - - /** - * Set the logSpecifications property: Specifications of the Log for Azure Monitoring. - * - * @param logSpecifications the logSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withLogSpecifications(List logSpecifications) { - this.logSpecifications = logSpecifications; - return this; - } - - /** - * Get the metricSpecifications property: Specifications of the Metrics for Azure Monitoring. - * - * @return the metricSpecifications value. - */ - public List metricSpecifications() { - return this.metricSpecifications; - } - - /** - * Set the metricSpecifications property: Specifications of the Metrics for Azure Monitoring. - * - * @param metricSpecifications the metricSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withMetricSpecifications(List metricSpecifications) { - this.metricSpecifications = metricSpecifications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logSpecifications() != null) { - logSpecifications().forEach(e -> e.validate()); - } - if (metricSpecifications() != null) { - metricSpecifications().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java index 0e32c9d1a4dca..807e32ff1d2ed 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,22 +8,53 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The resource model definition representing SKU. */ +/** + * The SKU (Stock Keeping Unit) assigned to this resource. + */ @Fluent public final class Sku { /* - * The name of the SKU. + * The name of the SKU, usually a combination of letters and numbers, for example, 'P3' */ @JsonProperty(value = "name", required = true) private String name; - /** Creates an instance of Sku class. */ + /* + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is + * not required on a PUT. + */ + @JsonProperty(value = "tier") + private SkuTier tier; + + /* + * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone + * code. + */ + @JsonProperty(value = "size") + private String size; + + /* + * If the service has different generations of hardware, for the same SKU, then that can be captured here. + */ + @JsonProperty(value = "family") + private String family; + + /* + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Creates an instance of Sku class. + */ public Sku() { } /** - * Get the name property: The name of the SKU. - * + * Get the name property: The name of the SKU, usually a combination of letters and numbers, for example, 'P3'. + * * @return the name value. */ public String name() { @@ -31,8 +62,8 @@ public String name() { } /** - * Set the name property: The name of the SKU. - * + * Set the name property: The name of the SKU, usually a combination of letters and numbers, for example, 'P3'. + * * @param name the name value to set. * @return the Sku object itself. */ @@ -41,15 +72,102 @@ public Sku withName(String name) { return this; } + /** + * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more + * than one tier, but is not required on a PUT. + * + * @return the tier value. + */ + public SkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more + * than one tier, but is not required on a PUT. + * + * @param tier the tier value to set. + * @return the Sku object itself. + */ + public Sku withTier(SkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this + * would be the standalone code. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this + * would be the standalone code. + * + * @param size the size value to set. + * @return the Sku object itself. + */ + public Sku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. + * + * @return the family value. + */ + public String family() { + return this.family; + } + + /** + * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. + * + * @param family the family value to set. + * @return the Sku object itself. + */ + public Sku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If + * scale out/in is not possible for the resource this may be omitted. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If + * scale out/in is not possible for the resource this may be omitted. + * + * @param capacity the capacity value to set. + * @return the Sku object itself. + */ + public Sku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java new file mode 100644 index 0000000000000..7e8a2f6f0a765 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Available service tiers for the SKU. + */ +public enum SkuTier { + /** + * Enum value Free. + */ + FREE("Free"), + + /** + * Enum value Basic. + */ + BASIC("Basic"), + + /** + * Enum value Standard. + */ + STANDARD("Standard"), + + /** + * Enum value Premium. + */ + PREMIUM("Premium"); + + /** + * The actual serialized value for a SkuTier instance. + */ + private final String value; + + SkuTier(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SkuTier instance. + * + * @param value the serialized value to parse. + * @return the parsed SkuTier object, or null if unable to parse. + */ + @JsonCreator + public static SkuTier fromString(String value) { + if (value == null) { + return null; + } + SkuTier[] items = SkuTier.values(); + for (SkuTier item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java index da9aef12ecc61..0e31e0dba6ee0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Protect LDAP communication using SSL certificate (LDAPS). */ +/** + * Whether SSL is enabled or disabled. + */ public final class SslEnum extends ExpandableStringEnum { - /** Static value Enabled for SslEnum. */ + /** + * Static value Enabled for SslEnum. + */ public static final SslEnum ENABLED = fromString("Enabled"); - /** Static value Disabled for SslEnum. */ + /** + * Static value Disabled for SslEnum. + */ public static final SslEnum DISABLED = fromString("Disabled"); /** * Creates a new instance of SslEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SslEnum() { /** * Creates or finds a SslEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding SslEnum. */ @@ -38,7 +44,7 @@ public static SslEnum fromString(String name) { /** * Gets known SslEnum values. - * + * * @return known SslEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Trial.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Trial.java index 31f46a8f1a1e9..d80e79d348d93 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Trial.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Trial.java @@ -1,30 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.resourcemanager.avs.fluent.models.TrialInner; -/** An immutable client-side representation of Trial. */ +/** + * An immutable client-side representation of Trial. + */ public interface Trial { /** * Gets the status property: Trial status. - * + * * @return the status value. */ TrialStatus status(); /** * Gets the availableHosts property: Number of trial hosts available. - * + * * @return the availableHosts value. */ Integer availableHosts(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.TrialInner object. - * + * * @return the inner object. */ TrialInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java index bbc114d25a382..5a566728dc1f9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Trial status. */ +/** + * trial status. + */ public final class TrialStatus extends ExpandableStringEnum { - /** Static value TrialAvailable for TrialStatus. */ + /** + * Static value TrialAvailable for TrialStatus. + */ public static final TrialStatus TRIAL_AVAILABLE = fromString("TrialAvailable"); - /** Static value TrialUsed for TrialStatus. */ + /** + * Static value TrialUsed for TrialStatus. + */ public static final TrialStatus TRIAL_USED = fromString("TrialUsed"); - /** Static value TrialDisabled for TrialStatus. */ + /** + * Static value TrialDisabled for TrialStatus. + */ public static final TrialStatus TRIAL_DISABLED = fromString("TrialDisabled"); /** * Creates a new instance of TrialStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public TrialStatus() { /** * Creates or finds a TrialStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding TrialStatus. */ @@ -41,7 +49,7 @@ public static TrialStatus fromString(String name) { /** * Gets known TrialStatus values. - * + * * @return known TrialStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java index c8e21cb8e8c4e..ffb41b271c1f5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** VM Group status. */ +/** + * VM group status. + */ public final class VMGroupStatusEnum extends ExpandableStringEnum { - /** Static value SUCCESS for VMGroupStatusEnum. */ + /** + * Static value SUCCESS for VMGroupStatusEnum. + */ public static final VMGroupStatusEnum SUCCESS = fromString("SUCCESS"); - /** Static value FAILURE for VMGroupStatusEnum. */ + /** + * Static value FAILURE for VMGroupStatusEnum. + */ public static final VMGroupStatusEnum FAILURE = fromString("FAILURE"); /** * Creates a new instance of VMGroupStatusEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public VMGroupStatusEnum() { /** * Creates or finds a VMGroupStatusEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMGroupStatusEnum. */ @@ -38,7 +44,7 @@ public static VMGroupStatusEnum fromString(String name) { /** * Gets known VMGroupStatusEnum values. - * + * * @return known VMGroupStatusEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java index a0de64a0226be..38753b25edc8f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Virtual machine type. */ +/** + * VM type. + */ public final class VMTypeEnum extends ExpandableStringEnum { - /** Static value REGULAR for VMTypeEnum. */ + /** + * Static value REGULAR for VMTypeEnum. + */ public static final VMTypeEnum REGULAR = fromString("REGULAR"); - /** Static value EDGE for VMTypeEnum. */ + /** + * Static value EDGE for VMTypeEnum. + */ public static final VMTypeEnum EDGE = fromString("EDGE"); - /** Static value SERVICE for VMTypeEnum. */ + /** + * Static value SERVICE for VMTypeEnum. + */ public static final VMTypeEnum SERVICE = fromString("SERVICE"); /** * Creates a new instance of VMTypeEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public VMTypeEnum() { /** * Creates or finds a VMTypeEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMTypeEnum. */ @@ -41,7 +49,7 @@ public static VMTypeEnum fromString(String name) { /** * Gets known VMTypeEnum values. - * + * * @return known VMTypeEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachine.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachine.java index bb487d8048ffd..db76aa997186a 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 @@ -1,65 +1,82 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; -/** An immutable client-side representation of VirtualMachine. */ +/** + * An immutable client-side representation of VirtualMachine. + */ public interface VirtualMachine { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + VirtualMachineProvisioningState provisioningState(); + /** * Gets the displayName property: Display name of the VM. - * + * * @return the displayName value. */ String displayName(); /** * Gets the moRefId property: Virtual machine managed object reference id. - * + * * @return the moRefId value. */ String moRefId(); /** * Gets the folderPath property: Path to virtual machine's folder starting from datacenter virtual machine folder. - * + * * @return the folderPath value. */ String folderPath(); /** * Gets the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @return the restrictMovement value. */ VirtualMachineRestrictMovementState restrictMovement(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner object. - * + * * @return the inner object. */ VirtualMachineInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java new file mode 100644 index 0000000000000..d4f60a80c190e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Virtual Machine provisioning state. + */ +public final class VirtualMachineProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for VirtualMachineProvisioningState. + */ + public static final VirtualMachineProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for VirtualMachineProvisioningState. + */ + public static final VirtualMachineProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for VirtualMachineProvisioningState. + */ + public static final VirtualMachineProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of VirtualMachineProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VirtualMachineProvisioningState() { + } + + /** + * Creates or finds a VirtualMachineProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding VirtualMachineProvisioningState. + */ + @JsonCreator + public static VirtualMachineProvisioningState fromString(String name) { + return fromString(name, VirtualMachineProvisioningState.class); + } + + /** + * Gets known VirtualMachineProvisioningState values. + * + * @return known VirtualMachineProvisioningState values. + */ + public static Collection values() { + return values(VirtualMachineProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java index a5ce9a3337320..634f511bc6319 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Set VM DRS-driven movement to restricted (enabled) or not (disabled). */ +/** + * Set VM DRS-driven movement to restricted (enabled) or not (disabled). + */ @Fluent public final class VirtualMachineRestrictMovement { /* @@ -16,13 +18,15 @@ public final class VirtualMachineRestrictMovement { @JsonProperty(value = "restrictMovement") private VirtualMachineRestrictMovementState restrictMovement; - /** Creates an instance of VirtualMachineRestrictMovement class. */ + /** + * Creates an instance of VirtualMachineRestrictMovement class. + */ public VirtualMachineRestrictMovement() { } /** * Get the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @return the restrictMovement value. */ public VirtualMachineRestrictMovementState restrictMovement() { @@ -31,7 +35,7 @@ public VirtualMachineRestrictMovementState restrictMovement() { /** * Set the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @param restrictMovement the restrictMovement value to set. * @return the VirtualMachineRestrictMovement object itself. */ @@ -42,7 +46,7 @@ public VirtualMachineRestrictMovement withRestrictMovement(VirtualMachineRestric /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java index a67a8a669a8d9..00b4914e15ada 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,18 +8,24 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Whether VM DRS-driven movement is restricted (enabled) or not (disabled). */ +/** + * Virtual Machine Restrict Movement state. + */ public final class VirtualMachineRestrictMovementState extends ExpandableStringEnum { - /** Static value Enabled for VirtualMachineRestrictMovementState. */ + /** + * Static value Enabled for VirtualMachineRestrictMovementState. + */ public static final VirtualMachineRestrictMovementState ENABLED = fromString("Enabled"); - /** Static value Disabled for VirtualMachineRestrictMovementState. */ + /** + * Static value Disabled for VirtualMachineRestrictMovementState. + */ public static final VirtualMachineRestrictMovementState DISABLED = fromString("Disabled"); /** * Creates a new instance of VirtualMachineRestrictMovementState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -28,7 +34,7 @@ public VirtualMachineRestrictMovementState() { /** * Creates or finds a VirtualMachineRestrictMovementState from its string representation. - * + * * @param name a name to look for. * @return the corresponding VirtualMachineRestrictMovementState. */ @@ -39,7 +45,7 @@ public static VirtualMachineRestrictMovementState fromString(String name) { /** * Gets known VirtualMachineRestrictMovementState values. - * + * * @return known VirtualMachineRestrictMovementState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachines.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachines.java index 61d18c347c0e8..d103ab57954c2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,107 +8,96 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of VirtualMachines. */ +/** + * Resource collection API of VirtualMachines. + */ public interface VirtualMachines { /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud cluster along with {@link Response}. + * @return a VirtualMachine along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, Context context); /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual machine by id in a private cloud cluster. + * @return a VirtualMachine. */ VirtualMachine get(String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement); + void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context); + void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachinesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachinesList.java deleted file mode 100644 index f34c01e0b7e1d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachinesList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of Virtual Machines. */ -@Immutable -public final class VirtualMachinesList { - /* - * The items to be displayed on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of VirtualMachinesList class. */ - public VirtualMachinesList() { - } - - /** - * Get the value property: The items to be displayed on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java index 246d630e0b3b3..ad01a3796b127 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Should this parameter be visible to arm and passed in the parameters argument when executing. */ +/** + * Visibility Parameter. + */ public final class VisibilityParameterEnum extends ExpandableStringEnum { - /** Static value Visible for VisibilityParameterEnum. */ + /** + * Static value Visible for VisibilityParameterEnum. + */ public static final VisibilityParameterEnum VISIBLE = fromString("Visible"); - /** Static value Hidden for VisibilityParameterEnum. */ + /** + * Static value Hidden for VisibilityParameterEnum. + */ public static final VisibilityParameterEnum HIDDEN = fromString("Hidden"); /** * Creates a new instance of VisibilityParameterEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public VisibilityParameterEnum() { /** * Creates or finds a VisibilityParameterEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding VisibilityParameterEnum. */ @@ -38,7 +44,7 @@ public static VisibilityParameterEnum fromString(String name) { /** * Gets known VisibilityParameterEnum values. - * + * * @return known VisibilityParameterEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java index 4f878e55ae1d8..4940ba479e9d0 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 @@ -1,21 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** VM-Host placement policy properties. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +/** + * VM-Host placement policy properties. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "type", + defaultImpl = VmHostPlacementPolicyProperties.class, + visible = true) @JsonTypeName("VmHost") @Fluent public final class VmHostPlacementPolicyProperties extends PlacementPolicyProperties { + /* + * Placement Policy type + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private PlacementPolicyType type = PlacementPolicyType.VM_HOST; + /* * Virtual machine members list */ @@ -46,13 +60,25 @@ public final class VmHostPlacementPolicyProperties extends PlacementPolicyProper @JsonProperty(value = "azureHybridBenefitType") private AzureHybridBenefitType azureHybridBenefitType; - /** Creates an instance of VmHostPlacementPolicyProperties class. */ + /** + * Creates an instance of VmHostPlacementPolicyProperties class. + */ public VmHostPlacementPolicyProperties() { } + /** + * Get the type property: Placement Policy type. + * + * @return the type value. + */ + @Override + public PlacementPolicyType type() { + return this.type; + } + /** * Get the vmMembers property: Virtual machine members list. - * + * * @return the vmMembers value. */ public List vmMembers() { @@ -61,7 +87,7 @@ public List vmMembers() { /** * Set the vmMembers property: Virtual machine members list. - * + * * @param vmMembers the vmMembers value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -72,7 +98,7 @@ public VmHostPlacementPolicyProperties withVmMembers(List vmMembers) { /** * Get the hostMembers property: Host members list. - * + * * @return the hostMembers value. */ public List hostMembers() { @@ -81,7 +107,7 @@ public List hostMembers() { /** * Set the hostMembers property: Host members list. - * + * * @param hostMembers the hostMembers value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -92,7 +118,7 @@ public VmHostPlacementPolicyProperties withHostMembers(List hostMembers) /** * Get the affinityType property: placement policy affinity type. - * + * * @return the affinityType value. */ public AffinityType affinityType() { @@ -101,7 +127,7 @@ public AffinityType affinityType() { /** * Set the affinityType property: placement policy affinity type. - * + * * @param affinityType the affinityType value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -112,7 +138,7 @@ public VmHostPlacementPolicyProperties withAffinityType(AffinityType affinityTyp /** * Get the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @return the affinityStrength value. */ public AffinityStrength affinityStrength() { @@ -121,7 +147,7 @@ public AffinityStrength affinityStrength() { /** * Set the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @param affinityStrength the affinityStrength value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -132,7 +158,7 @@ public VmHostPlacementPolicyProperties withAffinityStrength(AffinityStrength aff /** * Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @return the azureHybridBenefitType value. */ public AzureHybridBenefitType azureHybridBenefitType() { @@ -141,7 +167,7 @@ public AzureHybridBenefitType azureHybridBenefitType() { /** * Set the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @param azureHybridBenefitType the azureHybridBenefitType value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -150,14 +176,18 @@ public VmHostPlacementPolicyProperties withAzureHybridBenefitType(AzureHybridBen return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VmHostPlacementPolicyProperties withState(PlacementPolicyState state) { super.withState(state); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VmHostPlacementPolicyProperties withDisplayName(String displayName) { super.withDisplayName(displayName); @@ -166,29 +196,26 @@ public VmHostPlacementPolicyProperties withDisplayName(String displayName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (vmMembers() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property vmMembers in model VmHostPlacementPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property vmMembers in model VmHostPlacementPolicyProperties")); } if (hostMembers() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property hostMembers in model VmHostPlacementPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property hostMembers in model VmHostPlacementPolicyProperties")); } if (affinityType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property affinityType in model VmHostPlacementPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property affinityType in model VmHostPlacementPolicyProperties")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java index 9490841d7fdd3..5a5f6bdc2da73 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 @@ -1,21 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** VM-VM placement policy properties. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +/** + * VM-VM placement policy properties. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "type", + defaultImpl = VmPlacementPolicyProperties.class, + visible = true) @JsonTypeName("VmVm") @Fluent public final class VmPlacementPolicyProperties extends PlacementPolicyProperties { + /* + * Placement Policy type + */ + @JsonTypeId + @JsonProperty(value = "type", required = true) + private PlacementPolicyType type = PlacementPolicyType.VM_VM; + /* * Virtual machine members list */ @@ -28,13 +42,25 @@ public final class VmPlacementPolicyProperties extends PlacementPolicyProperties @JsonProperty(value = "affinityType", required = true) private AffinityType affinityType; - /** Creates an instance of VmPlacementPolicyProperties class. */ + /** + * Creates an instance of VmPlacementPolicyProperties class. + */ public VmPlacementPolicyProperties() { } + /** + * Get the type property: Placement Policy type. + * + * @return the type value. + */ + @Override + public PlacementPolicyType type() { + return this.type; + } + /** * Get the vmMembers property: Virtual machine members list. - * + * * @return the vmMembers value. */ public List vmMembers() { @@ -43,7 +69,7 @@ public List vmMembers() { /** * Set the vmMembers property: Virtual machine members list. - * + * * @param vmMembers the vmMembers value to set. * @return the VmPlacementPolicyProperties object itself. */ @@ -54,7 +80,7 @@ public VmPlacementPolicyProperties withVmMembers(List vmMembers) { /** * Get the affinityType property: placement policy affinity type. - * + * * @return the affinityType value. */ public AffinityType affinityType() { @@ -63,7 +89,7 @@ public AffinityType affinityType() { /** * Set the affinityType property: placement policy affinity type. - * + * * @param affinityType the affinityType value to set. * @return the VmPlacementPolicyProperties object itself. */ @@ -72,14 +98,18 @@ public VmPlacementPolicyProperties withAffinityType(AffinityType affinityType) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VmPlacementPolicyProperties withState(PlacementPolicyState state) { super.withState(state); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VmPlacementPolicyProperties withDisplayName(String displayName) { super.withDisplayName(displayName); @@ -88,23 +118,21 @@ public VmPlacementPolicyProperties withDisplayName(String displayName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (vmMembers() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property vmMembers in model VmPlacementPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property vmMembers in model VmPlacementPolicyProperties")); } if (affinityType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property affinityType in model VmPlacementPolicyProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property affinityType in model VmPlacementPolicyProperties")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java index 6a1f5adc5c2e6..81b07270a4ff2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java @@ -1,37 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; -/** An immutable client-side representation of WorkloadNetwork. */ +/** + * An immutable client-side representation of WorkloadNetwork. + */ public interface WorkloadNetwork { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + WorkloadNetworkProvisioningState provisioningState(); + /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner object. - * + * * @return the inner object. */ WorkloadNetworkInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java index 36c0a603a04c3..c24855c3a6c02 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java @@ -1,72 +1,90 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDhcpInner; -/** An immutable client-side representation of WorkloadNetworkDhcp. */ +/** + * An immutable client-side representation of WorkloadNetworkDhcp. + */ public interface WorkloadNetworkDhcp { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the properties property: DHCP properties. - * + * Gets the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ WorkloadNetworkDhcpEntity properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner object. - * + * * @return the inner object. */ WorkloadNetworkDhcpInner innerModel(); - /** The entirety of the WorkloadNetworkDhcp definition. */ + /** + * The entirety of the WorkloadNetworkDhcp definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkDhcp definition stages. */ + /** + * The WorkloadNetworkDhcp definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkDhcp definition. */ + /** + * The first stage of the WorkloadNetworkDhcp definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkDhcp definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkDhcp definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -81,26 +99,28 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkDhcp create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkDhcp create(Context context); } - /** The stage of the WorkloadNetworkDhcp definition allowing to specify properties. */ + /** + * The stage of the WorkloadNetworkDhcp definition allowing to specify properties. + */ interface WithProperties { /** - * Specifies the properties property: DHCP properties.. - * - * @param properties DHCP properties. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ WithCreate withProperties(WorkloadNetworkDhcpEntity properties); @@ -109,37 +129,43 @@ interface WithProperties { /** * Begins update for the WorkloadNetworkDhcp resource. - * + * * @return the stage of resource update. */ WorkloadNetworkDhcp.Update update(); - /** The template for WorkloadNetworkDhcp update. */ + /** + * The template for WorkloadNetworkDhcp update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkDhcp apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkDhcp apply(Context context); } - /** The WorkloadNetworkDhcp update stages. */ + /** + * The WorkloadNetworkDhcp update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkDhcp update allowing to specify properties. */ + /** + * The stage of the WorkloadNetworkDhcp update allowing to specify properties. + */ interface WithProperties { /** - * Specifies the properties property: DHCP properties.. - * - * @param properties DHCP properties. + * Specifies the properties property: The updatable properties of a DHCP update. + * + * @param properties The updatable properties of a DHCP update. * @return the next definition stage. */ Update withProperties(WorkloadNetworkDhcpEntity properties); @@ -148,14 +174,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkDhcp refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpConfigurations.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpConfigurations.java new file mode 100644 index 0000000000000..ab91bfb74d49c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpConfigurations.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDhcpConfigurations. + */ +public interface WorkloadNetworkDhcpConfigurations { + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String dhcpId, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp. + */ + WorkloadNetworkDhcp get(String resourceGroupName, String dhcpId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String privateCloudName, String dhcpId); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String privateCloudName, String dhcpId, Context context); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + WorkloadNetworkDhcp getById(String id); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkloadNetworkDhcp resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkDhcp definition. + */ + WorkloadNetworkDhcp.DefinitionStages.Blank define(String name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java index 3a4d30859f4e7..22fb1757745e3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java @@ -1,29 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to inherit from. */ +/** + * Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to + * inherit from. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, property = "dhcpType", - defaultImpl = WorkloadNetworkDhcpEntity.class) + defaultImpl = WorkloadNetworkDhcpEntity.class, + visible = true) @JsonTypeName("WorkloadNetworkDhcpEntity") @JsonSubTypes({ @JsonSubTypes.Type(name = "SERVER", value = WorkloadNetworkDhcpServer.class), - @JsonSubTypes.Type(name = "RELAY", value = WorkloadNetworkDhcpRelay.class) -}) + @JsonSubTypes.Type(name = "RELAY", value = WorkloadNetworkDhcpRelay.class) }) @Fluent public class WorkloadNetworkDhcpEntity { + /* + * Type of DHCP: SERVER or RELAY. + */ + @JsonTypeId + @JsonProperty(value = "dhcpType", required = true) + private DhcpTypeEnum dhcpType = DhcpTypeEnum.fromString("WorkloadNetworkDhcpEntity"); + /* * Display name of the DHCP entity. */ @@ -48,13 +58,24 @@ public class WorkloadNetworkDhcpEntity { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkDhcpEntity class. */ + /** + * Creates an instance of WorkloadNetworkDhcpEntity class. + */ public WorkloadNetworkDhcpEntity() { } + /** + * Get the dhcpType property: Type of DHCP: SERVER or RELAY. + * + * @return the dhcpType value. + */ + public DhcpTypeEnum dhcpType() { + return this.dhcpType; + } + /** * Get the displayName property: Display name of the DHCP entity. - * + * * @return the displayName value. */ public String displayName() { @@ -63,7 +84,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DHCP entity. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDhcpEntity object itself. */ @@ -74,7 +95,7 @@ public WorkloadNetworkDhcpEntity withDisplayName(String displayName) { /** * Get the segments property: NSX Segments consuming DHCP. - * + * * @return the segments value. */ public List segments() { @@ -83,7 +104,7 @@ public List segments() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDhcpProvisioningState provisioningState() { @@ -92,7 +113,7 @@ public WorkloadNetworkDhcpProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -101,7 +122,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDhcpEntity object itself. */ @@ -112,7 +133,7 @@ public WorkloadNetworkDhcpEntity withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpList.java deleted file mode 100644 index 5a8c6027a8ad6..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX dhcp entities. */ -@Immutable -public final class WorkloadNetworkDhcpList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkDhcpList class. */ - public WorkloadNetworkDhcpList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java index 012ad2dad9203..c7e1621043935 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network DHCP provisioning state. + */ public final class WorkloadNetworkDhcpProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkDhcpProvisioningState. + */ + public static final WorkloadNetworkDhcpProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkDhcpProvisioningState. */ - public static final WorkloadNetworkDhcpProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkDhcpProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkDhcpProvisioningState() { /** * Creates or finds a WorkloadNetworkDhcpProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkDhcpProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkDhcpProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkDhcpProvisioningState values. - * + * * @return known WorkloadNetworkDhcpProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java index 237b520ca080e..e25017fa7a0f7 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 @@ -1,33 +1,59 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** NSX DHCP Relay. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType") +/** + * NSX DHCP Relay. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "dhcpType", + defaultImpl = WorkloadNetworkDhcpRelay.class, + visible = true) @JsonTypeName("RELAY") @Fluent public final class WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { + /* + * Type of DHCP: SERVER or RELAY. + */ + @JsonTypeId + @JsonProperty(value = "dhcpType", required = true) + private DhcpTypeEnum dhcpType = DhcpTypeEnum.RELAY; + /* * DHCP Relay Addresses. Max 3. */ @JsonProperty(value = "serverAddresses") private List serverAddresses; - /** Creates an instance of WorkloadNetworkDhcpRelay class. */ + /** + * Creates an instance of WorkloadNetworkDhcpRelay class. + */ public WorkloadNetworkDhcpRelay() { } + /** + * Get the dhcpType property: Type of DHCP: SERVER or RELAY. + * + * @return the dhcpType value. + */ + @Override + public DhcpTypeEnum dhcpType() { + return this.dhcpType; + } + /** * Get the serverAddresses property: DHCP Relay Addresses. Max 3. - * + * * @return the serverAddresses value. */ public List serverAddresses() { @@ -36,7 +62,7 @@ public List serverAddresses() { /** * Set the serverAddresses property: DHCP Relay Addresses. Max 3. - * + * * @param serverAddresses the serverAddresses value to set. * @return the WorkloadNetworkDhcpRelay object itself. */ @@ -45,14 +71,18 @@ public WorkloadNetworkDhcpRelay withServerAddresses(List serverAddresses return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkloadNetworkDhcpRelay withDisplayName(String displayName) { super.withDisplayName(displayName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkloadNetworkDhcpRelay withRevision(Long revision) { super.withRevision(revision); @@ -61,7 +91,7 @@ public WorkloadNetworkDhcpRelay withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java index b4a427a995f4c..21563ebe97ea3 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 @@ -1,19 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** NSX DHCP Server. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType") +/** + * NSX DHCP Server. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "dhcpType", + defaultImpl = WorkloadNetworkDhcpServer.class, + visible = true) @JsonTypeName("SERVER") @Fluent public final class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { + /* + * Type of DHCP: SERVER or RELAY. + */ + @JsonTypeId + @JsonProperty(value = "dhcpType", required = true) + private DhcpTypeEnum dhcpType = DhcpTypeEnum.SERVER; + /* * DHCP Server Address. */ @@ -24,15 +38,27 @@ public final class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { * DHCP Server Lease Time. */ @JsonProperty(value = "leaseTime") - private Long leaseTime; + private Integer leaseTime; - /** Creates an instance of WorkloadNetworkDhcpServer class. */ + /** + * Creates an instance of WorkloadNetworkDhcpServer class. + */ public WorkloadNetworkDhcpServer() { } + /** + * Get the dhcpType property: Type of DHCP: SERVER or RELAY. + * + * @return the dhcpType value. + */ + @Override + public DhcpTypeEnum dhcpType() { + return this.dhcpType; + } + /** * Get the serverAddress property: DHCP Server Address. - * + * * @return the serverAddress value. */ public String serverAddress() { @@ -41,7 +67,7 @@ public String serverAddress() { /** * Set the serverAddress property: DHCP Server Address. - * + * * @param serverAddress the serverAddress value to set. * @return the WorkloadNetworkDhcpServer object itself. */ @@ -52,32 +78,36 @@ public WorkloadNetworkDhcpServer withServerAddress(String serverAddress) { /** * Get the leaseTime property: DHCP Server Lease Time. - * + * * @return the leaseTime value. */ - public Long leaseTime() { + public Integer leaseTime() { return this.leaseTime; } /** * Set the leaseTime property: DHCP Server Lease Time. - * + * * @param leaseTime the leaseTime value to set. * @return the WorkloadNetworkDhcpServer object itself. */ - public WorkloadNetworkDhcpServer withLeaseTime(Long leaseTime) { + public WorkloadNetworkDhcpServer withLeaseTime(Integer leaseTime) { this.leaseTime = leaseTime; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkloadNetworkDhcpServer withDisplayName(String displayName) { super.withDisplayName(displayName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkloadNetworkDhcpServer withRevision(Long revision) { super.withRevision(revision); @@ -86,7 +116,7 @@ public WorkloadNetworkDhcpServer withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpUpdate.java new file mode 100644 index 0000000000000..4a911a453421e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpUpdate.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * NSX DHCP update. + */ +@Fluent +public final class WorkloadNetworkDhcpUpdate { + /* + * The updatable properties of a DHCP update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkDhcpEntity properties; + + /** + * Creates an instance of WorkloadNetworkDhcpUpdate class. + */ + public WorkloadNetworkDhcpUpdate() { + } + + /** + * Get the properties property: The updatable properties of a DHCP update. + * + * @return the properties value. + */ + public WorkloadNetworkDhcpEntity properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of a DHCP update. + * + * @param properties the properties value to set. + * @return the WorkloadNetworkDhcpUpdate object itself. + */ + public WorkloadNetworkDhcpUpdate withProperties(WorkloadNetworkDhcpEntity properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java index 9cd9d96344a91..02b5b76dac316 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java @@ -1,122 +1,140 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsServiceInner; import java.util.List; -/** An immutable client-side representation of WorkloadNetworkDnsService. */ +/** + * An immutable client-side representation of WorkloadNetworkDnsService. + */ public interface WorkloadNetworkDnsService { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the DNS Service. - * + * * @return the displayName value. */ String displayName(); /** * Gets the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @return the dnsServiceIp value. */ String dnsServiceIp(); /** * Gets the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @return the defaultDnsZone value. */ String defaultDnsZone(); /** * Gets the fqdnZones property: FQDN zones of the DNS Service. - * + * * @return the fqdnZones value. */ List fqdnZones(); /** * Gets the logLevel property: DNS Service log level. - * + * * @return the logLevel value. */ DnsServiceLogLevelEnum logLevel(); /** * Gets the status property: DNS Service status. - * + * * @return the status value. */ DnsServiceStatusEnum status(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkDnsServiceProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner object. - * + * * @return the inner object. */ WorkloadNetworkDnsServiceInner innerModel(); - /** The entirety of the WorkloadNetworkDnsService definition. */ + /** + * The entirety of the WorkloadNetworkDnsService definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkDnsService definition stages. */ + /** + * The WorkloadNetworkDnsService definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkDnsService definition. */ + /** + * The first stage of the WorkloadNetworkDnsService definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -128,89 +146,97 @@ interface WithParentResource { * The stage of the WorkloadNetworkDnsService definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithDisplayName, - DefinitionStages.WithDnsServiceIp, - DefinitionStages.WithDefaultDnsZone, - DefinitionStages.WithFqdnZones, - DefinitionStages.WithLogLevel, - DefinitionStages.WithRevision { + interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithDnsServiceIp, + DefinitionStages.WithDefaultDnsZone, DefinitionStages.WithFqdnZones, DefinitionStages.WithLogLevel, + DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkDnsService create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkDnsService create(Context context); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the DNS Service.. - * + * * @param displayName Display name of the DNS Service. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify dnsServiceIp. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify dnsServiceIp. + */ interface WithDnsServiceIp { /** * Specifies the dnsServiceIp property: DNS service IP of the DNS Service.. - * + * * @param dnsServiceIp DNS service IP of the DNS Service. * @return the next definition stage. */ WithCreate withDnsServiceIp(String dnsServiceIp); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify defaultDnsZone. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify defaultDnsZone. + */ interface WithDefaultDnsZone { /** * Specifies the defaultDnsZone property: Default DNS zone of the DNS Service.. - * + * * @param defaultDnsZone Default DNS zone of the DNS Service. * @return the next definition stage. */ WithCreate withDefaultDnsZone(String defaultDnsZone); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify fqdnZones. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify fqdnZones. + */ interface WithFqdnZones { /** * Specifies the fqdnZones property: FQDN zones of the DNS Service.. - * + * * @param fqdnZones FQDN zones of the DNS Service. * @return the next definition stage. */ WithCreate withFqdnZones(List fqdnZones); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify logLevel. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify logLevel. + */ interface WithLogLevel { /** * Specifies the logLevel property: DNS Service log level.. - * + * * @param logLevel DNS Service log level. * @return the next definition stage. */ WithCreate withLogLevel(DnsServiceLogLevelEnum logLevel); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -220,97 +246,109 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkDnsService resource. - * + * * @return the stage of resource update. */ WorkloadNetworkDnsService.Update update(); - /** The template for WorkloadNetworkDnsService update. */ + /** + * The template for WorkloadNetworkDnsService update. + */ interface Update - extends UpdateStages.WithDisplayName, - UpdateStages.WithDnsServiceIp, - UpdateStages.WithDefaultDnsZone, - UpdateStages.WithFqdnZones, - UpdateStages.WithLogLevel, - UpdateStages.WithRevision { + extends UpdateStages.WithDisplayName, UpdateStages.WithDnsServiceIp, UpdateStages.WithDefaultDnsZone, + UpdateStages.WithFqdnZones, UpdateStages.WithLogLevel, UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkDnsService apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkDnsService apply(Context context); } - /** The WorkloadNetworkDnsService update stages. */ + /** + * The WorkloadNetworkDnsService update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkDnsService update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the DNS Service.. - * + * * @param displayName Display name of the DNS Service. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify dnsServiceIp. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify dnsServiceIp. + */ interface WithDnsServiceIp { /** * Specifies the dnsServiceIp property: DNS service IP of the DNS Service.. - * + * * @param dnsServiceIp DNS service IP of the DNS Service. * @return the next definition stage. */ Update withDnsServiceIp(String dnsServiceIp); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify defaultDnsZone. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify defaultDnsZone. + */ interface WithDefaultDnsZone { /** * Specifies the defaultDnsZone property: Default DNS zone of the DNS Service.. - * + * * @param defaultDnsZone Default DNS zone of the DNS Service. * @return the next definition stage. */ Update withDefaultDnsZone(String defaultDnsZone); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify fqdnZones. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify fqdnZones. + */ interface WithFqdnZones { /** * Specifies the fqdnZones property: FQDN zones of the DNS Service.. - * + * * @param fqdnZones FQDN zones of the DNS Service. * @return the next definition stage. */ Update withFqdnZones(List fqdnZones); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify logLevel. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify logLevel. + */ interface WithLogLevel { /** * Specifies the logLevel property: DNS Service log level.. - * + * * @param logLevel DNS Service log level. * @return the next definition stage. */ Update withLogLevel(DnsServiceLogLevelEnum logLevel); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -320,14 +358,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkDnsService refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java index 8f73e6ad277c6..ea2625c86c83a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network DNS Service provisioning state. + */ public final class WorkloadNetworkDnsServiceProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkDnsServiceProvisioningState. + */ + public static final WorkloadNetworkDnsServiceProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkDnsServiceProvisioningState. */ - public static final WorkloadNetworkDnsServiceProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkDnsServiceProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkDnsServiceProvisioningState() { /** * Creates or finds a WorkloadNetworkDnsServiceProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkDnsServiceProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkDnsServiceProvisioningState fromString(String name) /** * Gets known WorkloadNetworkDnsServiceProvisioningState values. - * + * * @return known WorkloadNetworkDnsServiceProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceUpdate.java new file mode 100644 index 0000000000000..7a48ea4882958 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceUpdate.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * NSX DNS Service update. + */ +@Fluent +public final class WorkloadNetworkDnsServiceUpdate { + /* + * The updatable properties of a DNS Service update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkDnsServiceProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkDnsServiceUpdate class. + */ + public WorkloadNetworkDnsServiceUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a DNS Service update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkDnsServiceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the DNS Service. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the DNS Service. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the dnsServiceIp property: DNS service IP of the DNS Service. + * + * @return the dnsServiceIp value. + */ + public String dnsServiceIp() { + return this.innerProperties() == null ? null : this.innerProperties().dnsServiceIp(); + } + + /** + * Set the dnsServiceIp property: DNS service IP of the DNS Service. + * + * @param dnsServiceIp the dnsServiceIp value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withDnsServiceIp(String dnsServiceIp) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withDnsServiceIp(dnsServiceIp); + return this; + } + + /** + * Get the defaultDnsZone property: Default DNS zone of the DNS Service. + * + * @return the defaultDnsZone value. + */ + public String defaultDnsZone() { + return this.innerProperties() == null ? null : this.innerProperties().defaultDnsZone(); + } + + /** + * Set the defaultDnsZone property: Default DNS zone of the DNS Service. + * + * @param defaultDnsZone the defaultDnsZone value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withDefaultDnsZone(String defaultDnsZone) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withDefaultDnsZone(defaultDnsZone); + return this; + } + + /** + * Get the fqdnZones property: FQDN zones of the DNS Service. + * + * @return the fqdnZones value. + */ + public List fqdnZones() { + return this.innerProperties() == null ? null : this.innerProperties().fqdnZones(); + } + + /** + * Set the fqdnZones property: FQDN zones of the DNS Service. + * + * @param fqdnZones the fqdnZones value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withFqdnZones(List fqdnZones) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withFqdnZones(fqdnZones); + return this; + } + + /** + * Get the logLevel property: DNS Service log level. + * + * @return the logLevel value. + */ + public DnsServiceLogLevelEnum logLevel() { + return this.innerProperties() == null ? null : this.innerProperties().logLevel(); + } + + /** + * Set the logLevel property: DNS Service log level. + * + * @param logLevel the logLevel value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withLogLevel(DnsServiceLogLevelEnum logLevel) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withLogLevel(logLevel); + return this; + } + + /** + * Get the status property: DNS Service status. + * + * @return the status value. + */ + public DnsServiceStatusEnum status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkDnsServiceProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServices.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServices.java new file mode 100644 index 0000000000000..dd6e9b28839cb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServices.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsServices. + */ +public interface WorkloadNetworkDnsServices { + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String dnsServiceId, Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService. + */ + WorkloadNetworkDnsService get(String resourceGroupName, String privateCloudName, String dnsServiceId); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 dnsServiceId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 dnsServiceId, String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + WorkloadNetworkDnsService getById(String id); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkloadNetworkDnsService resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkDnsService definition. + */ + WorkloadNetworkDnsService.DefinitionStages.Blank define(String name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServicesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServicesList.java deleted file mode 100644 index 48c08fb3ff514..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServicesList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX DNS Services. */ -@Immutable -public final class WorkloadNetworkDnsServicesList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkDnsServicesList class. */ - public WorkloadNetworkDnsServicesList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java index dbfb3bd569fe6..842996c790b08 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java @@ -1,115 +1,133 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsZoneInner; import java.util.List; -/** An immutable client-side representation of WorkloadNetworkDnsZone. */ +/** + * An immutable client-side representation of WorkloadNetworkDnsZone. + */ public interface WorkloadNetworkDnsZone { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the DNS Zone. - * + * * @return the displayName value. */ String displayName(); /** * Gets the domain property: Domain names of the DNS Zone. - * + * * @return the domain value. */ List domain(); /** * Gets the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @return the dnsServerIps value. */ List dnsServerIps(); /** * Gets the sourceIp property: Source IP of the DNS Zone. - * + * * @return the sourceIp value. */ String sourceIp(); /** * Gets the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @return the dnsServices value. */ - Long dnsServices(); + Integer dnsServices(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkDnsZoneProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner object. - * + * * @return the inner object. */ WorkloadNetworkDnsZoneInner innerModel(); - /** The entirety of the WorkloadNetworkDnsZone definition. */ + /** + * The entirety of the WorkloadNetworkDnsZone definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkDnsZone definition stages. */ + /** + * The WorkloadNetworkDnsZone definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkDnsZone definition. */ + /** + * The first stage of the WorkloadNetworkDnsZone definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -122,88 +140,96 @@ interface WithParentResource { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithDisplayName, - DefinitionStages.WithDomain, - DefinitionStages.WithDnsServerIps, - DefinitionStages.WithSourceIp, - DefinitionStages.WithDnsServices, - DefinitionStages.WithRevision { + extends DefinitionStages.WithDisplayName, DefinitionStages.WithDomain, DefinitionStages.WithDnsServerIps, + DefinitionStages.WithSourceIp, DefinitionStages.WithDnsServices, DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkDnsZone create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkDnsZone create(Context context); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the DNS Zone.. - * + * * @param displayName Display name of the DNS Zone. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify domain. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify domain. + */ interface WithDomain { /** * Specifies the domain property: Domain names of the DNS Zone.. - * + * * @param domain Domain names of the DNS Zone. * @return the next definition stage. */ WithCreate withDomain(List domain); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify dnsServerIps. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify dnsServerIps. + */ interface WithDnsServerIps { /** * Specifies the dnsServerIps property: DNS Server IP array of the DNS Zone.. - * + * * @param dnsServerIps DNS Server IP array of the DNS Zone. * @return the next definition stage. */ WithCreate withDnsServerIps(List dnsServerIps); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify sourceIp. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify sourceIp. + */ interface WithSourceIp { /** * Specifies the sourceIp property: Source IP of the DNS Zone.. - * + * * @param sourceIp Source IP of the DNS Zone. * @return the next definition stage. */ WithCreate withSourceIp(String sourceIp); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify dnsServices. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify dnsServices. + */ interface WithDnsServices { /** * Specifies the dnsServices property: Number of DNS Services using the DNS zone.. - * + * * @param dnsServices Number of DNS Services using the DNS zone. * @return the next definition stage. */ - WithCreate withDnsServices(Long dnsServices); + WithCreate withDnsServices(Integer dnsServices); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -213,97 +239,108 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkDnsZone resource. - * + * * @return the stage of resource update. */ WorkloadNetworkDnsZone.Update update(); - /** The template for WorkloadNetworkDnsZone update. */ - interface Update - extends UpdateStages.WithDisplayName, - UpdateStages.WithDomain, - UpdateStages.WithDnsServerIps, - UpdateStages.WithSourceIp, - UpdateStages.WithDnsServices, - UpdateStages.WithRevision { + /** + * The template for WorkloadNetworkDnsZone update. + */ + interface Update extends UpdateStages.WithDisplayName, UpdateStages.WithDomain, UpdateStages.WithDnsServerIps, + UpdateStages.WithSourceIp, UpdateStages.WithDnsServices, UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkDnsZone apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkDnsZone apply(Context context); } - /** The WorkloadNetworkDnsZone update stages. */ + /** + * The WorkloadNetworkDnsZone update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkDnsZone update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the DNS Zone.. - * + * * @param displayName Display name of the DNS Zone. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify domain. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify domain. + */ interface WithDomain { /** * Specifies the domain property: Domain names of the DNS Zone.. - * + * * @param domain Domain names of the DNS Zone. * @return the next definition stage. */ Update withDomain(List domain); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify dnsServerIps. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify dnsServerIps. + */ interface WithDnsServerIps { /** * Specifies the dnsServerIps property: DNS Server IP array of the DNS Zone.. - * + * * @param dnsServerIps DNS Server IP array of the DNS Zone. * @return the next definition stage. */ Update withDnsServerIps(List dnsServerIps); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify sourceIp. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify sourceIp. + */ interface WithSourceIp { /** * Specifies the sourceIp property: Source IP of the DNS Zone.. - * + * * @param sourceIp Source IP of the DNS Zone. * @return the next definition stage. */ Update withSourceIp(String sourceIp); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify dnsServices. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify dnsServices. + */ interface WithDnsServices { /** * Specifies the dnsServices property: Number of DNS Services using the DNS zone.. - * + * * @param dnsServices Number of DNS Services using the DNS zone. * @return the next definition stage. */ - Update withDnsServices(Long dnsServices); + Update withDnsServices(Integer dnsServices); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -313,14 +350,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkDnsZone refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java index 08edc90378dde..4e85529ce7451 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network DNS Zone provisioning state. + */ public final class WorkloadNetworkDnsZoneProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkDnsZoneProvisioningState. + */ + public static final WorkloadNetworkDnsZoneProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkDnsZoneProvisioningState. */ - public static final WorkloadNetworkDnsZoneProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkDnsZoneProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkDnsZoneProvisioningState() { /** * Creates or finds a WorkloadNetworkDnsZoneProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkDnsZoneProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkDnsZoneProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkDnsZoneProvisioningState values. - * + * * @return known WorkloadNetworkDnsZoneProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneUpdate.java new file mode 100644 index 0000000000000..728cc884e765d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneUpdate.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * NSX DNS Zone update. + */ +@Fluent +public final class WorkloadNetworkDnsZoneUpdate { + /* + * The updatable properties of a DNS Zone update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkDnsZoneProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkDnsZoneUpdate class. + */ + public WorkloadNetworkDnsZoneUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a DNS Zone update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkDnsZoneProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the DNS Zone. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the DNS Zone. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the domain property: Domain names of the DNS Zone. + * + * @return the domain value. + */ + public List domain() { + return this.innerProperties() == null ? null : this.innerProperties().domain(); + } + + /** + * Set the domain property: Domain names of the DNS Zone. + * + * @param domain the domain value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withDomain(List domain) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withDomain(domain); + return this; + } + + /** + * Get the dnsServerIps property: DNS Server IP array of the DNS Zone. + * + * @return the dnsServerIps value. + */ + public List dnsServerIps() { + return this.innerProperties() == null ? null : this.innerProperties().dnsServerIps(); + } + + /** + * Set the dnsServerIps property: DNS Server IP array of the DNS Zone. + * + * @param dnsServerIps the dnsServerIps value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withDnsServerIps(List dnsServerIps) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withDnsServerIps(dnsServerIps); + return this; + } + + /** + * Get the sourceIp property: Source IP of the DNS Zone. + * + * @return the sourceIp value. + */ + public String sourceIp() { + return this.innerProperties() == null ? null : this.innerProperties().sourceIp(); + } + + /** + * Set the sourceIp property: Source IP of the DNS Zone. + * + * @param sourceIp the sourceIp value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withSourceIp(String sourceIp) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withSourceIp(sourceIp); + return this; + } + + /** + * Get the dnsServices property: Number of DNS Services using the DNS zone. + * + * @return the dnsServices value. + */ + public Integer dnsServices() { + return this.innerProperties() == null ? null : this.innerProperties().dnsServices(); + } + + /** + * Set the dnsServices property: Number of DNS Services using the DNS zone. + * + * @param dnsServices the dnsServices value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withDnsServices(Integer dnsServices) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withDnsServices(dnsServices); + return this; + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkDnsZoneProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZones.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZones.java new file mode 100644 index 0000000000000..f24e1c15ebd0c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZones.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsZones. + */ +public interface WorkloadNetworkDnsZones { + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String dnsZoneId, Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone. + */ + WorkloadNetworkDnsZone get(String resourceGroupName, String privateCloudName, String dnsZoneId); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String dnsZoneId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + WorkloadNetworkDnsZone getById(String id); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkloadNetworkDnsZone resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkDnsZone definition. + */ + WorkloadNetworkDnsZone.DefinitionStages.Blank define(String name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZonesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZonesList.java deleted file mode 100644 index eae0312f71d53..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZonesList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX DNS Zones. */ -@Immutable -public final class WorkloadNetworkDnsZonesList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkDnsZonesList class. */ - public WorkloadNetworkDnsZonesList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java index c65b3101945e8..8c1dc832c9cf2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java @@ -1,51 +1,68 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; -/** An immutable client-side representation of WorkloadNetworkGateway. */ +/** + * An immutable client-side representation of WorkloadNetworkGateway. + */ public interface WorkloadNetworkGateway { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + WorkloadNetworkProvisioningState provisioningState(); + /** * Gets the displayName property: Display name of the DHCP entity. - * + * * @return the displayName value. */ String displayName(); /** * Gets the path property: NSX Gateway Path. - * + * * @return the path value. */ String path(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner object. - * + * * @return the inner object. */ WorkloadNetworkGatewayInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayList.java deleted file mode 100644 index 8a4d22638ed14..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Gateways. */ -@Immutable -public final class WorkloadNetworkGatewayList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkGatewayList class. */ - public WorkloadNetworkGatewayList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateways.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateways.java new file mode 100644 index 0000000000000..8f2044fa023d4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateways.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkGateways. + */ +public interface WorkloadNetworkGateways { + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String gatewayId, Context context); + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway. + */ + WorkloadNetworkGateway get(String resourceGroupName, String privateCloudName, String gatewayId); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkList.java deleted file mode 100644 index dfeea962626ce..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of workload networks. */ -@Immutable -public final class WorkloadNetworkList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkList class. */ - public WorkloadNetworkList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkName.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkName.java deleted file mode 100644 index 34ce7436ab362..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkName.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for WorkloadNetworkName. */ -public final class WorkloadNetworkName extends ExpandableStringEnum { - /** Static value default for WorkloadNetworkName. */ - public static final WorkloadNetworkName DEFAULT = fromString("default"); - - /** - * Creates a new instance of WorkloadNetworkName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WorkloadNetworkName() { - } - - /** - * Creates or finds a WorkloadNetworkName from its string representation. - * - * @param name a name to look for. - * @return the corresponding WorkloadNetworkName. - */ - @JsonCreator - public static WorkloadNetworkName fromString(String name) { - return fromString(name, WorkloadNetworkName.class); - } - - /** - * Gets known WorkloadNetworkName values. - * - * @return known WorkloadNetworkName values. - */ - public static Collection values() { - return values(WorkloadNetworkName.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java index 7ebb0f556d94c..e9fe2eadd5cd2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java @@ -1,114 +1,132 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPortMirroringInner; -/** An immutable client-side representation of WorkloadNetworkPortMirroring. */ +/** + * An immutable client-side representation of WorkloadNetworkPortMirroring. + */ public interface WorkloadNetworkPortMirroring { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the port mirroring profile. - * + * * @return the displayName value. */ String displayName(); /** * Gets the direction property: Direction of port mirroring profile. - * + * * @return the direction value. */ PortMirroringDirectionEnum direction(); /** * Gets the source property: Source VM Group. - * + * * @return the source value. */ String source(); /** * Gets the destination property: Destination VM Group. - * + * * @return the destination value. */ String destination(); /** * Gets the status property: Port Mirroring Status. - * + * * @return the status value. */ PortMirroringStatusEnum status(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkPortMirroringProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner object. - * + * * @return the inner object. */ WorkloadNetworkPortMirroringInner innerModel(); - /** The entirety of the WorkloadNetworkPortMirroring definition. */ + /** + * The entirety of the WorkloadNetworkPortMirroring definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkPortMirroring definition stages. */ + /** + * The WorkloadNetworkPortMirroring definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkPortMirroring definition. */ + /** + * The first stage of the WorkloadNetworkPortMirroring definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -120,77 +138,83 @@ interface WithParentResource { * The stage of the WorkloadNetworkPortMirroring definition which contains all the minimum required properties * for the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithDisplayName, - DefinitionStages.WithDirection, - DefinitionStages.WithSource, - DefinitionStages.WithDestination, - DefinitionStages.WithRevision { + interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithDirection, + DefinitionStages.WithSource, DefinitionStages.WithDestination, DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkPortMirroring create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkPortMirroring create(Context context); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the port mirroring profile.. - * + * * @param displayName Display name of the port mirroring profile. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify direction. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify direction. + */ interface WithDirection { /** * Specifies the direction property: Direction of port mirroring profile.. - * + * * @param direction Direction of port mirroring profile. * @return the next definition stage. */ WithCreate withDirection(PortMirroringDirectionEnum direction); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify source. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify source. + */ interface WithSource { /** * Specifies the source property: Source VM Group.. - * + * * @param source Source VM Group. * @return the next definition stage. */ WithCreate withSource(String source); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify destination. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify destination. + */ interface WithDestination { /** * Specifies the destination property: Destination VM Group.. - * + * * @param destination Destination VM Group. * @return the next definition stage. */ WithCreate withDestination(String destination); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -200,85 +224,95 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkPortMirroring resource. - * + * * @return the stage of resource update. */ WorkloadNetworkPortMirroring.Update update(); - /** The template for WorkloadNetworkPortMirroring update. */ - interface Update - extends UpdateStages.WithDisplayName, - UpdateStages.WithDirection, - UpdateStages.WithSource, - UpdateStages.WithDestination, - UpdateStages.WithRevision { + /** + * The template for WorkloadNetworkPortMirroring update. + */ + interface Update extends UpdateStages.WithDisplayName, UpdateStages.WithDirection, UpdateStages.WithSource, + UpdateStages.WithDestination, UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkPortMirroring apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkPortMirroring apply(Context context); } - /** The WorkloadNetworkPortMirroring update stages. */ + /** + * The WorkloadNetworkPortMirroring update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the port mirroring profile.. - * + * * @param displayName Display name of the port mirroring profile. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify direction. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify direction. + */ interface WithDirection { /** * Specifies the direction property: Direction of port mirroring profile.. - * + * * @param direction Direction of port mirroring profile. * @return the next definition stage. */ Update withDirection(PortMirroringDirectionEnum direction); } - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify source. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify source. + */ interface WithSource { /** * Specifies the source property: Source VM Group.. - * + * * @param source Source VM Group. * @return the next definition stage. */ Update withSource(String source); } - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify destination. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify destination. + */ interface WithDestination { /** * Specifies the destination property: Destination VM Group.. - * + * * @param destination Destination VM Group. * @return the next definition stage. */ Update withDestination(String destination); } - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -288,14 +322,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkPortMirroring refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringList.java deleted file mode 100644 index 516774fb18195..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Port Mirroring. */ -@Immutable -public final class WorkloadNetworkPortMirroringList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkPortMirroringList class. */ - public WorkloadNetworkPortMirroringList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProfiles.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProfiles.java new file mode 100644 index 0000000000000..5da069c6afcda --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProfiles.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPortMirroringProfiles. + */ +public interface WorkloadNetworkPortMirroringProfiles { + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName); + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String portMirroringId, Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring. + */ + WorkloadNetworkPortMirroring get(String resourceGroupName, String privateCloudName, String portMirroringId); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String portMirroringId, String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + WorkloadNetworkPortMirroring getById(String id); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkloadNetworkPortMirroring resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkPortMirroring definition. + */ + WorkloadNetworkPortMirroring.DefinitionStages.Blank define(String name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java index c952771473563..170b5439bbfeb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network Port Mirroring provisioning state. + */ public final class WorkloadNetworkPortMirroringProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkPortMirroringProvisioningState. + */ + public static final WorkloadNetworkPortMirroringProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkPortMirroringProvisioningState. */ - public static final WorkloadNetworkPortMirroringProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkPortMirroringProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkPortMirroringProvisioningState() { /** * Creates or finds a WorkloadNetworkPortMirroringProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkPortMirroringProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkPortMirroringProvisioningState fromString(String na /** * Gets known WorkloadNetworkPortMirroringProvisioningState values. - * + * * @return known WorkloadNetworkPortMirroringProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringUpdate.java new file mode 100644 index 0000000000000..f55e1f322fe67 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringUpdate.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * NSX Port Mirroring update. + */ +@Fluent +public final class WorkloadNetworkPortMirroringUpdate { + /* + * The updatable properties of a Port Mirroring update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkPortMirroringProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkPortMirroringUpdate class. + */ + public WorkloadNetworkPortMirroringUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a Port Mirroring update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkPortMirroringProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the port mirroring profile. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the port mirroring profile. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the direction property: Direction of port mirroring profile. + * + * @return the direction value. + */ + public PortMirroringDirectionEnum direction() { + return this.innerProperties() == null ? null : this.innerProperties().direction(); + } + + /** + * Set the direction property: Direction of port mirroring profile. + * + * @param direction the direction value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withDirection(PortMirroringDirectionEnum direction) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withDirection(direction); + return this; + } + + /** + * Get the source property: Source VM Group. + * + * @return the source value. + */ + public String source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: Source VM Group. + * + * @param source the source value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withSource(String source) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the destination property: Destination VM Group. + * + * @return the destination value. + */ + public String destination() { + return this.innerProperties() == null ? null : this.innerProperties().destination(); + } + + /** + * Set the destination property: Destination VM Group. + * + * @param destination the destination value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withDestination(String destination) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withDestination(destination); + return this; + } + + /** + * Get the status property: Port Mirroring Status. + * + * @return the status value. + */ + public PortMirroringStatusEnum status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkPortMirroringProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java new file mode 100644 index 0000000000000..d11d0499eae13 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * base Workload Network provisioning state. + */ +public final class WorkloadNetworkProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState BUILDING = fromString("Building"); + + /** + * Static value Deleting for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Updating for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of WorkloadNetworkProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WorkloadNetworkProvisioningState() { + } + + /** + * Creates or finds a WorkloadNetworkProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding WorkloadNetworkProvisioningState. + */ + @JsonCreator + public static WorkloadNetworkProvisioningState fromString(String name) { + return fromString(name, WorkloadNetworkProvisioningState.class); + } + + /** + * Gets known WorkloadNetworkProvisioningState values. + * + * @return known WorkloadNetworkProvisioningState values. + */ + public static Collection values() { + return values(WorkloadNetworkProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIPsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIPsList.java deleted file mode 100644 index 6dffca84e92e2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIPsList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Public IP Blocks. */ -@Immutable -public final class WorkloadNetworkPublicIPsList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkPublicIPsList class. */ - public WorkloadNetworkPublicIPsList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java index 45d9a0b9ded21..a85485b4fb48f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java @@ -1,86 +1,104 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPublicIpInner; -/** An immutable client-side representation of WorkloadNetworkPublicIp. */ +/** + * An immutable client-side representation of WorkloadNetworkPublicIp. + */ public interface WorkloadNetworkPublicIp { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the Public IP Block. - * + * * @return the displayName value. */ String displayName(); /** * Gets the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @return the numberOfPublicIPs value. */ Long numberOfPublicIPs(); /** - * Gets the publicIpBlock property: CIDR Block of the Public IP Block. - * - * @return the publicIpBlock value. + * Gets the publicIPBlock property: CIDR Block of the Public IP Block. + * + * @return the publicIPBlock value. */ - String publicIpBlock(); + String publicIPBlock(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkPublicIpProvisioningState provisioningState(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner object. - * + * * @return the inner object. */ WorkloadNetworkPublicIpInner innerModel(); - /** The entirety of the WorkloadNetworkPublicIp definition. */ + /** + * The entirety of the WorkloadNetworkPublicIp definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkPublicIp definition stages. */ + /** + * The WorkloadNetworkPublicIp definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkPublicIp definition. */ + /** + * The first stage of the WorkloadNetworkPublicIp definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkPublicIp definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkPublicIp definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -95,36 +113,40 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithNumberOfPublicIPs { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkPublicIp create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkPublicIp create(Context context); } - /** The stage of the WorkloadNetworkPublicIp definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkPublicIp definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the Public IP Block.. - * + * * @param displayName Display name of the Public IP Block. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkPublicIp definition allowing to specify numberOfPublicIPs. */ + /** + * The stage of the WorkloadNetworkPublicIp definition allowing to specify numberOfPublicIPs. + */ interface WithNumberOfPublicIPs { /** * Specifies the numberOfPublicIPs property: Number of Public IPs requested.. - * + * * @param numberOfPublicIPs Number of Public IPs requested. * @return the next definition stage. */ @@ -134,14 +156,14 @@ interface WithNumberOfPublicIPs { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkPublicIp refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java index 66d02384486ad..dcbf8cc99e615 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network Public IP provisioning state. + */ public final class WorkloadNetworkPublicIpProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkPublicIpProvisioningState. + */ + public static final WorkloadNetworkPublicIpProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkPublicIpProvisioningState. */ - public static final WorkloadNetworkPublicIpProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkPublicIpProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkPublicIpProvisioningState() { /** * Creates or finds a WorkloadNetworkPublicIpProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkPublicIpProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkPublicIpProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkPublicIpProvisioningState values. - * + * * @return known WorkloadNetworkPublicIpProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIps.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIps.java new file mode 100644 index 0000000000000..05ba45c4c83e8 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIps.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPublicIps. + */ +public interface WorkloadNetworkPublicIps { + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String publicIPId, Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP. + */ + WorkloadNetworkPublicIp get(String resourceGroupName, String privateCloudName, String publicIPId); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String publicIPId, String privateCloudName); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String publicIPId, String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + WorkloadNetworkPublicIp getById(String id); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkloadNetworkPublicIp resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkPublicIp definition. + */ + WorkloadNetworkPublicIp.DefinitionStages.Blank define(String name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java index b990fecdd0301..5d92d9259dd11 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java @@ -1,115 +1,133 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkSegmentInner; import java.util.List; -/** An immutable client-side representation of WorkloadNetworkSegment. */ +/** + * An immutable client-side representation of WorkloadNetworkSegment. + */ public interface WorkloadNetworkSegment { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the segment. - * + * * @return the displayName value. */ String displayName(); /** * Gets the connectedGateway property: Gateway which to connect segment to. - * + * * @return the connectedGateway value. */ String connectedGateway(); /** * Gets the subnet property: Subnet which to connect segment to. - * + * * @return the subnet value. */ WorkloadNetworkSegmentSubnet subnet(); /** * Gets the portVif property: Port Vif which segment is associated with. - * + * * @return the portVif value. */ List portVif(); /** * Gets the status property: Segment status. - * + * * @return the status value. */ SegmentStatusEnum status(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkSegmentProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner object. - * + * * @return the inner object. */ WorkloadNetworkSegmentInner innerModel(); - /** The entirety of the WorkloadNetworkSegment definition. */ + /** + * The entirety of the WorkloadNetworkSegment definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkSegment definition stages. */ + /** + * The WorkloadNetworkSegment definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkSegment definition. */ + /** + * The first stage of the WorkloadNetworkSegment definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkSegment definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -121,65 +139,70 @@ interface WithParentResource { * The stage of the WorkloadNetworkSegment definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithDisplayName, - DefinitionStages.WithConnectedGateway, - DefinitionStages.WithSubnet, - DefinitionStages.WithRevision { + interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithConnectedGateway, + DefinitionStages.WithSubnet, DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkSegment create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkSegment create(Context context); } - /** The stage of the WorkloadNetworkSegment definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the segment.. - * + * * @param displayName Display name of the segment. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkSegment definition allowing to specify connectedGateway. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify connectedGateway. + */ interface WithConnectedGateway { /** * Specifies the connectedGateway property: Gateway which to connect segment to.. - * + * * @param connectedGateway Gateway which to connect segment to. * @return the next definition stage. */ WithCreate withConnectedGateway(String connectedGateway); } - /** The stage of the WorkloadNetworkSegment definition allowing to specify subnet. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify subnet. + */ interface WithSubnet { /** * Specifies the subnet property: Subnet which to connect segment to.. - * + * * @param subnet Subnet which to connect segment to. * @return the next definition stage. */ WithCreate withSubnet(WorkloadNetworkSegmentSubnet subnet); } - /** The stage of the WorkloadNetworkSegment definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -189,73 +212,82 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkSegment resource. - * + * * @return the stage of resource update. */ WorkloadNetworkSegment.Update update(); - /** The template for WorkloadNetworkSegment update. */ - interface Update - extends UpdateStages.WithDisplayName, - UpdateStages.WithConnectedGateway, - UpdateStages.WithSubnet, - UpdateStages.WithRevision { + /** + * The template for WorkloadNetworkSegment update. + */ + interface Update extends UpdateStages.WithDisplayName, UpdateStages.WithConnectedGateway, UpdateStages.WithSubnet, + UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkSegment apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkSegment apply(Context context); } - /** The WorkloadNetworkSegment update stages. */ + /** + * The WorkloadNetworkSegment update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkSegment update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkSegment update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the segment.. - * + * * @param displayName Display name of the segment. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkSegment update allowing to specify connectedGateway. */ + /** + * The stage of the WorkloadNetworkSegment update allowing to specify connectedGateway. + */ interface WithConnectedGateway { /** * Specifies the connectedGateway property: Gateway which to connect segment to.. - * + * * @param connectedGateway Gateway which to connect segment to. * @return the next definition stage. */ Update withConnectedGateway(String connectedGateway); } - /** The stage of the WorkloadNetworkSegment update allowing to specify subnet. */ + /** + * The stage of the WorkloadNetworkSegment update allowing to specify subnet. + */ interface WithSubnet { /** * Specifies the subnet property: Subnet which to connect segment to.. - * + * * @param subnet Subnet which to connect segment to. * @return the next definition stage. */ Update withSubnet(WorkloadNetworkSegmentSubnet subnet); } - /** The stage of the WorkloadNetworkSegment update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkSegment update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -265,14 +297,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkSegment refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java index 149673fa5dda7..181068c024a10 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java @@ -1,14 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Ports and any VIF attached to segment. */ -@Fluent +/** + * Ports and any VIF attached to segment. + */ +@Immutable public final class WorkloadNetworkSegmentPortVif { /* * Name of port or VIF attached to segment. @@ -16,33 +18,24 @@ public final class WorkloadNetworkSegmentPortVif { @JsonProperty(value = "portName") private String portName; - /** Creates an instance of WorkloadNetworkSegmentPortVif class. */ - public WorkloadNetworkSegmentPortVif() { + /** + * Creates an instance of WorkloadNetworkSegmentPortVif class. + */ + private WorkloadNetworkSegmentPortVif() { } /** * Get the portName property: Name of port or VIF attached to segment. - * + * * @return the portName value. */ public String portName() { return this.portName; } - /** - * Set the portName property: Name of port or VIF attached to segment. - * - * @param portName the portName value to set. - * @return the WorkloadNetworkSegmentPortVif object itself. - */ - public WorkloadNetworkSegmentPortVif withPortName(String portName) { - this.portName = portName; - return this; - } - /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java index 4342b4b55a7a3..6dd40c5b95412 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network Segment provisioning state. + */ public final class WorkloadNetworkSegmentProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkSegmentProvisioningState. + */ + public static final WorkloadNetworkSegmentProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkSegmentProvisioningState. */ - public static final WorkloadNetworkSegmentProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkSegmentProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkSegmentProvisioningState() { /** * Creates or finds a WorkloadNetworkSegmentProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkSegmentProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkSegmentProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkSegmentProvisioningState values. - * + * * @return known WorkloadNetworkSegmentProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java index bc57151382bd0..504e11a07b440 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Subnet configuration for segment. */ +/** + * Subnet configuration for segment. + */ @Fluent public final class WorkloadNetworkSegmentSubnet { /* @@ -23,13 +25,15 @@ public final class WorkloadNetworkSegmentSubnet { @JsonProperty(value = "gatewayAddress") private String gatewayAddress; - /** Creates an instance of WorkloadNetworkSegmentSubnet class. */ + /** + * Creates an instance of WorkloadNetworkSegmentSubnet class. + */ public WorkloadNetworkSegmentSubnet() { } /** * Get the dhcpRanges property: DHCP Range assigned for subnet. - * + * * @return the dhcpRanges value. */ public List dhcpRanges() { @@ -38,7 +42,7 @@ public List dhcpRanges() { /** * Set the dhcpRanges property: DHCP Range assigned for subnet. - * + * * @param dhcpRanges the dhcpRanges value to set. * @return the WorkloadNetworkSegmentSubnet object itself. */ @@ -49,7 +53,7 @@ public WorkloadNetworkSegmentSubnet withDhcpRanges(List dhcpRanges) { /** * Get the gatewayAddress property: Gateway address. - * + * * @return the gatewayAddress value. */ public String gatewayAddress() { @@ -58,7 +62,7 @@ public String gatewayAddress() { /** * Set the gatewayAddress property: Gateway address. - * + * * @param gatewayAddress the gatewayAddress value to set. * @return the WorkloadNetworkSegmentSubnet object itself. */ @@ -69,7 +73,7 @@ public WorkloadNetworkSegmentSubnet withGatewayAddress(String gatewayAddress) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentUpdate.java new file mode 100644 index 0000000000000..b45bf3255a371 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentUpdate.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * NSX Segment update. + */ +@Fluent +public final class WorkloadNetworkSegmentUpdate { + /* + * The updatable properties of a Segment update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkSegmentProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkSegmentUpdate class. + */ + public WorkloadNetworkSegmentUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a Segment update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkSegmentProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the segment. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the segment. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkSegmentUpdate object itself. + */ + public WorkloadNetworkSegmentUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkSegmentProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the connectedGateway property: Gateway which to connect segment to. + * + * @return the connectedGateway value. + */ + public String connectedGateway() { + return this.innerProperties() == null ? null : this.innerProperties().connectedGateway(); + } + + /** + * Set the connectedGateway property: Gateway which to connect segment to. + * + * @param connectedGateway the connectedGateway value to set. + * @return the WorkloadNetworkSegmentUpdate object itself. + */ + public WorkloadNetworkSegmentUpdate withConnectedGateway(String connectedGateway) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkSegmentProperties(); + } + this.innerProperties().withConnectedGateway(connectedGateway); + return this; + } + + /** + * Get the subnet property: Subnet which to connect segment to. + * + * @return the subnet value. + */ + public WorkloadNetworkSegmentSubnet subnet() { + return this.innerProperties() == null ? null : this.innerProperties().subnet(); + } + + /** + * Set the subnet property: Subnet which to connect segment to. + * + * @param subnet the subnet value to set. + * @return the WorkloadNetworkSegmentUpdate object itself. + */ + public WorkloadNetworkSegmentUpdate withSubnet(WorkloadNetworkSegmentSubnet subnet) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkSegmentProperties(); + } + this.innerProperties().withSubnet(subnet); + return this; + } + + /** + * Get the portVif property: Port Vif which segment is associated with. + * + * @return the portVif value. + */ + public List portVif() { + return this.innerProperties() == null ? null : this.innerProperties().portVif(); + } + + /** + * Get the status property: Segment status. + * + * @return the status value. + */ + public SegmentStatusEnum status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkSegmentProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkSegmentUpdate object itself. + */ + public WorkloadNetworkSegmentUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkSegmentProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegments.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegments.java new file mode 100644 index 0000000000000..e2722fda714fd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegments.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkSegments. + */ +public interface WorkloadNetworkSegments { + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String segmentId, Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment. + */ + WorkloadNetworkSegment get(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + WorkloadNetworkSegment getById(String id); + + /** + * Get a WorkloadNetworkSegment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSegmentById(String id); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSegmentByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkloadNetworkSegment resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkSegment definition. + */ + WorkloadNetworkSegment.DefinitionStages.Blank define(String name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentsList.java deleted file mode 100644 index 55c33dbfc7171..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentsList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Segments. */ -@Immutable -public final class WorkloadNetworkSegmentsList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkSegmentsList class. */ - public WorkloadNetworkSegmentsList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java index 003876277700d..5da5fa4d3d880 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java @@ -1,101 +1,119 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVMGroupInner; import java.util.List; -/** An immutable client-side representation of WorkloadNetworkVMGroup. */ +/** + * An immutable client-side representation of WorkloadNetworkVMGroup. + */ public interface WorkloadNetworkVMGroup { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the VM group. - * + * * @return the displayName value. */ String displayName(); /** * Gets the members property: Virtual machine members of this group. - * + * * @return the members value. */ List members(); /** * Gets the status property: VM Group status. - * + * * @return the status value. */ VMGroupStatusEnum status(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkVMGroupProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner object. - * + * * @return the inner object. */ WorkloadNetworkVMGroupInner innerModel(); - /** The entirety of the WorkloadNetworkVMGroup definition. */ + /** + * The entirety of the WorkloadNetworkVMGroup definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkVMGroup definition stages. */ + /** + * The WorkloadNetworkVMGroup definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkVMGroup definition. */ + /** + * The first stage of the WorkloadNetworkVMGroup definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkVMGroup definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkVMGroup definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -111,47 +129,53 @@ interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithMembers, DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkVMGroup create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkVMGroup create(Context context); } - /** The stage of the WorkloadNetworkVMGroup definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkVMGroup definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the VM group.. - * + * * @param displayName Display name of the VM group. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkVMGroup definition allowing to specify members. */ + /** + * The stage of the WorkloadNetworkVMGroup definition allowing to specify members. + */ interface WithMembers { /** * Specifies the members property: Virtual machine members of this group.. - * + * * @param members Virtual machine members of this group. * @return the next definition stage. */ WithCreate withMembers(List members); } - /** The stage of the WorkloadNetworkVMGroup definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkVMGroup definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -161,58 +185,68 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkVMGroup resource. - * + * * @return the stage of resource update. */ WorkloadNetworkVMGroup.Update update(); - /** The template for WorkloadNetworkVMGroup update. */ + /** + * The template for WorkloadNetworkVMGroup update. + */ interface Update extends UpdateStages.WithDisplayName, UpdateStages.WithMembers, UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkVMGroup apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkVMGroup apply(Context context); } - /** The WorkloadNetworkVMGroup update stages. */ + /** + * The WorkloadNetworkVMGroup update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkVMGroup update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkVMGroup update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the VM group.. - * + * * @param displayName Display name of the VM group. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkVMGroup update allowing to specify members. */ + /** + * The stage of the WorkloadNetworkVMGroup update allowing to specify members. + */ interface WithMembers { /** * Specifies the members property: Virtual machine members of this group.. - * + * * @param members Virtual machine members of this group. * @return the next definition stage. */ Update withMembers(List members); } - /** The stage of the WorkloadNetworkVMGroup update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkVMGroup update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -222,14 +256,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkVMGroup refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java index c802cc7d2b3c5..d25f1a2465506 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network VM Group provisioning state. + */ public final class WorkloadNetworkVMGroupProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkVMGroupProvisioningState. + */ + public static final WorkloadNetworkVMGroupProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkVMGroupProvisioningState. */ - public static final WorkloadNetworkVMGroupProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkVMGroupProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkVMGroupProvisioningState() { /** * Creates or finds a WorkloadNetworkVMGroupProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkVMGroupProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkVMGroupProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkVMGroupProvisioningState values. - * + * * @return known WorkloadNetworkVMGroupProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupUpdate.java new file mode 100644 index 0000000000000..20f3ac3df90e0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupUpdate.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * NSX VM Group update. + */ +@Fluent +public final class WorkloadNetworkVMGroupUpdate { + /* + * The updatable properties of a VM Group update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkVMGroupProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkVMGroupUpdate class. + */ + public WorkloadNetworkVMGroupUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a VM Group update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkVMGroupProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the VM group. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the VM group. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkVMGroupUpdate object itself. + */ + public WorkloadNetworkVMGroupUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkVMGroupProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the members property: Virtual machine members of this group. + * + * @return the members value. + */ + public List members() { + return this.innerProperties() == null ? null : this.innerProperties().members(); + } + + /** + * Set the members property: Virtual machine members of this group. + * + * @param members the members value to set. + * @return the WorkloadNetworkVMGroupUpdate object itself. + */ + public WorkloadNetworkVMGroupUpdate withMembers(List members) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkVMGroupProperties(); + } + this.innerProperties().withMembers(members); + return this; + } + + /** + * Get the status property: VM Group status. + * + * @return the status value. + */ + public VMGroupStatusEnum status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkVMGroupProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkVMGroupUpdate object itself. + */ + public WorkloadNetworkVMGroupUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkVMGroupProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupsList.java deleted file mode 100644 index fa7180149e1ff..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupsList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX VM Groups. */ -@Immutable -public final class WorkloadNetworkVMGroupsList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkVMGroupsList class. */ - public WorkloadNetworkVMGroupsList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java index f55adc8d68fc3..1b8c67b47ec57 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java @@ -1,51 +1,68 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -/** An immutable client-side representation of WorkloadNetworkVirtualMachine. */ +/** + * An immutable client-side representation of WorkloadNetworkVirtualMachine. + */ public interface WorkloadNetworkVirtualMachine { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + WorkloadNetworkProvisioningState provisioningState(); + /** * Gets the displayName property: Display name of the VM. - * + * * @return the displayName value. */ String displayName(); /** * Gets the vmType property: Virtual machine type. - * + * * @return the vmType value. */ VMTypeEnum vmType(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner object. - * + * * @return the inner object. */ WorkloadNetworkVirtualMachineInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachines.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachines.java new file mode 100644 index 0000000000000..e948d2d575979 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachines.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVirtualMachines. + */ +public interface WorkloadNetworkVirtualMachines { + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName); + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, + String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String virtualMachineId, Context context); + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine. + */ + WorkloadNetworkVirtualMachine get(String resourceGroupName, String privateCloudName, String virtualMachineId); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachinesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachinesList.java deleted file mode 100644 index ca30f36c8ea6b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachinesList.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Virtual Machines. */ -@Immutable -public final class WorkloadNetworkVirtualMachinesList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkVirtualMachinesList class. */ - public WorkloadNetworkVirtualMachinesList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if any. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVmGroups.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVmGroups.java new file mode 100644 index 0000000000000..9970aef32d547 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVmGroups.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVmGroups. + */ +public interface WorkloadNetworkVmGroups { + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByWorkloadNetwork(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String vmGroupId, Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup. + */ + WorkloadNetworkVMGroup get(String resourceGroupName, String privateCloudName, String vmGroupId); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + WorkloadNetworkVMGroup getById(String id); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkloadNetworkVMGroup resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkVMGroup definition. + */ + WorkloadNetworkVMGroup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java index 5e8841fc6d2a8..fe045fe294768 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.models; @@ -8,1085 +8,58 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WorkloadNetworks. */ +/** + * Resource collection API of WorkloadNetworks. + */ public interface WorkloadNetworks { /** - * Get a private cloud workload network. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud workload network along with {@link Response}. + * @return a WorkloadNetwork along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); /** - * Get a private cloud workload network. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud workload network. + * @return a WorkloadNetwork. */ - WorkloadNetwork get(String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName); + WorkloadNetwork get(String resourceGroupName, String privateCloudName); /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String privateCloudName); + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName); /** - * List of workload networks in a private cloud. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of workload networks as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments as paginated response with {@link PagedIterable}. - */ - PagedIterable listSegments(String resourceGroupName, String privateCloudName); - - /** - * List of segments in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Segments as paginated response with {@link PagedIterable}. - */ - PagedIterable listSegments( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network along with {@link Response}. - */ - Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context); - - /** - * Get a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network. - */ - WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId); - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. - */ - PagedIterable listDhcp(String resourceGroupName, String privateCloudName); - - /** - * List dhcp in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX dhcp entities as paginated response with {@link PagedIterable}. - */ - PagedIterable listDhcp(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network along with {@link Response}. - */ - Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context); - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network. - */ - WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. - */ - PagedIterable listGateways(String resourceGroupName, String privateCloudName); - - /** - * List of gateways in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Gateways as paginated response with {@link PagedIterable}. - */ - PagedIterable listGateways( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a gateway by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network along with {@link Response}. - */ - Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context); - - /** - * Get a gateway by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a gateway by id in a private cloud workload network. - */ - WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId); - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. - */ - PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName); - - /** - * List of port mirroring profiles in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. - */ - PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. - */ - Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context); - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network. - */ - WorkloadNetworkPortMirroring getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId); - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context); - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. - */ - PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); - - /** - * List of vm groups in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX VM Groups as paginated response with {@link PagedIterable}. - */ - PagedIterable listVMGroups( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network along with {@link Response}. - */ - Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context); - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network. - */ - WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. - */ - PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName); - - /** - * List of virtual machines in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. - */ - PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a virtual machine by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine 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 virtual machine by id in a private cloud workload network along with {@link Response}. - */ - Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context); - - /** - * Get a virtual machine by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine 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 virtual machine by id in a private cloud workload network. - */ - WorkloadNetworkVirtualMachine getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId); - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. - */ - PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); - - /** - * List of DNS services in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Services as paginated response with {@link PagedIterable}. - */ - PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network along with {@link Response}. - */ - Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context); - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network. - */ - WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, String dnsServiceId); - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName); - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. - */ - PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); - - /** - * List of DNS zones in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX DNS Zones as paginated response with {@link PagedIterable}. - */ - PagedIterable listDnsZones( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network along with {@link Response}. - */ - Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context); - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network. - */ - WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName); - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. - */ - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. - */ - PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. - */ - Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context); - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network. - */ - WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName); - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context); - - /** - * Get a segment by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network along with {@link Response}. - */ - WorkloadNetworkSegment getSegmentById(String id); - - /** - * Get a segment by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a segment by id in a private cloud workload network along with {@link Response}. - */ - Response getSegmentByIdWithResponse(String id, Context context); - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network along with {@link Response}. - */ - WorkloadNetworkDhcp getDhcpById(String id); - - /** - * Get dhcp by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dhcp by id in a private cloud workload network along with {@link Response}. - */ - Response getDhcpByIdWithResponse(String id, Context context); - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. - */ - WorkloadNetworkPortMirroring getPortMirroringById(String id); - - /** - * Get a port mirroring profile by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a port mirroring profile by id in a private cloud workload network along with {@link Response}. - */ - Response getPortMirroringByIdWithResponse(String id, Context context); - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network along with {@link Response}. - */ - WorkloadNetworkVMGroup getVMGroupById(String id); - - /** - * Get a vm group by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vm group by id in a private cloud workload network along with {@link Response}. - */ - Response getVMGroupByIdWithResponse(String id, Context context); - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network along with {@link Response}. - */ - WorkloadNetworkDnsService getDnsServiceById(String id); - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS service by id in a private cloud workload network along with {@link Response}. - */ - Response getDnsServiceByIdWithResponse(String id, Context context); - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network along with {@link Response}. - */ - WorkloadNetworkDnsZone getDnsZoneById(String id); - - /** - * Get a DNS zone by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DNS zone by id in a private cloud workload network along with {@link Response}. - */ - Response getDnsZoneByIdWithResponse(String id, Context context); - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. - */ - WorkloadNetworkPublicIp getPublicIpById(String id); - - /** - * Get a Public IP Block by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Public IP Block by id in a private cloud workload network along with {@link Response}. - */ - Response getPublicIpByIdWithResponse(String id, Context context); - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteSegmentById(String id); - - /** - * Delete a segment by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteSegmentByIdWithResponse(String id, Context context); - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDhcpById(String id); - - /** - * Delete dhcp by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDhcpByIdWithResponse(String id, Context context); - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePortMirroringById(String id); - - /** - * Delete a port mirroring profile by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePortMirroringByIdWithResponse(String id, Context context); - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteVMGroupById(String id); - - /** - * Delete a vm group by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteVMGroupByIdWithResponse(String id, Context context); - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsServiceById(String id); - - /** - * Delete a DNS service by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsServiceByIdWithResponse(String id, Context context); - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsZoneById(String id); - - /** - * Delete a DNS zone by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsZoneByIdWithResponse(String id, Context context); - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePublicIpById(String id); - - /** - * Delete a Public IP Block by id in a private cloud workload network. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePublicIpByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkloadNetworkSegment resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkSegment definition. - */ - WorkloadNetworkSegment.DefinitionStages.Blank defineSegments(String name); - - /** - * Begins definition for a new WorkloadNetworkDhcp resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkDhcp definition. - */ - WorkloadNetworkDhcp.DefinitionStages.Blank defineDhcp(String name); - - /** - * Begins definition for a new WorkloadNetworkPortMirroring resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkPortMirroring definition. - */ - WorkloadNetworkPortMirroring.DefinitionStages.Blank definePortMirroring(String name); - - /** - * Begins definition for a new WorkloadNetworkVMGroup resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkVMGroup definition. - */ - WorkloadNetworkVMGroup.DefinitionStages.Blank defineVMGroup(String name); - - /** - * Begins definition for a new WorkloadNetworkDnsService resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkDnsService definition. - */ - WorkloadNetworkDnsService.DefinitionStages.Blank defineDnsService(String name); - - /** - * Begins definition for a new WorkloadNetworkDnsZone resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkDnsZone definition. - */ - WorkloadNetworkDnsZone.DefinitionStages.Blank defineDnsZone(String name); - - /** - * Begins definition for a new WorkloadNetworkPublicIp resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkPublicIp definition. - */ - WorkloadNetworkPublicIp.DefinitionStages.Blank definePublicIp(String name); + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, + Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/package-info.java index a1dcabeca8f46..5861083294c42 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/package-info.java @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -/** Package containing the data models for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the data models for Avs. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs.models; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/package-info.java index 33dfd5e58c76b..b6b9d1926f20d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/package-info.java @@ -1,6 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -/** Package containing the classes for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the classes for Avs. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/module-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/module-info.java index 57505781a0ae6..49217d52cb95f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/module-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/module-info.java @@ -1,19 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.avs { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.avs; exports com.azure.resourcemanager.avs.fluent; exports com.azure.resourcemanager.avs.fluent.models; exports com.azure.resourcemanager.avs.models; - - opens com.azure.resourcemanager.avs.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.avs.models to - com.azure.core, - com.fasterxml.jackson.databind; -} + opens com.azure.resourcemanager.avs.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.avs.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.avs.implementation.models to com.azure.core, com.fasterxml.jackson.databind; +} \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json new file mode 100644 index 0000000000000..50af898538106 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.avs.implementation.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.WorkloadNetworkDhcpConfigurationsClientImpl$WorkloadNetworkDhcpConfigurationsService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkDnsServicesClientImpl$WorkloadNetworkDnsServicesService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkDnsZonesClientImpl$WorkloadNetworkDnsZonesService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkGatewaysClientImpl$WorkloadNetworkGatewaysService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkPortMirroringProfilesClientImpl$WorkloadNetworkPortMirroringProfilesService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkPublicIpsClientImpl$WorkloadNetworkPublicIpsService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkSegmentsClientImpl$WorkloadNetworkSegmentsService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkVirtualMachinesClientImpl$WorkloadNetworkVirtualMachinesService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkVmGroupsClientImpl$WorkloadNetworkVmGroupsService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworksClientImpl$WorkloadNetworksService" ] ] \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json new file mode 100644 index 0000000000000..2bdaba5e6ee60 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json @@ -0,0 +1,926 @@ +[ { + "name" : "com.azure.resourcemanager.avs.fluent.models.AddonInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.CloudLinkInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.CloudLinkProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.DatastoreInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.DatastoreProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.IscsiPathInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.IscsiPathProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PlacementPolicyUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PrivateCloudProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PrivateCloudUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.QuotaInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptCmdletProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptExecutionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptPackageProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.TrialInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.VirtualMachineProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIPProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.AddonListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.CloudLinkListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.ClusterListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.DatastoreListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.ExpressRouteAuthorizationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.GlobalReachConnectionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.HcxEnterpriseSiteListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.IscsiPathListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.PagedOperation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.PlacementPolicyListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.PrivateCloudListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.ScriptCmdletListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.ScriptExecutionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.ScriptPackageListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.VirtualMachineListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServiceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZoneListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachineListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonArcProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonHcxProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonSrmProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonVrProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AffinityStrength", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AffinityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AvailabilityProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AvailabilityStrategy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AzureHybridBenefitType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Circuit", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.CloudLinkProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.CloudLinkStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ClusterProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ClusterUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ClusterZone", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ClustersUpdateHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DatastoreProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DatastoreStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DhcpTypeEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DiskPoolVolume", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DnsServiceStatusEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DnsZoneType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ElasticSanVolume", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Encryption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.EncryptionKeyStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.EncryptionKeyVaultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.EncryptionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.EncryptionVersionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Endpoints", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.GlobalReachConnectionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.IdentitySource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.InternetEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.IscsiPathProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ManagementCluster", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.MountOptionEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.NetAppVolume", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.OptionalParamEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PSCredentialExecutionParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPoliciesUpdateHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PortMirroringStatusEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PrivateCloudIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PrivateCloudUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PrivateCloudsUpdateHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.QuotaEnabled", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ResourceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptCmdletAudience", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionParameterType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptOutputStreamType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptPackageProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptParameterTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.SegmentStatusEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Sku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.SkuTier", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.SslEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.TrialStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VMGroupStatusEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VMTypeEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VisibilityParameterEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VmPlacementPolicyProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpRelay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java index cd8e91e2663f5..387b8db2aa267 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 @@ -1,84 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; 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 Addons CreateOrUpdate. + */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_HCX.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Addons_CreateOrUpdate_ArcReg.json */ /** - * Sample code: Addons_CreateOrUpdate_HCX. - * + * Sample code: Addons_CreateOrUpdate_ArcReg. + * * @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-03-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-03-01/examples/Addons_CreateOrUpdate_ArcReg.json - */ - /** - * Sample code: Addons_CreateOrUpdate_Arc. - * - * @param manager Entry point to AvsManager. - */ - public static void addonsCreateOrUpdateArc(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() + public static void addonsCreateOrUpdateArcReg(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons() .define("arc") .withExistingPrivateCloud("group1", "cloud1") - .withProperties( - new AddonArcProperties() - .withVCenter( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) - .create(); - } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_VR.json - */ - /** - * 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)) + .withProperties(new AddonArcProperties().withVCenter( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java index 9f4b870caad05..239fde2e72de5 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Addons Delete. */ +/** + * Samples for Addons Delete. + */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Addons_Delete.json */ /** * Sample code: Addons_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void addonsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java index 2f8415aaaf110..4c9d41acaa4ee 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 @@ -1,53 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Addons Get. */ +/** + * Samples for Addons Get. + */ public final class AddonsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_SRM.json - */ - /** - * 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-03-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-03-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); - } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_ArcReg.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Addons_Get_ArcReg.json */ /** * Sample code: Addons_Get_ArcReg. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java index a4ff18f33b802..c3ed2fd1f64b1 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Addons List. */ +/** + * Samples for Addons List. + */ public final class AddonsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Addons_List.json */ /** * Sample code: Addons_List. - * + * * @param manager Entry point to AvsManager. */ public static void addonsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java index 177ed6d865b81..433c2762dd182 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Authorizations CreateOrUpdate. */ +/** + * Samples for Authorizations CreateOrUpdate. + */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java index 0fe566511f34e..27cda00189bb6 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Authorizations Delete. */ +/** + * Samples for Authorizations Delete. + */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java index 424d753165df2..9e48b60b3940b 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 @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Authorizations Get. */ +/** + * Samples for Authorizations Get. + */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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() + manager.authorizations() .getWithResponse("group1", "cloud1", "authorization1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java index bbd525d1c66d5..edc8efe8b80b4 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Authorizations List. */ +/** + * Samples for Authorizations List. + */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Authorizations_List.json */ /** * Sample code: Authorizations_List. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java index be3c0538550f9..1d20061918aac 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 @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for CloudLinks CreateOrUpdate. */ +/** + * Samples for CloudLinks CreateOrUpdate. + */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .cloudLinks() + manager.cloudLinks() .define("cloudLink1") .withExistingPrivateCloud("group1", "cloud1") .withLinkedCloud( diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java index 0ee6a66e6f137..e2c3b85f0bb70 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for CloudLinks Delete. */ +/** + * Samples for CloudLinks Delete. + */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java index 442220d19a858..af3fc506a62ad 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for CloudLinks Get. */ +/** + * Samples for CloudLinks Get. + */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksGet(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java index e374f96679899..9c1a5c502f049 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for CloudLinks List. */ +/** + * Samples for CloudLinks List. + */ public final class CloudLinksListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java index 472902db04ec0..07bf75d83abe5 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 @@ -1,24 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.Sku; -/** Samples for Clusters CreateOrUpdate. */ +/** + * Samples for Clusters CreateOrUpdate. + */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void clustersCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .clusters() + manager.clusters() .define("cluster1") .withExistingPrivateCloud("group1", "cloud1") .withSku(new Sku().withName("AV20")) diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java index 89ef4d8d98f13..04d567db935e3 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Clusters Delete. */ +/** + * Samples for Clusters Delete. + */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void clustersDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java index 4e8515191b7e1..ca3fc4faebfb0 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Clusters Get. */ +/** + * Samples for Clusters Get. + */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_Get.json */ /** * Sample code: Clusters_Get. - * + * * @param manager Entry point to AvsManager. */ public static void clustersGet(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java index ab4a22c7003b5..c5dfec573be39 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Clusters List. */ +/** + * Samples for Clusters List. + */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_List.json */ /** * Sample code: Clusters_List. - * + * * @param manager Entry point to AvsManager. */ public static void clustersList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java index 8c3b199a6f843..886b468905a67 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 @@ -1,32 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Clusters ListZones. */ +/** + * Samples for Clusters ListZones. + */ public final class ClustersListZonesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones_Stretched.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_ListZones.json */ /** - * Sample code: Clusters_ListZoneData_Stretched. - * + * Sample code: Clusters_ListZones. + * * @param manager Entry point to AvsManager. */ - public static void clustersListZoneDataStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones.json - */ - /** - * Sample code: Clusters_ListZoneData. - * - * @param manager Entry point to AvsManager. - */ - public static void clustersListZoneData(com.azure.resourcemanager.avs.AvsManager manager) { + public static void clustersListZones(com.azure.resourcemanager.avs.AvsManager manager) { manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java index 031941d01a5e1..d28a59c5f0a18 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 @@ -1,27 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.Cluster; -/** Samples for Clusters Update. */ +/** + * Samples for Clusters Update. + */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Update.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Clusters_Update.json */ /** * Sample code: Clusters_Update. - * + * * @param manager Entry point to AvsManager. */ public static void clustersUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - Cluster resource = - manager - .clusters() - .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); + Cluster resource = manager.clusters() + .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withClusterSize(4).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java index 3a4fb133745a2..7127fe1eeaca0 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 @@ -1,30 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.NetAppVolume; -/** Samples for Datastores CreateOrUpdate. */ +/** + * Samples for Datastores CreateOrUpdate. + */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .datastores() + 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")) + .withNetAppVolume(new NetAppVolume().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1")) .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java index 4f57874e9cae1..de69c01e4d582 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Datastores Delete. */ +/** + * Samples for Datastores Delete. + */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java index 526721afa18f7..8cc20c627c54e 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 @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Datastores Get. */ +/** + * Samples for Datastores Get. + */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Datastores_Get.json */ /** * Sample code: Datastores_Get. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .datastores() + manager.datastores() .getWithResponse("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java index fa8d50667dc1f..3190fe03f7264 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Datastores List. */ +/** + * Samples for Datastores List. + */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Datastores_List.json */ /** * Sample code: Datastores_List. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java index d0cc1a0860a41..624d9cf131a02 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 @@ -1,22 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for GlobalReachConnections CreateOrUpdate. */ +/** + * Samples for GlobalReachConnections CreateOrUpdate. + */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .globalReachConnections() + manager.globalReachConnections() .define("connection1") .withExistingPrivateCloud("group1", "cloud1") .withAuthorizationKey("01010101-0101-0101-0101-010101010101") diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java index c21f2b8fee24b..d340d6b939462 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for GlobalReachConnections Delete. */ +/** + * Samples for GlobalReachConnections Delete. + */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java index 9b562c9fe3ebb..cb6c93c01fe80 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 @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for GlobalReachConnections Get. */ +/** + * Samples for GlobalReachConnections Get. + */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .globalReachConnections() + manager.globalReachConnections() .getWithResponse("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java index 663bf721595dd..cf587760845f4 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for GlobalReachConnections List. */ +/** + * Samples for GlobalReachConnections List. + */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java index 49ffbeacf4c7f..b54d427da3da0 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for HcxEnterpriseSites CreateOrUpdate. */ +/** + * Samples for HcxEnterpriseSites CreateOrUpdate. + */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java index c6d26c8d353d0..d42a31c78bfc3 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for HcxEnterpriseSites Delete. */ +/** + * Samples for HcxEnterpriseSites Delete. + */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java index 0f7e4b6eb51cf..aa177aa53d1de 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for HcxEnterpriseSites Get. */ +/** + * Samples for HcxEnterpriseSites Get. + */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesGet(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java index 15722a61b938f..2ac3b6a4ed3cd 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for HcxEnterpriseSites List. */ +/** + * Samples for HcxEnterpriseSites List. + */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..6b488131a518e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * Samples for IscsiPaths CreateOrUpdate. + */ +public final class IscsiPathsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/IscsiPaths_CreateOrUpdate.json + */ + /** + * Sample code: IscsiPaths_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths() + .createOrUpdate("group1", "cloud1", new IscsiPathInner().withNetworkBlock("192.168.0.0/24"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java new file mode 100644 index 0000000000000..9eec59b217206 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for IscsiPaths Delete. + */ +public final class IscsiPathsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/IscsiPaths_Delete.json + */ + /** + * Sample code: IscsiPaths_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().delete("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java new file mode 100644 index 0000000000000..25901e1f5e558 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for IscsiPaths Get. + */ +public final class IscsiPathsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/IscsiPaths_Get.json + */ + /** + * Sample code: IscsiPaths_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java new file mode 100644 index 0000000000000..b4cf25d28fbf2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for IscsiPaths ListByPrivateCloud. + */ +public final class IscsiPathsListByPrivateCloudSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/IscsiPaths_List.json + */ + /** + * Sample code: IscsiPaths_ListByPrivateCloud. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsListByPrivateCloud(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java index 960d85f9f8fa9..55b8044866282 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Locations CheckQuotaAvailability. */ +/** + * Samples for Locations CheckQuotaAvailability. + */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckQuotaAvailability.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Locations_CheckQuotaAvailability.json */ /** * Sample code: Locations_CheckQuotaAvailability. - * + * * @param manager Entry point to AvsManager. */ public static void locationsCheckQuotaAvailability(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java index c5ee045ecd03e..3172556e3ca41 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 @@ -1,37 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -import com.azure.resourcemanager.avs.models.Sku; - -/** Samples for Locations CheckTrialAvailability. */ +/** + * Samples for Locations CheckTrialAvailability. + */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailability.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Locations_CheckTrialAvailability.json */ /** * Sample code: Locations_CheckTrialAvailability. - * + * * @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); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailabilityWithSku.json - */ - /** - * Sample code: Locations_CheckTrialAvailabilityWithSku. - * - * @param manager Entry point to AvsManager. - */ - public static void locationsCheckTrialAvailabilityWithSku(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .locations() - .checkTrialAvailabilityWithResponse( - "eastus", new Sku().withName("avs52t"), com.azure.core.util.Context.NONE); - } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java index 9b99e71c0240b..1b8807f24407b 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Operations_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/Operations_List.json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to AvsManager. */ public static void operationsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java index 426c471c3f682..a191469b873df 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,37 +10,30 @@ import com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties; import java.util.Arrays; -/** Samples for PlacementPolicies CreateOrUpdate. */ +/** + * Samples for PlacementPolicies CreateOrUpdate. + */ public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PlacementPolicies_CreateOrUpdate.json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .placementPolicies() + 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)) + .withProperties(new VmHostPlacementPolicyProperties().withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityType(AffinityType.ANTI_AFFINITY) + .withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java index 3c59eb32a60b6..591cb3eca8e59 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PlacementPolicies Delete. */ +/** + * Samples for PlacementPolicies Delete. + */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java index e53235de950bd..de4f764abc902 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 @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PlacementPolicies Get. */ +/** + * Samples for PlacementPolicies Get. + */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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() + manager.placementPolicies() .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java index cab472a9b79fb..e8de4f59b7e60 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PlacementPolicies List. */ +/** + * Samples for PlacementPolicies List. + */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java index 817c8d0247ade..4e6602ab470e2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,36 +10,29 @@ import com.azure.resourcemanager.avs.models.PlacementPolicyState; import java.util.Arrays; -/** Samples for PlacementPolicies Update. */ +/** + * Samples for PlacementPolicies Update. + */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Update.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PlacementPolicy resource = - manager - .placementPolicies() - .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + 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")) + .withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) .withAffinityStrength(AffinityStrength.MUST) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST) .apply(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java index dd75c09bcf9f0..7959d73f41ded 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 @@ -1,11 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -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; @@ -13,53 +11,28 @@ import java.util.HashMap; import java.util.Map; -/** Samples for PrivateClouds CreateOrUpdate. */ +/** + * Samples for PrivateClouds CreateOrUpdate. + */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .privateClouds() + manager.privateClouds() .define("cloud1") .withRegion("eastus2") .withExistingResourceGroup("group1") .withSku(new Sku().withName("AV36")) .withTags(mapOf()) .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withNetworkBlock("192.168.48.0/22") .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .create(); - } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json - */ - /** - * Sample code: PrivateClouds_CreateOrUpdate_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsCreateOrUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .privateClouds() - .define("cloud1") - .withRegion("eastus2") - .withExistingResourceGroup("group1") - .withSku(new Sku().withName("AV36")) - .withTags(mapOf()) .withNetworkBlock("192.168.48.0/22") - .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withAvailability( - new AvailabilityProperties() - .withStrategy(AvailabilityStrategy.DUAL_ZONE) - .withZone(1) - .withSecondaryZone(2)) .create(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java index 98c46377ad5d7..55760d6011b5b 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds Delete. */ +/** + * Samples for PrivateClouds Delete. + */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java index dcb4cea94c561..6cafdc78ae62a 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 @@ -1,32 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds GetByResourceGroup. */ +/** + * Samples for PrivateClouds GetByResourceGroup. + */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. - * + * * @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); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get_Stretched.json - */ - /** - * Sample code: PrivateClouds_Get_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsGetStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); - } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java index 9bf66b966312b..63125d0252169 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 @@ -1,17 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds ListAdminCredentials. */ +/** + * Samples for PrivateClouds ListAdminCredentials. + */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_ListAdminCredentials.json */ /** * Sample code: PrivateClouds_ListAdminCredentials. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListAdminCredentials(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java index 8d2c8b60c44c9..c4a80978442b6 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 @@ -1,32 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds ListByResourceGroup. */ +/** + * Samples for PrivateClouds ListByResourceGroup. + */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List_Stretched.json - */ - /** - * Sample code: PrivateClouds_List_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsListStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); - } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java index 63fdec99ca39f..2d8bfa5a0d84a 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 @@ -1,32 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds List. */ +/** + * Samples for PrivateClouds List. + */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_ListInSubscription.json */ /** * Sample code: PrivateClouds_ListInSubscription. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { manager.privateClouds().list(com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription_Stretched.json - */ - /** - * Sample code: PrivateClouds_ListInSubscription_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsListInSubscriptionStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().list(com.azure.core.util.Context.NONE); - } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java index c7a78dd98af54..0d4e6e7706a74 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds RotateNsxtPassword. */ +/** + * Samples for PrivateClouds RotateNsxtPassword. + */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_RotateNsxtPassword.json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsRotateNsxtPassword(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java index 7e54fab3feeb2..7bc3df9d1bf16 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 @@ -1,17 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds RotateVcenterPassword. */ +/** + * Samples for PrivateClouds RotateVcenterPassword. + */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsRotateVcenterPassword(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java index 735a3aa17dafe..14a888b60b0d5 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,51 +12,29 @@ import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; import com.azure.resourcemanager.avs.models.ResourceIdentityType; -/** Samples for PrivateClouds Update. */ +/** + * Samples for PrivateClouds Update. + */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = - manager - .privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + 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"))) + .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) + .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") + .withKeyVersion("fakeTokenPlaceholder") + .withKeyVaultUrl("fakeTokenPlaceholder"))) .apply(); } - - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update_Stretched.json - */ - /** - * Sample code: PrivateClouds_Update_Stretched. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = - manager - .privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withManagementCluster(new ManagementCluster().withClusterSize(4)).apply(); - } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java index 5e950ce73e64a..14abba5185356 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 @@ -1,23 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptCmdlets Get. */ +/** + * Samples for ScriptCmdlets Get. + */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptCmdletsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptCmdlets() - .getWithResponse( - "group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", com.azure.core.util.Context.NONE); + manager.scriptCmdlets() + .getWithResponse("group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java index 38642594f02e2..16353482f9a72 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptCmdlets List. */ +/** + * Samples for ScriptCmdlets List. + */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptCmdletsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java index 5501891d33f6d..e46b4341bc9b9 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -8,38 +8,30 @@ import com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter; import java.util.Arrays; -/** Samples for ScriptExecutions CreateOrUpdate. */ +/** + * Samples for ScriptExecutions CreateOrUpdate. + */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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() + 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"))) + .withParameters(Arrays.asList( + new ScriptStringExecutionParameter().withName("DomainName").withValue("placeholderDomain.local"), + new ScriptStringExecutionParameter().withName("BaseUserDN") + .withValue("DC=placeholder, DC=placeholder"))) + .withHiddenParameters(Arrays.asList( + new ScriptSecureStringExecutionParameter().withName("Password").withSecureValue("PlaceholderPassword"))) .withTimeout("P0Y0M0DT0H60M60S") .withRetention("P0Y0M60DT0H60M60S") .create(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java index fddb8f90543cc..2afc0ac8452c4 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptExecutions Delete. */ +/** + * Samples for ScriptExecutions Delete. + */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Delete.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java index 9429565d6f693..e2424f087ee23 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 @@ -1,35 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; import java.util.Arrays; -/** Samples for ScriptExecutions GetExecutionLogs. */ +/** + * Samples for ScriptExecutions GetExecutionLogs. + */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptExecutions_GetExecutionLogs.json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsGetExecutionLogs(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptExecutions() - .getExecutionLogsWithResponse( - "group1", - "cloud1", - "addSsoServer", - Arrays - .asList( - ScriptOutputStreamType.INFORMATION, - ScriptOutputStreamType.fromString("Warnings"), - ScriptOutputStreamType.fromString("Errors"), - ScriptOutputStreamType.OUTPUT), + manager.scriptExecutions() + .getExecutionLogsWithResponse("group1", "cloud1", "addSsoServer", + Arrays.asList(ScriptOutputStreamType.INFORMATION, ScriptOutputStreamType.fromString("Warnings"), + ScriptOutputStreamType.fromString("Errors"), ScriptOutputStreamType.OUTPUT), com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java index e2e1df25b138a..c4ad411d6b27b 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 @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptExecutions Get. */ +/** + * Samples for ScriptExecutions Get. + */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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() + manager.scriptExecutions() .getWithResponse("group1", "cloud1", "addSsoServer", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java index b45b841bb31b2..6e360fbcff8ff 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptExecutions List. */ +/** + * Samples for ScriptExecutions List. + */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java index 937e2bb156eab..73bc302b32ee9 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 @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptPackages Get. */ +/** + * Samples for ScriptPackages Get. + */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptPackagesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptPackages() + manager.scriptPackages() .getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java index f5d99d8f174aa..f65c741fd5094 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 @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptPackages List. */ +/** + * Samples for ScriptPackages List. + */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptPackagesList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java index c100829a6a16a..6f2f1d46ceb32 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 @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for VirtualMachines Get. */ +/** + * Samples for VirtualMachines Get. + */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/VirtualMachines_Get.json */ /** - * Sample code: GetVirtualMachine. - * + * Sample code: VirtualMachines_Get. + * * @param manager Entry point to AvsManager. */ - public static void getVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .virtualMachines() + public static void virtualMachinesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.virtualMachines() .getWithResponse("group1", "cloud1", "cluster1", "vm-209", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java index 0605e3fa38da3..2f0a6ff4d92ff 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 @@ -1,20 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for VirtualMachines List. */ +/** + * Samples for VirtualMachines List. + */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_List.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/VirtualMachines_List.json */ /** - * Sample code: ListClusterVirtualMachines. - * + * Sample code: VirtualMachines_List. + * * @param manager Entry point to AvsManager. */ - public static void listClusterVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { + public static void virtualMachinesList(com.azure.resourcemanager.avs.AvsManager manager) { manager.virtualMachines().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java index 33bcdbd5482e5..9e4052eecb362 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 @@ -1,30 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; -/** Samples for VirtualMachines RestrictMovement. */ +/** + * Samples for VirtualMachines RestrictMovement. + */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_RestrictMovement.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/VirtualMachines_RestrictMovement.json */ /** - * Sample code: VirtualMachine_RestrictMovement. - * + * Sample code: VirtualMachines_RestrictMovement. + * * @param manager Entry point to AvsManager. */ - public static void virtualMachineRestrictMovement(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .virtualMachines() - .restrictMovement( - "group1", - "cloud1", - "cluster1", - "vm-209", + public static void virtualMachinesRestrictMovement(com.azure.resourcemanager.avs.AvsManager manager) { + manager.virtualMachines() + .restrictMovement("group1", "cloud1", "cluster1", "vm-209", new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED), com.azure.core.util.Context.NONE); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java new file mode 100644 index 0000000000000..aa98f4730098c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; + +/** + * Samples for WorkloadNetworkDhcpConfigurations Create. + */ +public final class WorkloadNetworkDhcpConfigurationsCreateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateDhcp.json + */ + /** + * Sample code: WorkloadNetworks_CreateDhcp. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDhcpConfigurations() + .define("dhcp1") + .withExistingPrivateCloud("group1", "cloud1") + .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") + .withRevision(1L) + .withServerAddress("40.1.5.1/24") + .withLeaseTime(86400)) + .create(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteSamples.java new file mode 100644 index 0000000000000..fc10c417bd477 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkDhcpConfigurations Delete. + */ +public final class WorkloadNetworkDhcpConfigurationsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteDhcp.json + */ + /** + * Sample code: WorkloadNetworks_DeleteDhcp. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDhcpConfigurations() + .delete("group1", "cloud1", "dhcp1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetSamples.java new file mode 100644 index 0000000000000..cb9a3398d45ec --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkDhcpConfigurations Get. + */ +public final class WorkloadNetworkDhcpConfigurationsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetDhcp.json + */ + /** + * Sample code: WorkloadNetworks_GetDhcp. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGetDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDhcpConfigurations() + .getWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkSamples.java new file mode 100644 index 0000000000000..c2aba1817f464 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkDhcpConfigurations ListByWorkloadNetwork. + */ +public final class WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListDhcp.json + */ + /** + * Sample code: WorkloadNetworks_ListDhcp. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDhcpConfigurations() + .listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java new file mode 100644 index 0000000000000..c066fa1a11443 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; + +/** + * Samples for WorkloadNetworkDhcpConfigurations Update. + */ +public final class WorkloadNetworkDhcpConfigurationsUpdateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdateDhcp.json + */ + /** + * Sample code: WorkloadNetworks_UpdateDhcp. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkDhcp resource = manager.workloadNetworkDhcpConfigurations() + .getWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400)) + .apply(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateSamples.java similarity index 66% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateSamples.java index c4bb00e0d4eb4..f898853c90b69 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/WorkloadNetworkDnsServicesCreateSamples.java @@ -1,26 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import java.util.Arrays; -/** Samples for WorkloadNetworks CreateDnsService. */ -public final class WorkloadNetworksCreateDnsServiceSamples { +/** + * Samples for WorkloadNetworkDnsServices Create. + */ +public final class WorkloadNetworkDnsServicesCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsServices.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateDnsService.json */ /** * Sample code: WorkloadNetworks_CreateDnsService. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDnsService("dnsService1") + manager.workloadNetworkDnsServices() + .define("dnsService1") .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("dnsService1") .withDnsServiceIp("5.5.5.5") diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteSamples.java new file mode 100644 index 0000000000000..db2a91d16cb34 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkDnsServices Delete. + */ +public final class WorkloadNetworkDnsServicesDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteDnsService.json + */ + /** + * Sample code: WorkloadNetworks_DeleteDnsService. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksDeleteDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsServices() + .delete("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetSamples.java new file mode 100644 index 0000000000000..d4a480872618b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkDnsServices Get. + */ +public final class WorkloadNetworkDnsServicesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetDnsService.json + */ + /** + * Sample code: WorkloadNetworks_GetDnsService. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsServices() + .getWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkSamples.java new file mode 100644 index 0000000000000..9c1d0ba1f2a01 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkDnsServices ListByWorkloadNetwork. + */ +public final class WorkloadNetworkDnsServicesListByWorkloadNetworkSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListDnsServices.json + */ + /** + * Sample code: WorkloadNetworks_ListDnsServices. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsServices() + .listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} 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/WorkloadNetworkDnsServicesUpdateSamples.java similarity index 58% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesUpdateSamples.java index 2ac55687a0d6d..d5aef22913131 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/WorkloadNetworkDnsServicesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -8,24 +8,23 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateDnsService. */ -public final class WorkloadNetworksUpdateDnsServiceSamples { +/** + * Samples for WorkloadNetworkDnsServices Update. + */ +public final class WorkloadNetworkDnsServicesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsServices.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/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() + WorkloadNetworkDnsService resource = manager.workloadNetworkDnsServices() + .getWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withDisplayName("dnsService1") .withDnsServiceIp("5.5.5.5") .withDefaultDnsZone("defaultDnsZone1") 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/WorkloadNetworkDnsZonesCreateSamples.java similarity index 63% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateSamples.java index 8f00dd829bc66..ce988893e9a83 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/WorkloadNetworkDnsZonesCreateSamples.java @@ -1,25 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import java.util.Arrays; -/** Samples for WorkloadNetworks CreateDnsZone. */ -public final class WorkloadNetworksCreateDnsZoneSamples { +/** + * Samples for WorkloadNetworkDnsZones Create. + */ +public final class WorkloadNetworkDnsZonesCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsZones.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateDnsZone.json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDnsZone("dnsZone1") + manager.workloadNetworkDnsZones() + .define("dnsZone1") .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("dnsZone1") .withDomain(Arrays.asList()) 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/WorkloadNetworkDnsZonesDeleteSamples.java similarity index 53% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteSamples.java index 66281b23086f5..f5f3cedc28e0c 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/WorkloadNetworkDnsZonesDeleteSamples.java @@ -1,20 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeleteDnsZone. */ -public final class WorkloadNetworksDeleteDnsZoneSamples { +/** + * Samples for WorkloadNetworkDnsZones Delete. + */ +public final class WorkloadNetworkDnsZonesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsZones.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteDnsZone.json */ /** * Sample code: WorkloadNetworks_DeleteDnsZone. - * + * * @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); + manager.workloadNetworkDnsZones().delete("group1", "dnsZone1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetSamples.java new file mode 100644 index 0000000000000..4fd08dc7d6fb4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkDnsZones Get. + */ +public final class WorkloadNetworkDnsZonesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetDnsZone.json + */ + /** + * Sample code: WorkloadNetworks_GetDnsZone. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsZones() + .getWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkSamples.java new file mode 100644 index 0000000000000..17c021b538a45 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkDnsZones ListByWorkloadNetwork. + */ +public final class WorkloadNetworkDnsZonesListByWorkloadNetworkSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListDnsZones.json + */ + /** + * Sample code: WorkloadNetworks_ListDnsZones. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkDnsZones().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} 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/WorkloadNetworkDnsZonesUpdateSamples.java similarity index 54% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesUpdateSamples.java index fd034fe53decc..e6c21d023e01b 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/WorkloadNetworkDnsZonesUpdateSamples.java @@ -1,30 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateDnsZone. */ -public final class WorkloadNetworksUpdateDnsZoneSamples { +/** + * Samples for WorkloadNetworkDnsZones Update. + */ +public final class WorkloadNetworkDnsZonesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsZones.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdateDnsZone.json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDnsZone resource = - manager - .workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + WorkloadNetworkDnsZone resource = manager.workloadNetworkDnsZones() + .getWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withDisplayName("dnsZone1") .withDomain(Arrays.asList()) .withDnsServerIps(Arrays.asList("1.1.1.1")) diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetSamples.java new file mode 100644 index 0000000000000..5d9f0245d8478 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkGateways Get. + */ +public final class WorkloadNetworkGatewaysGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetGateway.json + */ + /** + * Sample code: WorkloadNetworks_GetGateway. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkGateways() + .getWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkSamples.java new file mode 100644 index 0000000000000..82de3e2dc9375 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkGateways ListByWorkloadNetwork. + */ +public final class WorkloadNetworkGatewaysListByWorkloadNetworkSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListGateways.json + */ + /** + * Sample code: WorkloadNetworks_ListGateways. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkGateways().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} 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/WorkloadNetworkPortMirroringProfilesCreateSamples.java similarity index 63% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateSamples.java index c09ab8e71f583..753b07b44ce7a 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/WorkloadNetworkPortMirroringProfilesCreateSamples.java @@ -1,25 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -/** Samples for WorkloadNetworks CreatePortMirroring. */ -public final class WorkloadNetworksCreatePortMirroringSamples { +/** + * Samples for WorkloadNetworkPortMirroringProfiles Create. + */ +public final class WorkloadNetworkPortMirroringProfilesCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePortMirroringProfiles.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreatePortMirroring.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .definePortMirroring("portMirroring1") + manager.workloadNetworkPortMirroringProfiles() + .define("portMirroring1") .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("portMirroring1") .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteSamples.java new file mode 100644 index 0000000000000..fc56c90b6d2ff --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkPortMirroringProfiles Delete. + */ +public final class WorkloadNetworkPortMirroringProfilesDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeletePortMirroring.json + */ + /** + * Sample code: WorkloadNetworks_DeletePortMirroring. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPortMirroringProfiles() + .delete("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetSamples.java new file mode 100644 index 0000000000000..c388938cd1573 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkPortMirroringProfiles Get. + */ +public final class WorkloadNetworkPortMirroringProfilesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetPortMirroring.json + */ + /** + * Sample code: WorkloadNetworks_GetPortMirroring. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPortMirroringProfiles() + .getWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkSamples.java new file mode 100644 index 0000000000000..468e08cbdeee3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkPortMirroringProfiles ListByWorkloadNetwork. + */ +public final class WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListPortMirroring.json + */ + /** + * Sample code: WorkloadNetworks_ListPortMirroring. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPortMirroringProfiles() + .listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} 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/WorkloadNetworkPortMirroringProfilesUpdateSamples.java similarity index 54% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesUpdateSamples.java index 7ed8d3d07be62..c3d6832bbbaaa 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/WorkloadNetworkPortMirroringProfilesUpdateSamples.java @@ -1,30 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -/** Samples for WorkloadNetworks UpdatePortMirroring. */ -public final class WorkloadNetworksUpdatePortMirroringSamples { +/** + * Samples for WorkloadNetworkPortMirroringProfiles Update. + */ +public final class WorkloadNetworkPortMirroringProfilesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdatePortMirroringProfiles.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdatePortMirroring.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkPortMirroring resource = - manager - .workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + WorkloadNetworkPortMirroring resource = manager.workloadNetworkPortMirroringProfiles() + .getWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) .withSource("vmGroup1") .withDestination("vmGroup2") 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/WorkloadNetworkPublicIpsCreateSamples.java similarity index 57% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateSamples.java index 2f22b85d4e40a..6f1f826ec701b 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/WorkloadNetworkPublicIpsCreateSamples.java @@ -1,23 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks CreatePublicIp. */ -public final class WorkloadNetworksCreatePublicIpSamples { +/** + * Samples for WorkloadNetworkPublicIps Create. + */ +public final class WorkloadNetworkPublicIpsCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePublicIPs.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreatePublicIP.json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .definePublicIp("publicIP1") + manager.workloadNetworkPublicIps() + .define("publicIP1") .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("publicIP1") .withNumberOfPublicIPs(32L) 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/WorkloadNetworkPublicIpsDeleteSamples.java similarity index 53% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteSamples.java index 427d6728baa9e..19a24c3228d19 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/WorkloadNetworkPublicIpsDeleteSamples.java @@ -1,20 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeletePublicIp. */ -public final class WorkloadNetworksDeletePublicIpSamples { +/** + * Samples for WorkloadNetworkPublicIps Delete. + */ +public final class WorkloadNetworkPublicIpsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePublicIPs.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeletePublicIP.json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. - * + * * @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); + manager.workloadNetworkPublicIps().delete("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetSamples.java new file mode 100644 index 0000000000000..a6d8fbc751456 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkPublicIps Get. + */ +public final class WorkloadNetworkPublicIpsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetPublicIP.json + */ + /** + * Sample code: WorkloadNetworks_GetPublicIP. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPublicIps() + .getWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkSamples.java new file mode 100644 index 0000000000000..098403703570d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkPublicIps ListByWorkloadNetwork. + */ +public final class WorkloadNetworkPublicIpsListByWorkloadNetworkSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListPublicIPs.json + */ + /** + * Sample code: WorkloadNetworks_ListPublicIPs. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkPublicIps().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} 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/WorkloadNetworkSegmentsCreateSamples.java similarity index 53% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateSamples.java index d5ec7816edd6a..27aa53b4dc647 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/WorkloadNetworkSegmentsCreateSamples.java @@ -1,33 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; import java.util.Arrays; -/** Samples for WorkloadNetworks CreateSegments. */ -public final class WorkloadNetworksCreateSegmentsSamples { +/** + * Samples for WorkloadNetworkSegments Create. + */ +public final class WorkloadNetworkSegmentsCreateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateSegments.json */ /** * Sample code: WorkloadNetworks_CreateSegments. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineSegments("segment1") + manager.workloadNetworkSegments() + .define("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")) + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) + .withGatewayAddress("40.20.20.20/16")) .withRevision(1L) .create(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentSamples.java new file mode 100644 index 0000000000000..16e93d75eab40 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkSegments DeleteSegment. + */ +public final class WorkloadNetworkSegmentsDeleteSegmentSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteSegment.json + */ + /** + * Sample code: WorkloadNetworks_DeleteSegment. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkSegments() + .deleteSegment("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetSamples.java new file mode 100644 index 0000000000000..336731a24ab9d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkSegments Get. + */ +public final class WorkloadNetworkSegmentsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetSegment.json + */ + /** + * Sample code: WorkloadNetworks_GetSegment. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkSegments() + .getWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkSamples.java new file mode 100644 index 0000000000000..20b4631c33064 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkSegments ListByWorkloadNetwork. + */ +public final class WorkloadNetworkSegmentsListByWorkloadNetworkSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListSegments.json + */ + /** + * Sample code: WorkloadNetworks_ListSegments. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkSegments().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsUpdateSamples.java new file mode 100644 index 0000000000000..6798416adf1fd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; + +/** + * Samples for WorkloadNetworkSegments Update. + */ +public final class WorkloadNetworkSegmentsUpdateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdateSegments.json + */ + /** + * Sample code: WorkloadNetworks_UpdateSegments. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkSegment resource = manager.workloadNetworkSegments() + .getWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetSamples.java new file mode 100644 index 0000000000000..0cb2027bc53bd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkVirtualMachines Get. + */ +public final class WorkloadNetworkVirtualMachinesGetSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetVirtualMachine.json + */ + /** + * Sample code: WorkloadNetworks_GetVirtualMachine. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVirtualMachines() + .getWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkSamples.java new file mode 100644 index 0000000000000..a2569a3a383e9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkVirtualMachines ListByWorkloadNetwork. + */ +public final class WorkloadNetworkVirtualMachinesListByWorkloadNetworkSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListVirtualMachines.json + */ + /** + * Sample code: WorkloadNetworks_ListVirtualMachines. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVirtualMachines() + .listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateSamples.java new file mode 100644 index 0000000000000..e840edf63625b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkVmGroups Create. + */ +public final class WorkloadNetworkVmGroupsCreateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_CreateVMGroup.json + */ + /** + * Sample code: WorkloadNetworks_CreateVMGroup. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVmGroups().define("vmGroup1").withExistingPrivateCloud("group1", "cloud1").create(); + } +} 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/WorkloadNetworkVmGroupsDeleteSamples.java similarity index 53% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteSamples.java index 0c1571f66d46a..5b3e79ac643c3 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/WorkloadNetworkVmGroupsDeleteSamples.java @@ -1,20 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeleteVMGroup. */ -public final class WorkloadNetworksDeleteVMGroupSamples { +/** + * Samples for WorkloadNetworkVmGroups Delete. + */ +public final class WorkloadNetworkVmGroupsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteVMGroups.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_DeleteVMGroup.json */ /** * Sample code: WorkloadNetworks_DeleteVMGroup. - * + * * @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); + manager.workloadNetworkVmGroups().delete("group1", "vmGroup1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetSamples.java new file mode 100644 index 0000000000000..9aa8e182797da --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkVmGroups Get. + */ +public final class WorkloadNetworkVmGroupsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_GetVMGroup.json + */ + /** + * Sample code: WorkloadNetworks_GetVMGroup. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVmGroups() + .getWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkSamples.java new file mode 100644 index 0000000000000..1d9816aee762a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworkVmGroups ListByWorkloadNetwork. + */ +public final class WorkloadNetworkVmGroupsListByWorkloadNetworkSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_ListVMGroups.json + */ + /** + * Sample code: WorkloadNetworks_ListVMGroups. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworkVmGroups().listByWorkloadNetwork("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} 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/WorkloadNetworkVmGroupsUpdateSamples.java similarity index 52% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsUpdateSamples.java index d62d3f8912cc3..d4afc541235dc 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/WorkloadNetworkVmGroupsUpdateSamples.java @@ -1,28 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateVMGroup. */ -public final class WorkloadNetworksUpdateVMGroupSamples { +/** + * Samples for WorkloadNetworkVmGroups Update. + */ +public final class WorkloadNetworkVmGroupsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateVMGroups.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_UpdateVMGroup.json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkVMGroup resource = - manager - .workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) - .getValue(); + WorkloadNetworkVMGroup resource = manager.workloadNetworkVmGroups() + .getWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/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 deleted file mode 100644 index 9c2a619f24ae6..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.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.resourcemanager.avs.models.WorkloadNetworkDhcpServer; - -/** Samples for WorkloadNetworks CreateDhcp. */ -public final class WorkloadNetworksCreateDhcpSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDhcpConfigurations.json - */ - /** - * Sample code: WorkloadNetworks_CreateDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDhcp("dhcp1") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties( - new WorkloadNetworkDhcpServer() - .withDisplayName("dhcpConfigurations1") - .withRevision(1L) - .withServerAddress("40.1.5.1/24") - .withLeaseTime(86400L)) - .create(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java deleted file mode 100644 index eab7a5bbc6c09..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.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 java.util.Arrays; - -/** Samples for WorkloadNetworks CreateVMGroup. */ -public final class WorkloadNetworksCreateVMGroupSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateVMGroups.json - */ - /** - * Sample code: WorkloadNetworks_CreateVMGroup. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineVMGroup("vmGroup1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("vmGroup1") - .withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")) - .withRevision(1L) - .create(); - } -} 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 deleted file mode 100644 index abf81d8aefe19..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks DeleteDhcp. */ -public final class WorkloadNetworksDeleteDhcpSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDhcpConfigurations.json - */ - /** - * Sample code: WorkloadNetworks_DeleteDhcp. - * - * @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); - } -} 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 deleted file mode 100644 index 904ba45e2d30e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.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; - -/** Samples for WorkloadNetworks DeleteDnsService. */ -public final class WorkloadNetworksDeleteDnsServiceSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsServices.json - */ - /** - * Sample code: WorkloadNetworks_DeleteDnsService. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksDeleteDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .deleteDnsService("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index fefe13a2b7ed3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.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; - -/** Samples for WorkloadNetworks DeletePortMirroring. */ -public final class WorkloadNetworksDeletePortMirroringSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePortMirroringProfiles.json - */ - /** - * Sample code: WorkloadNetworks_DeletePortMirroring. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .deletePortMirroring("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 38e57a5fbcc19..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks DeleteSegment. */ -public final class WorkloadNetworksDeleteSegmentSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteSegments.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); - } -} 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 deleted file mode 100644 index 6e9950795300b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks GetDhcp. */ -public final class WorkloadNetworksGetDhcpSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDhcpConfigurations.json - */ - /** - * Sample code: WorkloadNetworks_GetDhcp. - * - * @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); - } -} 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 deleted file mode 100644 index e4af222817137..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.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; - -/** Samples for WorkloadNetworks GetDnsService. */ -public final class WorkloadNetworksGetDnsServiceSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsServices.json - */ - /** - * 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); - } -} 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 deleted file mode 100644 index 9ee15ef71655c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.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; - -/** Samples for WorkloadNetworks GetDnsZone. */ -public final class WorkloadNetworksGetDnsZoneSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsZones.json - */ - /** - * Sample code: WorkloadNetworks_GetDnsZone. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 853753c00cda3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.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; - -/** Samples for WorkloadNetworks GetGateway. */ -public final class WorkloadNetworksGetGatewaySamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetGateway.json - */ - /** - * Sample code: WorkloadNetworks_GetGateway. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getGatewayWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 7057a0a92109a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.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; - -/** Samples for WorkloadNetworks GetPortMirroring. */ -public final class WorkloadNetworksGetPortMirroringSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPortMirroringProfiles.json - */ - /** - * Sample code: WorkloadNetworks_GetPortMirroring. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index de72d7f66f400..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.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; - -/** Samples for WorkloadNetworks GetPublicIp. */ -public final class WorkloadNetworksGetPublicIpSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPublicIPs.json - */ - /** - * Sample code: WorkloadNetworks_GetPublicIP. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getPublicIpWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java index 8733479cb26b1..efba7605f6148 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 @@ -1,24 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; - -/** Samples for WorkloadNetworks Get. */ +/** + * Samples for WorkloadNetworks Get. + */ public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_Get.json */ /** * Sample code: WorkloadNetworks_Get. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getWithResponse("group1", "cloud1", WorkloadNetworkName.DEFAULT, com.azure.core.util.Context.NONE); + manager.workloadNetworks().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java deleted file mode 100644 index 2c41d9b11f542..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.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; - -/** Samples for WorkloadNetworks GetSegment. */ -public final class WorkloadNetworksGetSegmentSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetSegments.json - */ - /** - * Sample code: WorkloadNetworks_GetSegment. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index b50fa36561e09..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.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; - -/** Samples for WorkloadNetworks GetVMGroup. */ -public final class WorkloadNetworksGetVMGroupSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVMGroups.json - */ - /** - * Sample code: WorkloadNetworks_GetVMGroup. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index a98f76ed7abe8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.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; - -/** Samples for WorkloadNetworks GetVirtualMachine. */ -public final class WorkloadNetworksGetVirtualMachineSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVirtualMachine.json - */ - /** - * Sample code: WorkloadNetworks_GetVirtualMachine. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getVirtualMachineWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudSamples.java new file mode 100644 index 0000000000000..bf22b37062a3a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for WorkloadNetworks ListByPrivateCloud. + */ +public final class WorkloadNetworksListByPrivateCloudSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_List.json + */ + /** + * Sample code: WorkloadNetworks_List. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java deleted file mode 100644 index 09638408d3afa..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks ListDhcp. */ -public final class WorkloadNetworksListDhcpSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDhcpConfigurations.json - */ - /** - * Sample code: WorkloadNetworks_ListDhcp. - * - * @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); - } -} 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 deleted file mode 100644 index 0ca4075dd7589..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks ListDnsServices. */ -public final class WorkloadNetworksListDnsServicesSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsServices.json - */ - /** - * Sample code: WorkloadNetworks_ListDnsServices. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDnsServices("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 56eacb363b20b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks ListDnsZones. */ -public final class WorkloadNetworksListDnsZonesSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsZones.json - */ - /** - * Sample code: WorkloadNetworks_ListDnsZones. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDnsZones("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index e3f659863b029..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks ListGateways. */ -public final class WorkloadNetworksListGatewaysSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-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); - } -} 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 deleted file mode 100644 index 2c4c45eeba3df..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks ListPortMirroring. */ -public final class WorkloadNetworksListPortMirroringSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListPortMirroringProfiles.json - */ - /** - * Sample code: WorkloadNetworks_ListPortMirroring. - * - * @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); - } -} 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 deleted file mode 100644 index 98881bc870c0b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks ListPublicIPs. */ -public final class WorkloadNetworksListPublicIPsSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-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); - } -} 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 deleted file mode 100644 index 9dfe9ef9a52a8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks List. */ -public final class WorkloadNetworksListSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_List.json - */ - /** - * Sample code: WorkloadNetworks_List. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().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/WorkloadNetworksListSegmentsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java deleted file mode 100644 index abc4a380844f8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks ListSegments. */ -public final class WorkloadNetworksListSegmentsSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListSegments.json - */ - /** - * Sample code: WorkloadNetworks_ListSegments. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listSegments("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 59139f06bb4f1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks ListVMGroups. */ -public final class WorkloadNetworksListVMGroupsSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVMGroups.json - */ - /** - * Sample code: WorkloadNetworks_ListVMGroups. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listVMGroups("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index b1f949c196ba8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 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 WorkloadNetworks ListVirtualMachines. */ -public final class WorkloadNetworksListVirtualMachinesSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVirtualMachines.json - */ - /** - * Sample code: WorkloadNetworks_ListVirtualMachines. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listVirtualMachines("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 4bbac534bf2f8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.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.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; - -/** Samples for WorkloadNetworks UpdateDhcp. */ -public final class WorkloadNetworksUpdateDhcpSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDhcpConfigurations.json - */ - /** - * Sample code: WorkloadNetworks_UpdateDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDhcp resource = - manager - .workloadNetworks() - .getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withProperties( - new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400L)) - .apply(); - } -} 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 deleted file mode 100644 index ad8d9759af2c2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.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.resourcemanager.avs.models.WorkloadNetworkSegment; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.util.Arrays; - -/** Samples for WorkloadNetworks UpdateSegments. */ -public final class WorkloadNetworksUpdateSegmentsSamples { - /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateSegments.json - */ - /** - * Sample code: WorkloadNetworks_UpdateSegments. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkSegment resource = - manager - .workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) - .getValue(); - 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(); - } -} 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 index 2a499275c5757..9497c42457e17 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,17 +11,16 @@ public final class AddonArcPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AddonArcProperties model = - BinaryData - .fromString("{\"addonType\":\"Arc\",\"vCenter\":\"gtltdhlf\",\"provisioningState\":\"Deleting\"}") + AddonArcProperties model + = BinaryData.fromString("{\"addonType\":\"Arc\",\"vCenter\":\"hc\",\"provisioningState\":\"Succeeded\"}") .toObject(AddonArcProperties.class); - Assertions.assertEquals("gtltdhlf", model.vCenter()); + Assertions.assertEquals("hc", model.vCenter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonArcProperties model = new AddonArcProperties().withVCenter("gtltdhlf"); + AddonArcProperties model = new AddonArcProperties().withVCenter("hc"); model = BinaryData.fromObject(model).toObject(AddonArcProperties.class); - Assertions.assertEquals("gtltdhlf", model.vCenter()); + Assertions.assertEquals("hc", 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 index 979fc31d28896..879e691d9474d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,17 +11,16 @@ public final class AddonHcxPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AddonHcxProperties model = - BinaryData - .fromString("{\"addonType\":\"HCX\",\"offer\":\"frbbc\",\"provisioningState\":\"Building\"}") - .toObject(AddonHcxProperties.class); - Assertions.assertEquals("frbbc", model.offer()); + AddonHcxProperties model = BinaryData + .fromString("{\"addonType\":\"HCX\",\"offer\":\"cslfaoqzpiyylha\",\"provisioningState\":\"Deleting\"}") + .toObject(AddonHcxProperties.class); + Assertions.assertEquals("cslfaoqzpiyylha", model.offer()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonHcxProperties model = new AddonHcxProperties().withOffer("frbbc"); + AddonHcxProperties model = new AddonHcxProperties().withOffer("cslfaoqzpiyylha"); model = BinaryData.fromObject(model).toObject(AddonHcxProperties.class); - Assertions.assertEquals("frbbc", model.offer()); + Assertions.assertEquals("cslfaoqzpiyylha", 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 index 74547bd794f2b..4dbab9ad3b4a5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,11 +11,9 @@ public final class AddonInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AddonInner model = - BinaryData - .fromString( - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"jjoqkagf\",\"name\":\"sxtta\",\"type\":\"gzxnfaazpxdtnk\"}") - .toObject(AddonInner.class); + AddonInner model = BinaryData.fromString( + "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"uzkopbminrfd\",\"name\":\"oyuhhziui\",\"type\":\"fozbhdmsmlmzqhof\"}") + .toObject(AddonInner.class); } @org.junit.jupiter.api.Test diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListResultTests.java new file mode 100644 index 0000000000000..187cfddb0fdb5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.AddonListResult; +import org.junit.jupiter.api.Assertions; + +public final class AddonListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AddonListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"nkbykutwpfhp\",\"name\":\"gmhrskdsnfdsdoak\",\"type\":\"tdlmkkzevd\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"usdsttwv\",\"name\":\"gvbbejdcng\",\"type\":\"qmoa\"}],\"nextLink\":\"fgmjzrwrdgrt\"}") + .toObject(AddonListResult.class); + Assertions.assertEquals("fgmjzrwrdgrt", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.java deleted file mode 100644 index 8d426cc1a158e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AddonList; - -public final class AddonListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddonList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"gumhjglikkxws\",\"name\":\"olbq\",\"type\":\"vuzlm\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"fktgplc\",\"name\":\"pwjxezn\",\"type\":\"igbrnjw\"}],\"nextLink\":\"kpnb\"}") - .toObject(AddonList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonList model = new AddonList(); - model = BinaryData.fromObject(model).toObject(AddonList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonPropertiesTests.java index 2b27277b1f819..172c78e240991 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,9 +10,8 @@ public final class AddonPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AddonProperties model = - BinaryData - .fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"}") + AddonProperties model + = BinaryData.fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"}") .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 index 6a5e175dde034..a3549db1c1053 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,17 +11,16 @@ public final class AddonVrPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AddonVrProperties model = - BinaryData - .fromString("{\"addonType\":\"VR\",\"vrsCount\":1931037183,\"provisioningState\":\"Cancelled\"}") + AddonVrProperties model + = BinaryData.fromString("{\"addonType\":\"VR\",\"vrsCount\":674060065,\"provisioningState\":\"Failed\"}") .toObject(AddonVrProperties.class); - Assertions.assertEquals(1931037183, model.vrsCount()); + Assertions.assertEquals(674060065, model.vrsCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonVrProperties model = new AddonVrProperties().withVrsCount(1931037183); + AddonVrProperties model = new AddonVrProperties().withVrsCount(674060065); model = BinaryData.fromObject(model).toObject(AddonVrProperties.class); - Assertions.assertEquals(1931037183, model.vrsCount()); + Assertions.assertEquals(674060065, 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 index 676f8c0b44872..30e896bfdad4c 100644 --- 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 @@ -1,70 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class AddonsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"wndyqleallk\",\"name\":\"mtkhlowkxxpvbr\",\"type\":\"fjmzsyzfho\"}"; - String responseStr = - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"iblkujr\",\"name\":\"lfojuidjp\",\"type\":\"uyjucejikzo\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Addon response = manager.addons() + .define("v") + .withExistingPrivateCloud("kjxnqpvwgfstmhq", "kizmdksaoafclu") + .withProperties(new AddonProperties()) + .create(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Addon response = - manager - .addons() - .define("gbwidqlvh") - .withExistingPrivateCloud("vkyylizrzbjpsf", "sfuztlvtmv") - .withProperties(new AddonProperties()) - .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java index de8ef2c0512e1..2107b3d94c794 100644 --- 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 @@ -1,61 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class AddonsDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("abeolhbhlvbm", "uqibsxtkcu", "fbsfarfsiow", com.azure.core.util.Context.NONE); - manager.addons().delete("iqsowsaaelc", "ttcjuhplrvkmjc", "mjvlgfgg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java index 19e9547845dcf..f2c2901c66eb1 100644 --- 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 @@ -1,64 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.Addon; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class AddonsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"nlbqnbldxeaclg\",\"name\":\"chorimkrsr\",\"type\":\"moucsofldpuviyfc\"}"; - String responseStr = - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Failed\"},\"id\":\"eb\",\"name\":\"fulbmoichdl\",\"type\":\"nfpubntnbatz\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Addon response = manager.addons() + .getWithResponse("gahxkumasjcaa", "fdmmcpug", "ehqepvufhbzehe", com.azure.core.util.Context.NONE) + .getValue(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Addon response = - manager.addons().getWithResponse("hcspo", "aqa", "sipi", com.azure.core.util.Context.NONE).getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java index bb8fdca716387..1a56591d46cf9 100644 --- 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 @@ -1,64 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.Addon; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class AddonsListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"fsv\",\"name\":\"pavbo\",\"type\":\"fppdbwnu\"}]}"; - String responseStr = - "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"oihiqak\",\"name\":\"diw\",\"type\":\"brkwpzdqt\"}]}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + PagedIterable response + = manager.addons().list("aimmoiroqb", "shbraga", com.azure.core.util.Context.NONE); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.addons().list("wlpxuzzjg", "refqy", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java index 474e0b5190663..591e593ef5b2a 100644 --- 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 @@ -1,61 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class AuthorizationsDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("n", "ypuuwwltvuqjctze", "keifzzhmkdasv", com.azure.core.util.Context.NONE); - manager.authorizations().delete("nm", "gv", "irpghriypoqeyh", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.java index a1b26575fe184..a3dd7dae3edf5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,25 +12,22 @@ public final class AvailabilityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AvailabilityProperties model = - BinaryData - .fromString("{\"strategy\":\"SingleZone\",\"zone\":355088461,\"secondaryZone\":1152812045}") + AvailabilityProperties model + = BinaryData.fromString("{\"strategy\":\"SingleZone\",\"zone\":1403309762,\"secondaryZone\":1554551214}") .toObject(AvailabilityProperties.class); Assertions.assertEquals(AvailabilityStrategy.SINGLE_ZONE, model.strategy()); - Assertions.assertEquals(355088461, model.zone()); - Assertions.assertEquals(1152812045, model.secondaryZone()); + Assertions.assertEquals(1403309762, model.zone()); + Assertions.assertEquals(1554551214, model.secondaryZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AvailabilityProperties model = - new AvailabilityProperties() - .withStrategy(AvailabilityStrategy.SINGLE_ZONE) - .withZone(355088461) - .withSecondaryZone(1152812045); + AvailabilityProperties model = new AvailabilityProperties().withStrategy(AvailabilityStrategy.SINGLE_ZONE) + .withZone(1403309762) + .withSecondaryZone(1554551214); model = BinaryData.fromObject(model).toObject(AvailabilityProperties.class); Assertions.assertEquals(AvailabilityStrategy.SINGLE_ZONE, model.strategy()); - Assertions.assertEquals(355088461, model.zone()); - Assertions.assertEquals(1152812045, model.secondaryZone()); + Assertions.assertEquals(1403309762, model.zone()); + Assertions.assertEquals(1554551214, 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 index 834ab4eeaf911..1556269e244fe 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,11 +10,9 @@ public final class CircuitTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Circuit model = - BinaryData - .fromString( - "{\"primarySubnet\":\"runmp\",\"secondarySubnet\":\"tdbhrbnla\",\"expressRouteID\":\"xmyskp\",\"expressRoutePrivatePeeringID\":\"enbtkcxywny\"}") - .toObject(Circuit.class); + Circuit model = BinaryData.fromString( + "{\"primarySubnet\":\"kao\",\"secondarySubnet\":\"yiftyhxhuro\",\"expressRouteID\":\"tyxolniwpwc\",\"expressRoutePrivatePeeringID\":\"jfkgiawxk\"}") + .toObject(Circuit.class); } @org.junit.jupiter.api.Test 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 index 414fd1729744d..b33dc2c525323 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,18 +11,16 @@ public final class CloudLinkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CloudLinkInner model = - BinaryData - .fromString( - "{\"properties\":{\"status\":\"Deleting\",\"linkedCloud\":\"qkghtpwijnhy\"},\"id\":\"svfycxzbfv\",\"name\":\"owvrvmtgjqppyos\",\"type\":\"ronzmyhgfip\"}") - .toObject(CloudLinkInner.class); - Assertions.assertEquals("qkghtpwijnhy", model.linkedCloud()); + CloudLinkInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Building\",\"linkedCloud\":\"dwbwhkszzcmrvexz\"},\"id\":\"bt\",\"name\":\"gsfraoyzkoow\",\"type\":\"lmnguxaw\"}") + .toObject(CloudLinkInner.class); + Assertions.assertEquals("dwbwhkszzcmrvexz", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkInner model = new CloudLinkInner().withLinkedCloud("qkghtpwijnhy"); + CloudLinkInner model = new CloudLinkInner().withLinkedCloud("dwbwhkszzcmrvexz"); model = BinaryData.fromObject(model).toObject(CloudLinkInner.class); - Assertions.assertEquals("qkghtpwijnhy", model.linkedCloud()); + Assertions.assertEquals("dwbwhkszzcmrvexz", model.linkedCloud()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListResultTests.java new file mode 100644 index 0000000000000..fce7fa7a20cd2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.CloudLinkListResult; +import org.junit.jupiter.api.Assertions; + +public final class CloudLinkListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CloudLinkListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Failed\",\"linkedCloud\":\"tncormrlxqtvco\"},\"id\":\"dflvkg\",\"name\":\"u\",\"type\":\"gdknnqv\"},{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Building\",\"linkedCloud\":\"orudsgsa\"},\"id\":\"kycgrauwj\",\"name\":\"etaebu\",\"type\":\"u\"},{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Building\",\"linkedCloud\":\"zlxwabmqoefkifr\"},\"id\":\"puqujmqlgkfbtn\",\"name\":\"oaongbjc\",\"type\":\"tujitcjedft\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Deleting\",\"linkedCloud\":\"jvdcpzfoqouic\"},\"id\":\"xarzgszufoxciq\",\"name\":\"p\",\"type\":\"doamciodhkha\"}],\"nextLink\":\"khnzbonlw\"}") + .toObject(CloudLinkListResult.class); + Assertions.assertEquals("tncormrlxqtvco", model.value().get(0).linkedCloud()); + Assertions.assertEquals("khnzbonlw", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.java deleted file mode 100644 index 5725b81b69df7..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.CloudLinkList; - -public final class CloudLinkListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudLinkList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"status\":\"Deleting\",\"linkedCloud\":\"ccsnjvcdwxlpq\"},\"id\":\"kftnkhtjsyin\",\"name\":\"wfqatmtd\",\"type\":\"tmdvypgikdgs\"},{\"properties\":{\"status\":\"Active\",\"linkedCloud\":\"irryuzhlh\"},\"id\":\"joqrvqqaatj\",\"name\":\"nrvgoupmfiibfgg\",\"type\":\"ioolvrwxkvtkkgll\"},{\"properties\":{\"status\":\"Deleting\",\"linkedCloud\":\"vjayvblmhvkzu\"},\"id\":\"bxvvyhg\",\"name\":\"opbyrqufegxu\",\"type\":\"wz\"},{\"properties\":{\"status\":\"Disconnected\",\"linkedCloud\":\"mctlpdngitv\"},\"id\":\"bmhrixkwmyijejv\",\"name\":\"grhbpn\",\"type\":\"ixexcc\"}],\"nextLink\":\"reaxhcexdr\"}") - .toObject(CloudLinkList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudLinkList model = new CloudLinkList(); - model = BinaryData.fromObject(model).toObject(CloudLinkList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkPropertiesTests.java index 7112db7915a1a..7e687c91b28b9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,17 +11,16 @@ public final class CloudLinkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CloudLinkProperties model = - BinaryData - .fromString("{\"status\":\"Deleting\",\"linkedCloud\":\"mcwaekrrjr\"}") - .toObject(CloudLinkProperties.class); - Assertions.assertEquals("mcwaekrrjr", model.linkedCloud()); + CloudLinkProperties model = BinaryData + .fromString("{\"provisioningState\":\"Succeeded\",\"status\":\"Deleting\",\"linkedCloud\":\"uuximerq\"}") + .toObject(CloudLinkProperties.class); + Assertions.assertEquals("uuximerq", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("mcwaekrrjr"); + CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("uuximerq"); model = BinaryData.fromObject(model).toObject(CloudLinkProperties.class); - Assertions.assertEquals("mcwaekrrjr", model.linkedCloud()); + Assertions.assertEquals("uuximerq", 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 index 254fb5acc11e1..e6d8f6b8da1fe 100644 --- 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 @@ -1,72 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.CloudLink; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class CloudLinksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"status\":\"Deleting\",\"linkedCloud\":\"glh\"},\"id\":\"rr\",\"name\":\"yejylmbkzudnigrf\",\"type\":\"hotj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CloudLink response = - manager - .cloudLinks() - .define("ubhvj") - .withExistingPrivateCloud("uic", "hvtrrmhwrbfdpyf") - .withLinkedCloud("uyzlw") - .create(); - - Assertions.assertEquals("glh", response.linkedCloud()); + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Building\",\"linkedCloud\":\"gbdvibidmhmwff\"},\"id\":\"fmuvapckccr\",\"name\":\"vwe\",\"type\":\"oxoyyukp\"}"; + + 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("pmkmlmvevfx") + .withExistingPrivateCloud("bcrymodizrx", "lobdxna") + .withLinkedCloud("xliohrdddt") + .create(); + + Assertions.assertEquals("gbdvibidmhmwff", 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 index e7b232ad2f1a5..1b85b4dd85385 100644 --- 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 @@ -1,61 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class CloudLinksDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("ytprwnwvroev", "tlyo", "rrrouuxvnsa", com.azure.core.util.Context.NONE); - manager.cloudLinks().delete("lhikcyychunsj", "pjrtws", "hv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java index 32687f4d5b345..925e511b03a47 100644 --- 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 @@ -1,70 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.CloudLink; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class CloudLinksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Active\",\"linkedCloud\":\"mxxdtddmflh\"},\"id\":\"tx\",\"name\":\"vtzn\",\"type\":\"pxbannovvoxc\"}"; - String responseStr = - "{\"properties\":{\"status\":\"Disconnected\",\"linkedCloud\":\"ecb\"},\"id\":\"opwndyqleallk\",\"name\":\"mtkhlowkxxpvbr\",\"type\":\"fjmzsyzfho\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + CloudLink response = manager.cloudLinks() + .getWithResponse("inqcymczngnbdxxe", "unin", "udbchaqdtv", com.azure.core.util.Context.NONE) + .getValue(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CloudLink response = - manager - .cloudLinks() - .getWithResponse("ycjimryvwgcwwpbm", "gwe", "ydsx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ecb", response.linkedCloud()); + Assertions.assertEquals("mxxdtddmflh", 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 index 550ae0b084e4e..2b8d8bc8b82e2 100644 --- 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 @@ -1,68 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.CloudLink; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class CloudLinksListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Disconnected\",\"linkedCloud\":\"nlvhhtklnvnafvv\"},\"id\":\"f\",\"name\":\"devjb\",\"type\":\"slcqxypokkh\"}]}"; - String responseStr = - "{\"value\":[{\"properties\":{\"status\":\"Building\",\"linkedCloud\":\"cudfbsfarfsiowl\"},\"id\":\"jxnqp\",\"name\":\"wgfstmhqykizm\",\"type\":\"ksaoafcluqvox\"}]}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + PagedIterable response + = manager.cloudLinks().list("rljyoogwxhnsdu", "gwbsreurf", com.azure.core.util.Context.NONE); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.cloudLinks().list("eolhbhlvbmx", "qi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cudfbsfarfsiowl", response.iterator().next().linkedCloud()); + Assertions.assertEquals("nlvhhtklnvnafvv", 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 index d344ae6761bc2..a9a43acfa9b15 100644 --- 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 @@ -1,38 +1,51 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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( - "{\"sku\":{\"name\":\"nmxiebwwaloayqc\"},\"properties\":{\"clusterSize\":1428727987,\"provisioningState\":\"Deleting\",\"clusterId\":442573185,\"hosts\":[\"yzm\",\"txon\",\"mtsavjcbpwxqp\"]},\"id\":\"rknftguvriuhprwm\",\"name\":\"yvxqtayriwwroy\",\"type\":\"bexrmcq\"}") - .toObject(ClusterInner.class); - Assertions.assertEquals("nmxiebwwaloayqc", model.sku().name()); - Assertions.assertEquals(1428727987, model.clusterSize()); - Assertions.assertEquals("yzm", model.hosts().get(0)); + ClusterInner model = BinaryData.fromString( + "{\"properties\":{\"clusterSize\":2024300309,\"provisioningState\":\"Failed\",\"clusterId\":804356907,\"hosts\":[\"vpk\",\"lrxnjeaseiphe\",\"f\",\"okeyyienj\"],\"vsanDatastoreName\":\"lwtgrhpdj\"},\"sku\":{\"name\":\"jumasx\",\"tier\":\"Basic\",\"size\":\"qyeg\",\"family\":\"lhbxxhejjzzvdud\",\"capacity\":621270176},\"id\":\"lfh\",\"name\":\"twmcynpwlb\",\"type\":\"npgacftade\"}") + .toObject(ClusterInner.class); + Assertions.assertEquals("jumasx", model.sku().name()); + Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); + Assertions.assertEquals("qyeg", model.sku().size()); + Assertions.assertEquals("lhbxxhejjzzvdud", model.sku().family()); + Assertions.assertEquals(621270176, model.sku().capacity()); + Assertions.assertEquals(2024300309, model.clusterSize()); + Assertions.assertEquals("vpk", model.hosts().get(0)); + Assertions.assertEquals("lwtgrhpdj", model.vsanDatastoreName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterInner model = - new ClusterInner() - .withSku(new Sku().withName("nmxiebwwaloayqc")) - .withClusterSize(1428727987) - .withHosts(Arrays.asList("yzm", "txon", "mtsavjcbpwxqp")); + ClusterInner model = new ClusterInner() + .withSku(new Sku().withName("jumasx") + .withTier(SkuTier.BASIC) + .withSize("qyeg") + .withFamily("lhbxxhejjzzvdud") + .withCapacity(621270176)) + .withClusterSize(2024300309) + .withHosts(Arrays.asList("vpk", "lrxnjeaseiphe", "f", "okeyyienj")) + .withVsanDatastoreName("lwtgrhpdj"); model = BinaryData.fromObject(model).toObject(ClusterInner.class); - Assertions.assertEquals("nmxiebwwaloayqc", model.sku().name()); - Assertions.assertEquals(1428727987, model.clusterSize()); - Assertions.assertEquals("yzm", model.hosts().get(0)); + Assertions.assertEquals("jumasx", model.sku().name()); + Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); + Assertions.assertEquals("qyeg", model.sku().size()); + Assertions.assertEquals("lhbxxhejjzzvdud", model.sku().family()); + Assertions.assertEquals(621270176, model.sku().capacity()); + Assertions.assertEquals(2024300309, model.clusterSize()); + Assertions.assertEquals("vpk", model.hosts().get(0)); + Assertions.assertEquals("lwtgrhpdj", model.vsanDatastoreName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListResultTests.java new file mode 100644 index 0000000000000..d84bc91f35297 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListResultTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.ClusterListResult; +import com.azure.resourcemanager.avs.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class ClusterListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"clusterSize\":1323879070,\"provisioningState\":\"Deleting\",\"clusterId\":1853852705,\"hosts\":[\"hhbcsglummajtjao\",\"xobnbdxkqpxok\"],\"vsanDatastoreName\":\"ionpimexg\"},\"sku\":{\"name\":\"txgcpodgmaajr\",\"tier\":\"Basic\",\"size\":\"wzrlovmclwhij\",\"family\":\"ejctbzaqsqsycb\",\"capacity\":1508721218},\"id\":\"gukdkexxppo\",\"name\":\"mxaxc\",\"type\":\"jpgd\"},{\"properties\":{\"clusterSize\":263932996,\"provisioningState\":\"Cancelled\",\"clusterId\":1680873734,\"hosts\":[\"mouexhdzx\",\"bqe\",\"jnxqbzvddntwn\"],\"vsanDatastoreName\":\"icbtwnpzao\"},\"sku\":{\"name\":\"vuhrhcffcyddgl\",\"tier\":\"Free\",\"size\":\"jqkwpyeicx\",\"family\":\"ciwqvhk\",\"capacity\":1053923929},\"id\":\"igdtopbob\",\"name\":\"og\",\"type\":\"m\"},{\"properties\":{\"clusterSize\":35431541,\"provisioningState\":\"Canceled\",\"clusterId\":1242660761,\"hosts\":[\"ayvvtpgvdf\"],\"vsanDatastoreName\":\"otkftutqxlngx\"},\"sku\":{\"name\":\"efgugnxk\",\"tier\":\"Basic\",\"size\":\"mi\",\"family\":\"thz\",\"capacity\":2050810494},\"id\":\"rabhjybigeho\",\"name\":\"fbowskanyk\",\"type\":\"zlcuiywgqywgndrv\"},{\"properties\":{\"clusterSize\":1744996179,\"provisioningState\":\"Canceled\",\"clusterId\":539523379,\"hosts\":[\"gyncocpecfvmmc\",\"ofsx\",\"zevgb\"],\"vsanDatastoreName\":\"jqabcypmivkwlzuv\"},\"sku\":{\"name\":\"c\",\"tier\":\"Premium\",\"size\":\"nbacfi\",\"family\":\"l\",\"capacity\":10134075},\"id\":\"tqgtzxdpnqbqq\",\"name\":\"xrjfeallnwsub\",\"type\":\"snjampmng\"}],\"nextLink\":\"scxaq\"}") + .toObject(ClusterListResult.class); + Assertions.assertEquals("txgcpodgmaajr", model.value().get(0).sku().name()); + Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); + Assertions.assertEquals("wzrlovmclwhij", model.value().get(0).sku().size()); + Assertions.assertEquals("ejctbzaqsqsycb", model.value().get(0).sku().family()); + Assertions.assertEquals(1508721218, model.value().get(0).sku().capacity()); + Assertions.assertEquals(1323879070, model.value().get(0).clusterSize()); + Assertions.assertEquals("hhbcsglummajtjao", model.value().get(0).hosts().get(0)); + Assertions.assertEquals("ionpimexg", model.value().get(0).vsanDatastoreName()); + Assertions.assertEquals("scxaq", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java deleted file mode 100644 index 15d12990b24ca..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ClusterList; - -public final class ClusterListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterList model = - BinaryData - .fromString( - "{\"value\":[{\"sku\":{\"name\":\"ag\"},\"properties\":{\"clusterSize\":230289658,\"provisioningState\":\"Cancelled\",\"clusterId\":683816537,\"hosts\":[\"hahvljuahaq\",\"hcdhmdual\",\"exq\",\"vfadmws\"]},\"id\":\"crgvxpvgom\",\"name\":\"lf\",\"type\":\"isgwbnbbeldawkz\"},{\"sku\":{\"name\":\"ali\"},\"properties\":{\"clusterSize\":952194839,\"provisioningState\":\"Deleting\",\"clusterId\":391809232,\"hosts\":[\"ashsfwxos\",\"w\",\"xcug\"]},\"id\":\"cjooxdjebwpucwwf\",\"name\":\"ovbvmeueciv\",\"type\":\"hzceuojgjrwjue\"},{\"sku\":{\"name\":\"otwmcdyt\"},\"properties\":{\"clusterSize\":384724385,\"provisioningState\":\"Canceled\",\"clusterId\":1070997174,\"hosts\":[\"wgqwgxhn\",\"skxfbk\",\"y\"]},\"id\":\"gklwn\",\"name\":\"nhjdauw\",\"type\":\"vylwzbtdhxuj\"},{\"sku\":{\"name\":\"nbmpowuwprzq\"},\"properties\":{\"clusterSize\":97995700,\"provisioningState\":\"Cancelled\",\"clusterId\":683546621,\"hosts\":[\"khfxobbcswsrt\"]},\"id\":\"riplrbpbewtg\",\"name\":\"fgb\",\"type\":\"c\"}],\"nextLink\":\"xzvlvqhjkbegib\"}") - .toObject(ClusterList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterList model = new ClusterList(); - model = BinaryData.fromObject(model).toObject(ClusterList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterPropertiesTests.java index bbe8a08dba3fa..c63a5373aad27 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,21 +12,22 @@ public final class ClusterPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterProperties model = - BinaryData - .fromString( - "{\"clusterSize\":1430552166,\"provisioningState\":\"Succeeded\",\"clusterId\":934632065,\"hosts\":[\"nmefqsgzvahapj\"]}") - .toObject(ClusterProperties.class); - Assertions.assertEquals(1430552166, model.clusterSize()); - Assertions.assertEquals("nmefqsgzvahapj", model.hosts().get(0)); + ClusterProperties model = BinaryData.fromString( + "{\"clusterSize\":2035779275,\"provisioningState\":\"Cancelled\",\"clusterId\":1099330569,\"hosts\":[\"ppusuesnzwdejba\",\"orxzdmohctbqvud\",\"xdn\"],\"vsanDatastoreName\":\"vo\"}") + .toObject(ClusterProperties.class); + Assertions.assertEquals(2035779275, model.clusterSize()); + Assertions.assertEquals("ppusuesnzwdejba", model.hosts().get(0)); + Assertions.assertEquals("vo", model.vsanDatastoreName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterProperties model = - new ClusterProperties().withClusterSize(1430552166).withHosts(Arrays.asList("nmefqsgzvahapj")); + ClusterProperties model = new ClusterProperties().withClusterSize(2035779275) + .withHosts(Arrays.asList("ppusuesnzwdejba", "orxzdmohctbqvud", "xdn")) + .withVsanDatastoreName("vo"); model = BinaryData.fromObject(model).toObject(ClusterProperties.class); - Assertions.assertEquals(1430552166, model.clusterSize()); - Assertions.assertEquals("nmefqsgzvahapj", model.hosts().get(0)); + Assertions.assertEquals(2035779275, model.clusterSize()); + Assertions.assertEquals("ppusuesnzwdejba", model.hosts().get(0)); + Assertions.assertEquals("vo", 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 index 2be1f162a9abb..f714a02f1fd5c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,23 +12,19 @@ public final class ClusterUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterUpdateProperties model = - BinaryData - .fromString( - "{\"clusterSize\":977455104,\"hosts\":[\"zunlu\",\"hnnpr\",\"xipeilpjzuaejx\",\"ultskzbbtdz\"]}") + ClusterUpdateProperties model + = BinaryData.fromString("{\"clusterSize\":31402912,\"hosts\":[\"fyexfwhy\",\"cibvyvdcsitynn\"]}") .toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(977455104, model.clusterSize()); - Assertions.assertEquals("zunlu", model.hosts().get(0)); + Assertions.assertEquals(31402912, model.clusterSize()); + Assertions.assertEquals("fyexfwhy", model.hosts().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterUpdateProperties model = - new ClusterUpdateProperties() - .withClusterSize(977455104) - .withHosts(Arrays.asList("zunlu", "hnnpr", "xipeilpjzuaejx", "ultskzbbtdz")); + ClusterUpdateProperties model = new ClusterUpdateProperties().withClusterSize(31402912) + .withHosts(Arrays.asList("fyexfwhy", "cibvyvdcsitynn")); model = BinaryData.fromObject(model).toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(977455104, model.clusterSize()); - Assertions.assertEquals("zunlu", model.hosts().get(0)); + Assertions.assertEquals(31402912, model.clusterSize()); + Assertions.assertEquals("fyexfwhy", 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 index 682fd45a22ea9..0e3f65f1d48a9 100644 --- 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 @@ -1,31 +1,45 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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("{\"properties\":{\"clusterSize\":1715507551,\"hosts\":[\"qzcjrvxdj\",\"lmwlxkvugfhzo\"]}}") - .toObject(ClusterUpdate.class); - Assertions.assertEquals(1715507551, model.clusterSize()); - Assertions.assertEquals("qzcjrvxdj", model.hosts().get(0)); + ClusterUpdate model = BinaryData.fromString( + "{\"sku\":{\"name\":\"ujjugwdkcglh\",\"tier\":\"Basic\",\"size\":\"jdyggdtji\",\"family\":\"b\",\"capacity\":2140516005},\"properties\":{\"clusterSize\":662259969,\"hosts\":[\"kh\"]}}") + .toObject(ClusterUpdate.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(662259969, model.clusterSize()); + Assertions.assertEquals("kh", model.hosts().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClusterUpdate model = - new ClusterUpdate().withClusterSize(1715507551).withHosts(Arrays.asList("qzcjrvxdj", "lmwlxkvugfhzo")); + ClusterUpdate model = new ClusterUpdate().withSku(new Sku().withName("ujjugwdkcglh") + .withTier(SkuTier.BASIC) + .withSize("jdyggdtji") + .withFamily("b") + .withCapacity(2140516005)).withClusterSize(662259969).withHosts(Arrays.asList("kh")); model = BinaryData.fromObject(model).toObject(ClusterUpdate.class); - Assertions.assertEquals(1715507551, model.clusterSize()); - Assertions.assertEquals("qzcjrvxdj", model.hosts().get(0)); + 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(662259969, model.clusterSize()); + Assertions.assertEquals("kh", 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 index c24f51b6108e9..54d5ac2fd8210 100644 --- 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 @@ -1,29 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; -import com.azure.resourcemanager.avs.models.ClusterZone; -import java.util.Arrays; public final class ClusterZoneListInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterZoneListInner model = - BinaryData - .fromString( - "{\"zones\":[{\"hosts\":[\"kgpwoz\"],\"zone\":\"kfpbs\"},{\"hosts\":[\"f\"],\"zone\":\"luu\"},{\"hosts\":[\"touwaboekqv\",\"elnsmvbxw\",\"jsflhhcaalnjix\",\"sxyawjoyaqcs\"],\"zone\":\"jpkiidzyexznelix\"},{\"hosts\":[\"ztfolhbnxk\"],\"zone\":\"laulppg\"}]}") - .toObject(ClusterZoneListInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterZoneListInner model = - new ClusterZoneListInner() - .withZones(Arrays.asList(new ClusterZone(), new ClusterZone(), new ClusterZone(), new ClusterZone())); - model = BinaryData.fromObject(model).toObject(ClusterZoneListInner.class); + ClusterZoneListInner model = BinaryData.fromString( + "{\"zones\":[{\"hosts\":[\"ctehfiqscjey\",\"vhezrkgqhcj\"],\"zone\":\"fovgmkqsleyyvxy\"},{\"hosts\":[\"k\"],\"zone\":\"t\"},{\"hosts\":[\"gjcrcczsqpjhvm\"],\"zone\":\"jvnysounqe\"},{\"hosts\":[\"oaeupfhyhltrpmo\"],\"zone\":\"mcmatuokthfuiu\"}]}") + .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 index 14449e7841707..fd20fd264d70c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,15 +10,8 @@ public final class ClusterZoneTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterZone model = - BinaryData - .fromString("{\"hosts\":[\"pnapnyiropuh\",\"igvpgylg\",\"git\",\"medjvcslynqwwncw\"],\"zone\":\"hxg\"}") - .toObject(ClusterZone.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterZone model = new ClusterZone(); - model = BinaryData.fromObject(model).toObject(ClusterZone.class); + ClusterZone model = BinaryData.fromString( + "{\"hosts\":[\"sfcpkvxodpuozm\",\"zydagfuaxbezyiuo\",\"ktwh\",\"dxwzywqsmbsurexi\"],\"zone\":\"ryocfsfksymdd\"}") + .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 index a56d8cc0d13e6..7896805609c12 100644 --- 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 @@ -1,78 +1,58 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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 java.nio.ByteBuffer; +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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ClustersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"thwtzol\"},\"properties\":{\"clusterSize\":1713502373,\"provisioningState\":\"Succeeded\",\"clusterId\":989403174,\"hosts\":[\"bwjscjpahlxveab\",\"qxnmwmqt\",\"bxyijddtvq\",\"ttadijae\"]},\"id\":\"kmr\",\"name\":\"ieekpndzaa\",\"type\":\"mudqmeq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = - manager - .clusters() - .define("bphbqzmizakakank") - .withExistingPrivateCloud("cwsldri", "etpwbralll") - .withSku(new Sku().withName("p")) - .withClusterSize(1316748102) - .withHosts(Arrays.asList("hjlmu", "y", "primr", "opteecj")) - .create(); - - Assertions.assertEquals("thwtzol", response.sku().name()); - Assertions.assertEquals(1713502373, response.clusterSize()); - Assertions.assertEquals("bwjscjpahlxveab", response.hosts().get(0)); + String responseStr + = "{\"properties\":{\"clusterSize\":1609142876,\"provisioningState\":\"Succeeded\",\"clusterId\":1184462676,\"hosts\":[\"rtkgdojbmxvavref\",\"eesvecu\"],\"vsanDatastoreName\":\"pxtxsuwp\"},\"sku\":{\"name\":\"tujwsawdd\",\"tier\":\"Standard\",\"size\":\"bxv\",\"family\":\"itvtzeexavo\",\"capacity\":809172379},\"id\":\"lecdmdqbw\",\"name\":\"ypq\",\"type\":\"gsfjac\"}"; + + 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("gat") + .withExistingPrivateCloud("zbezkgimsidxasic", "dyvvjskgfmocwahp") + .withSku(new Sku().withName("syxkyxvxevblb") + .withTier(SkuTier.FREE) + .withSize("ljlageuaulxu") + .withFamily("mjbnk") + .withCapacity(1476296254)) + .withClusterSize(187526121) + .withHosts(Arrays.asList("na", "zybbj")) + .withVsanDatastoreName("dj") + .create(); + + Assertions.assertEquals("tujwsawdd", response.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); + Assertions.assertEquals("bxv", response.sku().size()); + Assertions.assertEquals("itvtzeexavo", response.sku().family()); + Assertions.assertEquals(809172379, response.sku().capacity()); + Assertions.assertEquals(1609142876, response.clusterSize()); + Assertions.assertEquals("rtkgdojbmxvavref", response.hosts().get(0)); + Assertions.assertEquals("pxtxsuwp", 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 index 0bc994e0d4ead..ad42ab65258b4 100644 --- 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 @@ -1,61 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ClustersDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("wivkxo", "zunbixx", "ti", com.azure.core.util.Context.NONE); - manager.clusters().delete("xulcdisdos", "jbjsvgjrwh", "yvycytdclxgcckn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java index f0aaedead11af..29939ecb9d35e 100644 --- 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 @@ -1,72 +1,47 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.Cluster; -import java.nio.ByteBuffer; +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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ClustersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"nac\"},\"properties\":{\"clusterSize\":1670865281,\"provisioningState\":\"Succeeded\",\"clusterId\":1394471326,\"hosts\":[\"zvytnrzvuljraaer\"]},\"id\":\"nok\",\"name\":\"gukkjqnvbroy\",\"type\":\"a\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = - manager - .clusters() - .getWithResponse("kdlpa", "zrcxfailcfxwmdbo", "dfgsftufqobrj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nac", response.sku().name()); - Assertions.assertEquals(1670865281, response.clusterSize()); - Assertions.assertEquals("zvytnrzvuljraaer", response.hosts().get(0)); + String responseStr + = "{\"properties\":{\"clusterSize\":1517277198,\"provisioningState\":\"Canceled\",\"clusterId\":1929585131,\"hosts\":[\"yrmewipmvekdx\",\"kuqgsjjxundxgket\",\"zhhzjhfjmhvvmu\",\"gpmuneqsxvmhfbuz\"],\"vsanDatastoreName\":\"ihsasb\"},\"sku\":{\"name\":\"udypohyuems\",\"tier\":\"Premium\",\"size\":\"qyrp\",\"family\":\"obrltt\",\"capacity\":2105592893},\"id\":\"nygq\",\"name\":\"nfwqzdzgtilaxhn\",\"type\":\"hqlyvijo\"}"; + + 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("zdjtxvzflbqv", "aqvlgafcqusr", "vetnwsdtutn", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("udypohyuems", response.sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); + Assertions.assertEquals("qyrp", response.sku().size()); + Assertions.assertEquals("obrltt", response.sku().family()); + Assertions.assertEquals(2105592893, response.sku().capacity()); + Assertions.assertEquals(1517277198, response.clusterSize()); + Assertions.assertEquals("yrmewipmvekdx", response.hosts().get(0)); + Assertions.assertEquals("ihsasb", 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 index 36d895ebb5a46..145b01f8f21b5 100644 --- 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 @@ -1,70 +1,47 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.Cluster; -import java.nio.ByteBuffer; +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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ClustersListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"sku\":{\"name\":\"dmdqb\"},\"properties\":{\"clusterSize\":181668941,\"provisioningState\":\"Updating\",\"clusterId\":543854908,\"hosts\":[\"acbslhhxu\",\"bxv\",\"d\",\"tnsi\"]},\"id\":\"ud\",\"name\":\"z\",\"type\":\"mes\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.clusters().list("itvtzeexavo", "tfgle", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dmdqb", response.iterator().next().sku().name()); - Assertions.assertEquals(181668941, response.iterator().next().clusterSize()); - Assertions.assertEquals("acbslhhxu", response.iterator().next().hosts().get(0)); + String responseStr + = "{\"value\":[{\"properties\":{\"clusterSize\":1056443499,\"provisioningState\":\"Failed\",\"clusterId\":1289310691,\"hosts\":[\"zhqizxf\"],\"vsanDatastoreName\":\"tgqscjavftjuh\"},\"sku\":{\"name\":\"qaz\",\"tier\":\"Premium\",\"size\":\"guwpi\",\"family\":\"ajc\",\"capacity\":101089654},\"id\":\"ghfcfiwrxgkneuvy\",\"name\":\"nzqodfvpg\",\"type\":\"hoxgsgbpf\"}]}"; + + 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("kxhdjhlimmbcx", "h", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qaz", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); + Assertions.assertEquals("guwpi", response.iterator().next().sku().size()); + Assertions.assertEquals("ajc", response.iterator().next().sku().family()); + Assertions.assertEquals(101089654, response.iterator().next().sku().capacity()); + Assertions.assertEquals(1056443499, response.iterator().next().clusterSize()); + Assertions.assertEquals("zhqizxf", response.iterator().next().hosts().get(0)); + Assertions.assertEquals("tgqscjavftjuh", 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 index e38569421bf41..77db952bc9b84 100644 --- 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 @@ -1,67 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.ClusterZoneList; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ClustersListZonesWithResponseMockTests { @Test public void testListZonesWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"zones\":[{\"hosts\":[\"frpmpdnqqskaw\"],\"zone\":\"qvmmbn\"},{\"hosts\":[\"rtql\"],\"zone\":\"megni\"},{\"hosts\":[\"kxlzyqdrfeg\",\"ealzxwhcansymoyq\"],\"zone\":\"wigdi\"},{\"hosts\":[\"bxgomfaj\",\"wasqvdaeyyg\"],\"zone\":\"akjsqz\"}]}"; - String responseStr = - "{\"zones\":[{\"hosts\":[\"ihchrphkmcrjdqn\"],\"zone\":\"fzpbgtgkyl\"},{\"hosts\":[\"hrjeuutlw\",\"ez\",\"zhokvbwnhh\"],\"zone\":\"lgehg\"},{\"hosts\":[\"pifhpfeoajvgcxtx\",\"csheafidltugsr\",\"smkss\",\"h\"],\"zone\":\"ftxfkf\"},{\"hosts\":[\"prhptillu\"],\"zone\":\"iqtgdqoh\"}]}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + ClusterZoneList response = manager.clusters() + .listZonesWithResponse("vcpwpgclrc", "vtsoxf", "kenx", com.azure.core.util.Context.NONE) + .getValue(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterZoneList response = - manager - .clusters() - .listZonesWithResponse("nwm", "tmvpdvjdhtt", "a", com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CommonClusterPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CommonClusterPropertiesTests.java deleted file mode 100644 index 24ce082715715..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CommonClusterPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.CommonClusterProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CommonClusterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CommonClusterProperties model = - BinaryData - .fromString( - "{\"clusterSize\":1271650742,\"provisioningState\":\"Canceled\",\"clusterId\":1239569697,\"hosts\":[\"uosvmkfssxqukk\"]}") - .toObject(CommonClusterProperties.class); - Assertions.assertEquals(1271650742, model.clusterSize()); - Assertions.assertEquals("uosvmkfssxqukk", model.hosts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CommonClusterProperties model = - new CommonClusterProperties().withClusterSize(1271650742).withHosts(Arrays.asList("uosvmkfssxqukk")); - model = BinaryData.fromObject(model).toObject(CommonClusterProperties.class); - Assertions.assertEquals(1271650742, model.clusterSize()); - Assertions.assertEquals("uosvmkfssxqukk", model.hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreInnerTests.java index 3e229725b262a..1982ce1b7316c 100644 --- 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 @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -14,31 +15,28 @@ public final class DatastoreInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DatastoreInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Pending\",\"netAppVolume\":{\"id\":\"slqb\"},\"diskPoolVolume\":{\"targetId\":\"fxoblytkb\",\"lunName\":\"mpew\",\"mountOption\":\"ATTACH\",\"path\":\"krvrns\"},\"status\":\"DeadOrError\"},\"id\":\"q\",\"name\":\"ohxcrsbfova\",\"type\":\"rruvwbhsq\"}") - .toObject(DatastoreInner.class); - Assertions.assertEquals("slqb", model.netAppVolume().id()); - Assertions.assertEquals("fxoblytkb", model.diskPoolVolume().targetId()); - Assertions.assertEquals("mpew", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.diskPoolVolume().mountOption()); + DatastoreInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Deleting\",\"netAppVolume\":{\"id\":\"pmr\"},\"diskPoolVolume\":{\"targetId\":\"izcdrqjsd\",\"lunName\":\"ydnfyhxdeoejz\",\"mountOption\":\"MOUNT\",\"path\":\"fsj\"},\"elasticSanVolume\":{\"targetId\":\"gzfbishcbk\"},\"status\":\"DeadOrError\"},\"id\":\"eyeam\",\"name\":\"p\",\"type\":\"agalpbuxwgipwhon\"}") + .toObject(DatastoreInner.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 { - DatastoreInner model = - new DatastoreInner() - .withNetAppVolume(new NetAppVolume().withId("slqb")) - .withDiskPoolVolume( - new DiskPoolVolume() - .withTargetId("fxoblytkb") - .withLunName("mpew") - .withMountOption(MountOptionEnum.ATTACH)); + DatastoreInner model = new DatastoreInner().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(DatastoreInner.class); - Assertions.assertEquals("slqb", model.netAppVolume().id()); - Assertions.assertEquals("fxoblytkb", model.diskPoolVolume().targetId()); - Assertions.assertEquals("mpew", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.diskPoolVolume().mountOption()); + 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/DatastoreListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListResultTests.java new file mode 100644 index 0000000000000..865d56c54138f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.DatastoreListResult; +import com.azure.resourcemanager.avs.models.MountOptionEnum; +import org.junit.jupiter.api.Assertions; + +public final class DatastoreListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatastoreListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"uxh\"},\"diskPoolVolume\":{\"targetId\":\"udxorrqn\",\"lunName\":\"poczvyifqrvkdvjs\",\"mountOption\":\"MOUNT\",\"path\":\"vvdfwatkpnpul\"},\"elasticSanVolume\":{\"targetId\":\"xbczwtruwiqz\"},\"status\":\"Inaccessible\"},\"id\":\"sovmyokacspkwl\",\"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\"},{\"properties\":{\"provisioningState\":\"Updating\",\"netAppVolume\":{\"id\":\"faxkffeii\"},\"diskPoolVolume\":{\"targetId\":\"lvmezyvshxmzsbbz\",\"lunName\":\"ggi\",\"mountOption\":\"ATTACH\",\"path\":\"burvjxxjnspy\"},\"elasticSanVolume\":{\"targetId\":\"tko\"},\"status\":\"Detached\"},\"id\":\"uknvudwti\",\"name\":\"kbldngkpocipa\",\"type\":\"yxoegukgjnp\"}],\"nextLink\":\"cgygev\"}") + .toObject(DatastoreListResult.class); + Assertions.assertEquals("uxh", model.value().get(0).netAppVolume().id()); + Assertions.assertEquals("udxorrqn", model.value().get(0).diskPoolVolume().targetId()); + Assertions.assertEquals("poczvyifqrvkdvjs", model.value().get(0).diskPoolVolume().lunName()); + Assertions.assertEquals(MountOptionEnum.MOUNT, model.value().get(0).diskPoolVolume().mountOption()); + Assertions.assertEquals("xbczwtruwiqz", model.value().get(0).elasticSanVolume().targetId()); + Assertions.assertEquals("cgygev", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.java deleted file mode 100644 index 2b7e07f70ebf5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.DatastoreList; - -public final class DatastoreListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"netAppVolume\":{\"id\":\"napkteoellw\"},\"diskPoolVolume\":{\"targetId\":\"fdygpfqbuaceopz\",\"lunName\":\"qrhhu\",\"mountOption\":\"ATTACH\",\"path\":\"pcqeqx\"},\"status\":\"Attached\"},\"id\":\"dahzxctobg\",\"name\":\"kdmoi\",\"type\":\"postmgrcfbunrm\"},{\"properties\":{\"provisioningState\":\"Cancelled\",\"netAppVolume\":{\"id\":\"kxbpvj\"},\"diskPoolVolume\":{\"targetId\":\"jhxxjyn\",\"lunName\":\"u\",\"mountOption\":\"MOUNT\",\"path\":\"r\"},\"status\":\"LostCommunication\"},\"id\":\"bxqz\",\"name\":\"szjfauvjfdxxivet\",\"type\":\"t\"}],\"nextLink\":\"aqtdoqmcbx\"}") - .toObject(DatastoreList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreList model = new DatastoreList(); - model = BinaryData.fromObject(model).toObject(DatastoreList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastorePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastorePropertiesTests.java index 396edd46657e5..5cafae5b8b482 100644 --- 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 @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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; @@ -14,31 +15,29 @@ public final class DatastorePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DatastoreProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Creating\",\"netAppVolume\":{\"id\":\"cgjbirxbp\"},\"diskPoolVolume\":{\"targetId\":\"srfbjfdtwss\",\"lunName\":\"t\",\"mountOption\":\"MOUNT\",\"path\":\"jzbexilzznfq\"},\"status\":\"Inaccessible\"}") - .toObject(DatastoreProperties.class); - Assertions.assertEquals("cgjbirxbp", model.netAppVolume().id()); - Assertions.assertEquals("srfbjfdtwss", model.diskPoolVolume().targetId()); - Assertions.assertEquals("t", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, model.diskPoolVolume().mountOption()); + DatastoreProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Canceled\",\"netAppVolume\":{\"id\":\"shwankixzbinje\"},\"diskPoolVolume\":{\"targetId\":\"ttmrywnuzoqf\",\"lunName\":\"iyqzrnk\",\"mountOption\":\"ATTACH\",\"path\":\"xlwhzlsicoh\"},\"elasticSanVolume\":{\"targetId\":\"qnwvlrya\"},\"status\":\"DeadOrError\"}") + .toObject(DatastoreProperties.class); + Assertions.assertEquals("shwankixzbinje", model.netAppVolume().id()); + Assertions.assertEquals("ttmrywnuzoqf", model.diskPoolVolume().targetId()); + Assertions.assertEquals("iyqzrnk", model.diskPoolVolume().lunName()); + Assertions.assertEquals(MountOptionEnum.ATTACH, model.diskPoolVolume().mountOption()); + Assertions.assertEquals("qnwvlrya", model.elasticSanVolume().targetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DatastoreProperties model = - new DatastoreProperties() - .withNetAppVolume(new NetAppVolume().withId("cgjbirxbp")) - .withDiskPoolVolume( - new DiskPoolVolume() - .withTargetId("srfbjfdtwss") - .withLunName("t") - .withMountOption(MountOptionEnum.MOUNT)); + DatastoreProperties model + = new DatastoreProperties().withNetAppVolume(new NetAppVolume().withId("shwankixzbinje")) + .withDiskPoolVolume(new DiskPoolVolume().withTargetId("ttmrywnuzoqf") + .withLunName("iyqzrnk") + .withMountOption(MountOptionEnum.ATTACH)) + .withElasticSanVolume(new ElasticSanVolume().withTargetId("qnwvlrya")); model = BinaryData.fromObject(model).toObject(DatastoreProperties.class); - Assertions.assertEquals("cgjbirxbp", model.netAppVolume().id()); - Assertions.assertEquals("srfbjfdtwss", model.diskPoolVolume().targetId()); - Assertions.assertEquals("t", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, model.diskPoolVolume().mountOption()); + Assertions.assertEquals("shwankixzbinje", model.netAppVolume().id()); + Assertions.assertEquals("ttmrywnuzoqf", model.diskPoolVolume().targetId()); + Assertions.assertEquals("iyqzrnk", model.diskPoolVolume().lunName()); + Assertions.assertEquals(MountOptionEnum.ATTACH, model.diskPoolVolume().mountOption()); + Assertions.assertEquals("qnwvlrya", 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 index 0c8ed1ee64c52..6622ed37870a9 100644 --- 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 @@ -1,83 +1,52 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class DatastoresCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"xmysuxswqrntv\"},\"diskPoolVolume\":{\"targetId\":\"ijpstte\",\"lunName\":\"oqq\",\"mountOption\":\"MOUNT\",\"path\":\"yufmhruncuwmq\"},\"status\":\"DeadOrError\"},\"id\":\"cdqzhlctddu\",\"name\":\"qn\",\"type\":\"yfp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Datastore response = - manager - .datastores() - .define("bbelawumuaslzk") - .withExistingCluster("boldforobwj", "vizbfhfo", "vacqpbtuodxesz") - .withNetAppVolume(new NetAppVolume().withId("ycqucwyh")) - .withDiskPoolVolume( - new DiskPoolVolume() - .withTargetId("nomdrkywuhpsv") - .withLunName("uurutlwexxwlalni") - .withMountOption(MountOptionEnum.ATTACH)) - .create(); - - Assertions.assertEquals("xmysuxswqrntv", response.netAppVolume().id()); - Assertions.assertEquals("ijpstte", response.diskPoolVolume().targetId()); - Assertions.assertEquals("oqq", response.diskPoolVolume().lunName()); + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"ecj\"},\"diskPoolVolume\":{\"targetId\":\"islstv\",\"lunName\":\"sylwxdzaumweooh\",\"mountOption\":\"MOUNT\",\"path\":\"uzboyjathw\"},\"elasticSanVolume\":{\"targetId\":\"olbaemwmdx\"},\"status\":\"DeadOrError\"},\"id\":\"jscjpahl\",\"name\":\"veabfqxnmwmqtib\",\"type\":\"yijddtvqcttad\"}"; + + 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("riz") + .withExistingCluster("egprhptil", "ucb", "qtgdqohmcwsl") + .withNetAppVolume(new NetAppVolume().withId("ralllibphb")) + .withDiskPoolVolume( + new DiskPoolVolume().withTargetId("mizak").withLunName("kan").withMountOption(MountOptionEnum.MOUNT)) + .withElasticSanVolume(new ElasticSanVolume().withTargetId("ha")) + .create(); + + Assertions.assertEquals("ecj", response.netAppVolume().id()); + Assertions.assertEquals("islstv", response.diskPoolVolume().targetId()); + Assertions.assertEquals("sylwxdzaumweooh", response.diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.MOUNT, response.diskPoolVolume().mountOption()); + Assertions.assertEquals("olbaemwmdx", 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 index 777962958ef54..e050cdc5302fc 100644 --- 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 @@ -1,61 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class DatastoresDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("f", "oajvgcxtxjcs", "eafidltugsresm", "ssjhoiftxfkf", com.azure.core.util.Context.NONE); - manager.datastores().delete("keifzzhmkdasv", "lyhb", "cu", "chxgs", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java index 1730f83e13d31..b15e646a20aea 100644 --- 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 @@ -1,74 +1,44 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class DatastoresGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Failed\",\"netAppVolume\":{\"id\":\"dhgbjkvre\"},\"diskPoolVolume\":{\"targetId\":\"eamurvzmlo\",\"lunName\":\"uanashcxlp\",\"mountOption\":\"MOUNT\",\"path\":\"bdkelvidizo\"},\"status\":\"LostCommunication\"},\"id\":\"bccxjmonfdgn\",\"name\":\"n\",\"type\":\"ypuuwwltvuqjctze\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Datastore response = - manager - .datastores() - .getWithResponse("khgn", "nzonzl", "piqywnc", "jtszcof", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dhgbjkvre", response.netAppVolume().id()); - Assertions.assertEquals("eamurvzmlo", response.diskPoolVolume().targetId()); - Assertions.assertEquals("uanashcxlp", response.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, response.diskPoolVolume().mountOption()); + String responseStr + = "{\"properties\":{\"provisioningState\":\"Cancelled\",\"netAppVolume\":{\"id\":\"zaefedxihc\"},\"diskPoolVolume\":{\"targetId\":\"phkmcrjdqnsdfz\",\"lunName\":\"bg\",\"mountOption\":\"ATTACH\",\"path\":\"lkdghr\"},\"elasticSanVolume\":{\"targetId\":\"uutlwxezwzhok\"},\"status\":\"LostCommunication\"},\"id\":\"hh\",\"name\":\"qlgehg\",\"type\":\"pipifh\"}"; + + 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("disdosfjbjsvgj", "whryvycytdcl", "gc", "knfnwmbtmvpdv", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("zaefedxihc", response.netAppVolume().id()); + Assertions.assertEquals("phkmcrjdqnsdfz", response.diskPoolVolume().targetId()); + Assertions.assertEquals("bg", response.diskPoolVolume().lunName()); + Assertions.assertEquals(MountOptionEnum.ATTACH, response.diskPoolVolume().mountOption()); + Assertions.assertEquals("uutlwxezwzhok", 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 index 97f402bdcf281..e095c11a364ba 100644 --- 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 @@ -1,72 +1,44 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class DatastoresListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"netAppVolume\":{\"id\":\"aqh\"},\"diskPoolVolume\":{\"targetId\":\"eufuqyrxpdlcgql\",\"lunName\":\"ismjqfrddgamqu\",\"mountOption\":\"MOUNT\",\"path\":\"rsjuivfcdisyir\"},\"status\":\"DeadOrError\"},\"id\":\"hcz\",\"name\":\"xrxzbujrtr\",\"type\":\"qvwre\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.datastores().list("igpibud", "wyxebeybpmzz", "rtffyaqitmh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("aqh", response.iterator().next().netAppVolume().id()); - Assertions.assertEquals("eufuqyrxpdlcgql", response.iterator().next().diskPoolVolume().targetId()); - Assertions.assertEquals("ismjqfrddgamqu", response.iterator().next().diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, response.iterator().next().diskPoolVolume().mountOption()); + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"netAppVolume\":{\"id\":\"m\"},\"diskPoolVolume\":{\"targetId\":\"sckdlp\",\"lunName\":\"gzrcxfailcfxwmdb\",\"mountOption\":\"ATTACH\",\"path\":\"gsftufqobrjlnacg\"},\"elasticSanVolume\":{\"targetId\":\"kknhxkizvytnrzv\"},\"status\":\"Attached\"},\"id\":\"aaeranokqgukk\",\"name\":\"qnvb\",\"type\":\"oylaxxul\"}]}"; + + 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("slhhxudbxv", "d", "tnsi", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("m", response.iterator().next().netAppVolume().id()); + Assertions.assertEquals("sckdlp", response.iterator().next().diskPoolVolume().targetId()); + Assertions.assertEquals("gzrcxfailcfxwmdb", response.iterator().next().diskPoolVolume().lunName()); + Assertions.assertEquals(MountOptionEnum.ATTACH, response.iterator().next().diskPoolVolume().mountOption()); + Assertions.assertEquals("kknhxkizvytnrzv", 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 index 86b53a1251c1c..74b9f56f3fe0f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,26 +12,22 @@ public final class DiskPoolVolumeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DiskPoolVolume model = - BinaryData - .fromString( - "{\"targetId\":\"ruoujmk\",\"lunName\":\"jhwqytjrybnw\",\"mountOption\":\"ATTACH\",\"path\":\"drjervnaenqpehin\"}") - .toObject(DiskPoolVolume.class); - Assertions.assertEquals("ruoujmk", model.targetId()); - Assertions.assertEquals("jhwqytjrybnw", model.lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.mountOption()); + DiskPoolVolume model = BinaryData.fromString( + "{\"targetId\":\"mqhgyxzkonocuk\",\"lunName\":\"klyaxuconu\",\"mountOption\":\"MOUNT\",\"path\":\"kbeype\"}") + .toObject(DiskPoolVolume.class); + Assertions.assertEquals("mqhgyxzkonocuk", model.targetId()); + Assertions.assertEquals("klyaxuconu", model.lunName()); + Assertions.assertEquals(MountOptionEnum.MOUNT, model.mountOption()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DiskPoolVolume model = - new DiskPoolVolume() - .withTargetId("ruoujmk") - .withLunName("jhwqytjrybnw") - .withMountOption(MountOptionEnum.ATTACH); + DiskPoolVolume model = new DiskPoolVolume().withTargetId("mqhgyxzkonocuk") + .withLunName("klyaxuconu") + .withMountOption(MountOptionEnum.MOUNT); model = BinaryData.fromObject(model).toObject(DiskPoolVolume.class); - Assertions.assertEquals("ruoujmk", model.targetId()); - Assertions.assertEquals("jhwqytjrybnw", model.lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.mountOption()); + Assertions.assertEquals("mqhgyxzkonocuk", model.targetId()); + Assertions.assertEquals("klyaxuconu", model.lunName()); + Assertions.assertEquals(MountOptionEnum.MOUNT, 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 new file mode 100644 index 0000000000000..e3fa813478bc0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ElasticSanVolumeTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"rmjmwvvjektc\"}").toObject(ElasticSanVolume.class); + Assertions.assertEquals("rmjmwvvjektc", model.targetId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSanVolume model = new ElasticSanVolume().withTargetId("rmjmwvvjektc"); + model = BinaryData.fromObject(model).toObject(ElasticSanVolume.class); + Assertions.assertEquals("rmjmwvvjektc", 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 index 9638dc01c5453..f99387d584613 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,15 +10,8 @@ public final class EndpointsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Endpoints model = - BinaryData - .fromString("{\"nsxtManager\":\"rsyn\",\"vcsa\":\"idybyxczf\",\"hcxCloudManager\":\"haaxdbabphl\"}") - .toObject(Endpoints.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Endpoints model = new Endpoints(); - model = BinaryData.fromObject(model).toObject(Endpoints.class); + Endpoints model = BinaryData.fromString( + "{\"nsxtManager\":\"ypl\",\"vcsa\":\"kbasyypn\",\"hcxCloudManager\":\"hsgcbacphejkot\",\"nsxtManagerIp\":\"qgoulznd\",\"vcenterIp\":\"kwy\",\"hcxCloudManagerIp\":\"gfgibm\"}") + .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 index 48dfe4bb854bc..e4b9fbfa9013a 100644 --- 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 @@ -1,61 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class GlobalReachConnectionsDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("rkcxkj", "bn", "mysu", com.azure.core.util.Context.NONE); - manager.globalReachConnections().delete("yj", "otp", "opv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java index c31f48132b983..dd0a3856b8d4c 100644 --- 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 @@ -1,63 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class HcxEnterpriseSitesDeleteWithResponseMockTests { @Test public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("mquhio", "rsjuivfcdisyir", "xzhczexrxz", com.azure.core.util.Context.NONE); - manager - .hcxEnterpriseSites() - .deleteWithResponse("vruzslzojhpctfnm", "xotngfdguge", "zihgrkyu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathInnerTests.java new file mode 100644 index 0000000000000..586d3f62597ec --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathInnerTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Canceled\",\"networkBlock\":\"clnpkci\"},\"id\":\"zriykhy\",\"name\":\"wf\",\"type\":\"jlb\"}") + .toObject(IscsiPathInner.class); + Assertions.assertEquals("clnpkci", model.networkBlock()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IscsiPathInner model = new IscsiPathInner().withNetworkBlock("clnpkci"); + model = BinaryData.fromObject(model).toObject(IscsiPathInner.class); + Assertions.assertEquals("clnpkci", 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 new file mode 100644 index 0000000000000..507058b7bb172 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathListResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.IscsiPathListResult; +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\":\"Updating\",\"networkBlock\":\"ivwzjbhyzs\"},\"id\":\"rkambt\",\"name\":\"negvmnvuqe\",\"type\":\"vldspa\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"kkdmfl\"},\"id\":\"stmjlxrri\",\"name\":\"ozapeew\",\"type\":\"hpxlktwkuziycs\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"f\"},\"id\":\"tcktyhjtqedcgzu\",\"name\":\"wmmrq\",\"type\":\"zrrjvpgly\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"rvqeevtoepryutn\"},\"id\":\"tpzdmovzvfvaawzq\",\"name\":\"dflgzuri\",\"type\":\"laecxndticok\"}],\"nextLink\":\"zmlqtmldgxo\"}") + .toObject(IscsiPathListResult.class); + Assertions.assertEquals("ivwzjbhyzs", model.value().get(0).networkBlock()); + Assertions.assertEquals("zmlqtmldgxo", 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 new file mode 100644 index 0000000000000..065f992cd60ae --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Deleting\",\"networkBlock\":\"vkjlmxhom\"}") + .toObject(IscsiPathProperties.class); + Assertions.assertEquals("vkjlmxhom", model.networkBlock()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("vkjlmxhom"); + model = BinaryData.fromObject(model).toObject(IscsiPathProperties.class); + Assertions.assertEquals("vkjlmxhom", 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 new file mode 100644 index 0000000000000..80916db42043b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"ojwyvf\"},\"id\":\"btsuahxs\",\"name\":\"xjcmmzrrsc\",\"type\":\"biwsd\"}"; + + 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("rs", "yjq", new IscsiPathInner().withNetworkBlock("nozoeoq"), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ojwyvf", 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 new file mode 100644 index 0000000000000..6ae952db352df --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("npxqwodi", "fjxcjrmmuabwibv", 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 new file mode 100644 index 0000000000000..ac1223e88bd5d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Succeeded\",\"networkBlock\":\"rtywi\"},\"id\":\"mhlaku\",\"name\":\"lgbhgauacdi\",\"type\":\"mxu\"}"; + + 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("c", "v", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals("rtywi", 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 new file mode 100644 index 0000000000000..9717218976216 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Updating\",\"networkBlock\":\"rweft\"},\"id\":\"qejpmvssehaepwa\",\"name\":\"cxtczhupeukn\",\"type\":\"jduyyespydjfb\"}]}"; + + 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("cqlliz", "tac", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("rweft", 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 index 45cff355f5d85..528720a8f5134 100644 --- 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 @@ -1,67 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.Quota; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class LocationsCheckQuotaAvailabilityWithResponseMockTests { @Test public void testCheckQuotaAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"hostsRemaining\":{\"u\":1014687090,\"tppn\":1432155819,\"xz\":1573137323},\"quotaEnabled\":\"Disabled\"}"; - String responseStr = - "{\"hostsRemaining\":{\"cdmxzrpoaiml\":1513334542,\"iaaomylweazul\":871489167},\"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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Quota response = manager.locations() + .checkQuotaAvailabilityWithResponse("nscliqhzvhxnk", com.azure.core.util.Context.NONE) + .getValue(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Quota response = - manager - .locations() - .checkQuotaAvailabilityWithResponse("lwtjjguktalh", com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java index 412dea20e53b1..bd496468b2aa0 100644 --- 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 @@ -1,68 +1,44 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class LocationsCheckTrialAvailabilityWithResponseMockTests { @Test public void testCheckTrialAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr = "{\"status\":\"TrialUsed\",\"availableHosts\":1139502489}"; - String responseStr = "{\"status\":\"TrialUsed\",\"availableHosts\":1819890486}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Trial response = manager.locations() + .checkTrialAvailabilityWithResponse("lauyav", + new Sku().withName("uwmncs") + .withTier(SkuTier.FREE) + .withSize("fybvpoek") + .withFamily("gsgbdhuzq") + .withCapacity(41953991), + com.azure.core.util.Context.NONE) + .getValue(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Trial response = - manager - .locations() - .checkTrialAvailabilityWithResponse( - "kozzwculkb", new Sku().withName("wpfaj"), com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LogSpecificationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LogSpecificationTests.java deleted file mode 100644 index 627904a89b017..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LogSpecificationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model = - BinaryData - .fromString("{\"name\":\"czvyifq\",\"displayName\":\"kdvjsll\",\"blobDuration\":\"vvdfwatkpnpul\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("czvyifq", model.name()); - Assertions.assertEquals("kdvjsll", model.displayName()); - Assertions.assertEquals("vvdfwatkpnpul", model.blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model = - new LogSpecification().withName("czvyifq").withDisplayName("kdvjsll").withBlobDuration("vvdfwatkpnpul"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("czvyifq", model.name()); - Assertions.assertEquals("kdvjsll", model.displayName()); - Assertions.assertEquals("vvdfwatkpnpul", model.blobDuration()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.java index 93df8df6a2756..21fe9e39e5f7f 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,21 +12,22 @@ public final class ManagementClusterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ManagementCluster model = - BinaryData - .fromString( - "{\"clusterSize\":2068547199,\"provisioningState\":\"Updating\",\"clusterId\":767485321,\"hosts\":[\"iklbbovpl\"]}") - .toObject(ManagementCluster.class); - Assertions.assertEquals(2068547199, model.clusterSize()); - Assertions.assertEquals("iklbbovpl", model.hosts().get(0)); + ManagementCluster model = BinaryData.fromString( + "{\"clusterSize\":2084272233,\"provisioningState\":\"Failed\",\"clusterId\":186594005,\"hosts\":[\"bybkzgcwrwclxx\",\"rljdouskcqv\",\"ocrcjdk\",\"tnhxbn\"],\"vsanDatastoreName\":\"iksqr\"}") + .toObject(ManagementCluster.class); + Assertions.assertEquals(2084272233, model.clusterSize()); + Assertions.assertEquals("bybkzgcwrwclxx", model.hosts().get(0)); + Assertions.assertEquals("iksqr", model.vsanDatastoreName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagementCluster model = - new ManagementCluster().withClusterSize(2068547199).withHosts(Arrays.asList("iklbbovpl")); + ManagementCluster model = new ManagementCluster().withClusterSize(2084272233) + .withHosts(Arrays.asList("bybkzgcwrwclxx", "rljdouskcqv", "ocrcjdk", "tnhxbn")) + .withVsanDatastoreName("iksqr"); model = BinaryData.fromObject(model).toObject(ManagementCluster.class); - Assertions.assertEquals(2068547199, model.clusterSize()); - Assertions.assertEquals("iklbbovpl", model.hosts().get(0)); + Assertions.assertEquals(2084272233, model.clusterSize()); + Assertions.assertEquals("bybkzgcwrwclxx", model.hosts().get(0)); + Assertions.assertEquals("iksqr", model.vsanDatastoreName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricDimensionTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricDimensionTests.java deleted file mode 100644 index 52f3643fe954b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricDimensionTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.MetricDimension; -import org.junit.jupiter.api.Assertions; - -public final class MetricDimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricDimension model = - BinaryData - .fromString( - "{\"name\":\"dwtiukbldngkp\",\"displayName\":\"ipazyxoegukgjnpi\",\"internalName\":\"gygev\",\"toBeExportedForShoebox\":true}") - .toObject(MetricDimension.class); - Assertions.assertEquals("dwtiukbldngkp", model.name()); - Assertions.assertEquals("ipazyxoegukgjnpi", model.displayName()); - Assertions.assertEquals("gygev", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricDimension model = - new MetricDimension() - .withName("dwtiukbldngkp") - .withDisplayName("ipazyxoegukgjnpi") - .withInternalName("gygev") - .withToBeExportedForShoebox(true); - model = BinaryData.fromObject(model).toObject(MetricDimension.class); - Assertions.assertEquals("dwtiukbldngkp", model.name()); - Assertions.assertEquals("ipazyxoegukgjnpi", model.displayName()); - Assertions.assertEquals("gygev", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricSpecificationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricSpecificationTests.java deleted file mode 100644 index 9218d4bc8c7bf..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricSpecificationTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.MetricDimension; -import com.azure.resourcemanager.avs.models.MetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecification model = - BinaryData - .fromString( - "{\"name\":\"xbczwtruwiqz\",\"displayName\":\"j\",\"displayDescription\":\"ovm\",\"unit\":\"kacspkw\",\"category\":\"zdobpxjmflbvvnch\",\"aggregationType\":\"cciw\",\"supportedAggregationTypes\":[\"uqkhrsajiwku\"],\"supportedTimeGrainTypes\":[\"skghsauuimj\"],\"fillGapWithZero\":true,\"dimensions\":[{\"name\":\"uugidyjrrfby\",\"displayName\":\"svexcsonpclhoco\",\"internalName\":\"lkevle\",\"toBeExportedForShoebox\":false},{\"name\":\"buhfmvfaxkffeiit\",\"displayName\":\"vmezy\",\"internalName\":\"hxmzsbbzoggig\",\"toBeExportedForShoebox\":true}],\"enableRegionalMdmAccount\":\"ur\",\"sourceMdmAccount\":\"xxjnspydptk\",\"sourceMdmNamespace\":\"nkoukn\"}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("xbczwtruwiqz", model.name()); - Assertions.assertEquals("j", model.displayName()); - Assertions.assertEquals("ovm", model.displayDescription()); - Assertions.assertEquals("kacspkw", model.unit()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.category()); - Assertions.assertEquals("cciw", model.aggregationType()); - Assertions.assertEquals("uqkhrsajiwku", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("skghsauuimj", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("uugidyjrrfby", model.dimensions().get(0).name()); - Assertions.assertEquals("svexcsonpclhoco", model.dimensions().get(0).displayName()); - Assertions.assertEquals("lkevle", model.dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("ur", model.enableRegionalMdmAccount()); - Assertions.assertEquals("xxjnspydptk", model.sourceMdmAccount()); - Assertions.assertEquals("nkoukn", model.sourceMdmNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecification model = - new MetricSpecification() - .withName("xbczwtruwiqz") - .withDisplayName("j") - .withDisplayDescription("ovm") - .withUnit("kacspkw") - .withCategory("zdobpxjmflbvvnch") - .withAggregationType("cciw") - .withSupportedAggregationTypes(Arrays.asList("uqkhrsajiwku")) - .withSupportedTimeGrainTypes(Arrays.asList("skghsauuimj")) - .withFillGapWithZero(true) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("uugidyjrrfby") - .withDisplayName("svexcsonpclhoco") - .withInternalName("lkevle") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("buhfmvfaxkffeiit") - .withDisplayName("vmezy") - .withInternalName("hxmzsbbzoggig") - .withToBeExportedForShoebox(true))) - .withEnableRegionalMdmAccount("ur") - .withSourceMdmAccount("xxjnspydptk") - .withSourceMdmNamespace("nkoukn"); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("xbczwtruwiqz", model.name()); - Assertions.assertEquals("j", model.displayName()); - Assertions.assertEquals("ovm", model.displayDescription()); - Assertions.assertEquals("kacspkw", model.unit()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.category()); - Assertions.assertEquals("cciw", model.aggregationType()); - Assertions.assertEquals("uqkhrsajiwku", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("skghsauuimj", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("uugidyjrrfby", model.dimensions().get(0).name()); - Assertions.assertEquals("svexcsonpclhoco", model.dimensions().get(0).displayName()); - Assertions.assertEquals("lkevle", model.dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("ur", model.enableRegionalMdmAccount()); - Assertions.assertEquals("xxjnspydptk", model.sourceMdmAccount()); - Assertions.assertEquals("nkoukn", model.sourceMdmNamespace()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/NetAppVolumeTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/NetAppVolumeTests.java index a4c4e86f981dc..3c0b866cc9f62 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,14 +11,14 @@ public final class NetAppVolumeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetAppVolume model = BinaryData.fromString("{\"id\":\"wpmqt\"}").toObject(NetAppVolume.class); - Assertions.assertEquals("wpmqt", model.id()); + NetAppVolume model = BinaryData.fromString("{\"id\":\"heun\"}").toObject(NetAppVolume.class); + Assertions.assertEquals("heun", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetAppVolume model = new NetAppVolume().withId("wpmqt"); + NetAppVolume model = new NetAppVolume().withId("heun"); model = BinaryData.fromObject(model).toObject(NetAppVolume.class); - Assertions.assertEquals("wpmqt", model.id()); + Assertions.assertEquals("heun", 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 index 452519a7d3f6c..26393259b1227 100644 --- 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 @@ -1,25 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.avs.models.OperationDisplay; +import org.junit.jupiter.api.Assertions; public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"evcciqihnhun\",\"resource\":\"wjzrnfygxgisp\",\"operation\":\"vtz\",\"description\":\"ufubl\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") + .toObject(OperationDisplay.class); + Assertions.assertEquals("cdm", model.provider()); + Assertions.assertEquals("rcryuanzwuxzdxta", model.resource()); + Assertions.assertEquals("lhmwhfpmrqobm", model.operation()); + Assertions.assertEquals("kknryrtihf", model.description()); } } 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 index 8dd0e06d9cfe1..826aaef8e2466 100644 --- 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 @@ -1,220 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.avs.fluent.models.OperationInner; -import com.azure.resourcemanager.avs.models.LogSpecification; -import com.azure.resourcemanager.avs.models.MetricDimension; -import com.azure.resourcemanager.avs.models.MetricSpecification; -import com.azure.resourcemanager.avs.models.OperationProperties; -import com.azure.resourcemanager.avs.models.ServiceSpecification; -import java.util.Arrays; +import com.azure.resourcemanager.avs.models.ActionType; import org.junit.jupiter.api.Assertions; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"kc\",\"display\":{\"provider\":\"arcryuanzwuxzdxt\",\"resource\":\"rlhm\",\"operation\":\"fp\",\"description\":\"qobmtukk\"},\"isDataAction\":false,\"origin\":\"tihfx\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"vg\",\"displayName\":\"zsymglzufcyzkohd\",\"blobDuration\":\"hanufhfcbjysagi\"},{\"name\":\"xqhabi\",\"displayName\":\"ikxwc\",\"blobDuration\":\"yscnpqxu\"},{\"name\":\"vyq\",\"displayName\":\"wby\",\"blobDuration\":\"k\"},{\"name\":\"dumjgrtfwvuk\",\"displayName\":\"audccsnhs\",\"blobDuration\":\"nyejhkryhtnap\"}],\"metricSpecifications\":[{\"name\":\"okjye\",\"displayName\":\"kvnipjoxz\",\"displayDescription\":\"chgejspodm\",\"unit\":\"lzydehojwyahux\",\"category\":\"pmqnja\",\"aggregationType\":\"ixjsprozvcputeg\",\"supportedAggregationTypes\":[\"mfdatscmdvpj\",\"u\",\"suuv\",\"kjozkrwfnd\"],\"supportedTimeGrainTypes\":[\"jpslwejd\",\"vwryoqpso\"],\"fillGapWithZero\":true,\"dimensions\":[{},{}],\"enableRegionalMdmAccount\":\"akl\",\"sourceMdmAccount\":\"ahbc\",\"sourceMdmNamespace\":\"ffdfdosygexpa\"},{\"name\":\"akhmsbzjhcrz\",\"displayName\":\"dphlxaolt\",\"displayDescription\":\"trg\",\"unit\":\"bpf\",\"category\":\"s\",\"aggregationType\":\"zgvfcjrwz\",\"supportedAggregationTypes\":[\"j\",\"felluwfzitonpe\",\"fpjkjlxofp\",\"vhpfxxypininmay\"],\"supportedTimeGrainTypes\":[\"bbkpodep\"],\"fillGapWithZero\":true,\"dimensions\":[{},{},{}],\"enableRegionalMdmAccount\":\"vamih\",\"sourceMdmAccount\":\"gnarxzxtheo\",\"sourceMdmNamespace\":\"si\"}]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("tihfx", model.origin()); - Assertions.assertEquals("vg", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "zsymglzufcyzkohd", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "hanufhfcbjysagi", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions - .assertEquals("okjye", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "kvnipjoxz", model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "chgejspodm", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals( - "lzydehojwyahux", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals("pmqnja", model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "ixjsprozvcputeg", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "mfdatscmdvpj", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions - .assertEquals( - "jpslwejd", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions - .assertEquals( - true, model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "akl", - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "ahbc", model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "ffdfdosygexpa", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withIsDataAction(false) - .withOrigin("tihfx") - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("vg") - .withDisplayName("zsymglzufcyzkohd") - .withBlobDuration("hanufhfcbjysagi"), - new LogSpecification() - .withName("xqhabi") - .withDisplayName("ikxwc") - .withBlobDuration("yscnpqxu"), - new LogSpecification() - .withName("vyq") - .withDisplayName("wby") - .withBlobDuration("k"), - new LogSpecification() - .withName("dumjgrtfwvuk") - .withDisplayName("audccsnhs") - .withBlobDuration("nyejhkryhtnap"))) - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("okjye") - .withDisplayName("kvnipjoxz") - .withDisplayDescription("chgejspodm") - .withUnit("lzydehojwyahux") - .withCategory("pmqnja") - .withAggregationType("ixjsprozvcputeg") - .withSupportedAggregationTypes( - Arrays.asList("mfdatscmdvpj", "u", "suuv", "kjozkrwfnd")) - .withSupportedTimeGrainTypes(Arrays.asList("jpslwejd", "vwryoqpso")) - .withFillGapWithZero(true) - .withDimensions( - Arrays.asList(new MetricDimension(), new MetricDimension())) - .withEnableRegionalMdmAccount("akl") - .withSourceMdmAccount("ahbc") - .withSourceMdmNamespace("ffdfdosygexpa"), - new MetricSpecification() - .withName("akhmsbzjhcrz") - .withDisplayName("dphlxaolt") - .withDisplayDescription("trg") - .withUnit("bpf") - .withCategory("s") - .withAggregationType("zgvfcjrwz") - .withSupportedAggregationTypes( - Arrays - .asList("j", "felluwfzitonpe", "fpjkjlxofp", "vhpfxxypininmay")) - .withSupportedTimeGrainTypes(Arrays.asList("bbkpodep")) - .withFillGapWithZero(true) - .withDimensions( - Arrays - .asList( - new MetricDimension(), - new MetricDimension(), - new MetricDimension())) - .withEnableRegionalMdmAccount("vamih") - .withSourceMdmAccount("gnarxzxtheo") - .withSourceMdmNamespace("si"))))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("tihfx", model.origin()); - Assertions.assertEquals("vg", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "zsymglzufcyzkohd", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "hanufhfcbjysagi", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions - .assertEquals("okjye", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "kvnipjoxz", model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "chgejspodm", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals( - "lzydehojwyahux", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals("pmqnja", model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "ixjsprozvcputeg", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "mfdatscmdvpj", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions - .assertEquals( - "jpslwejd", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions - .assertEquals( - true, model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "akl", - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "ahbc", model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "ffdfdosygexpa", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); + OperationInner model = BinaryData.fromString( + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + .toObject(OperationInner.class); + Assertions.assertEquals("eqsrdeupewnwreit", model.display().provider()); + Assertions.assertEquals("yflusarhmofc", model.display().resource()); + Assertions.assertEquals("smy", model.display().operation()); + Assertions.assertEquals("kdtmlxhekuk", model.display().description()); + Assertions.assertEquals(ActionType.INTERNAL, model.actionType()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListTests.java deleted file mode 100644 index b012628bc9eb9..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.OperationList; - -public final class OperationListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationList model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"isDataAction\":false,\"origin\":\"noi\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}],\"metricSpecifications\":[{},{},{}]}}},{\"name\":\"qsoqijgkd\",\"display\":{\"provider\":\"azlobcufpdznrbt\",\"resource\":\"qjnqglhqgnufoooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"isDataAction\":false,\"origin\":\"mrvktsizntoc\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}],\"metricSpecifications\":[{}]}}},{\"name\":\"s\",\"display\":{\"provider\":\"mpoyfd\",\"resource\":\"ogknygjofjdd\",\"operation\":\"s\",\"description\":\"eupewnwreitjz\"},\"isDataAction\":false,\"origin\":\"sarhmofc\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}],\"metricSpecifications\":[{},{}]}}}],\"nextLink\":\"dtmlxhekuksjt\"}") - .toObject(OperationList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationList model = new OperationList(); - model = BinaryData.fromObject(model).toObject(OperationList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationPropertiesTests.java deleted file mode 100644 index afd6801f5775a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.LogSpecification; -import com.azure.resourcemanager.avs.models.MetricDimension; -import com.azure.resourcemanager.avs.models.MetricSpecification; -import com.azure.resourcemanager.avs.models.OperationProperties; -import com.azure.resourcemanager.avs.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"eofjaeqjh\",\"displayName\":\"b\",\"blobDuration\":\"v\"},{\"name\":\"mjqulngsn\",\"displayName\":\"bybkzgcwrwclxx\",\"blobDuration\":\"ljdousk\"},{\"name\":\"vkocrcjdkwtn\",\"displayName\":\"bnjbiksqrglssain\",\"blobDuration\":\"jwnzlljfmp\"},{\"name\":\"ebvmgxsabkyqd\",\"displayName\":\"jitcjczdzevn\",\"blobDuration\":\"krwpdap\"}],\"metricSpecifications\":[{\"name\":\"dkvwrwjfe\",\"displayName\":\"nhutjeltmrldhugj\",\"displayDescription\":\"datqxhocdgeabl\",\"unit\":\"huticndvkao\",\"category\":\"yiftyhxhuro\",\"aggregationType\":\"tyxolniwpwc\",\"supportedAggregationTypes\":[\"fkgiawxk\",\"ryplwckbasyypn\",\"dhsgcba\"],\"supportedTimeGrainTypes\":[\"ejk\",\"tynqgoul\",\"ndlik\"],\"fillGapWithZero\":true,\"dimensions\":[{\"name\":\"gibma\",\"displayName\":\"akeqs\",\"internalName\":\"yb\",\"toBeExportedForShoebox\":true},{\"name\":\"dqytbciqfouflmm\",\"displayName\":\"zsm\",\"internalName\":\"mglougpbkw\",\"toBeExportedForShoebox\":true}],\"enableRegionalMdmAccount\":\"duqkt\",\"sourceMdmAccount\":\"spwgcuertumkdosv\",\"sourceMdmNamespace\":\"hbmdgbbjfdd\"},{\"name\":\"bmbexppbhtqqro\",\"displayName\":\"p\",\"displayDescription\":\"s\",\"unit\":\"gbquxigj\",\"category\":\"gzjaoyfhrtxilne\",\"aggregationType\":\"ujysvle\",\"supportedAggregationTypes\":[\"fqawrlyxw\",\"kcprbnw\",\"xgjvtbv\",\"ysszdnrujqguh\"],\"supportedTimeGrainTypes\":[\"uqfprwzw\",\"nguitnwuizgazxu\"],\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"y\",\"displayName\":\"hr\",\"internalName\":\"dfvzwdzuhty\",\"toBeExportedForShoebox\":true},{\"name\":\"dkfthwxmnt\",\"displayName\":\"waopvkmijcmmxd\",\"internalName\":\"fufsrpymzi\",\"toBeExportedForShoebox\":false}],\"enableRegionalMdmAccount\":\"zcxtbzsgfyccsn\",\"sourceMdmAccount\":\"mdwzjeiachboo\",\"sourceMdmNamespace\":\"lnrosfqp\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("eofjaeqjh", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("b", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("v", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("dkvwrwjfe", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("nhutjeltmrldhugj", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "datqxhocdgeabl", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("huticndvkao", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("yiftyhxhuro", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals("tyxolniwpwc", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "fkgiawxk", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions - .assertEquals( - "ejk", model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "gibma", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions - .assertEquals( - "akeqs", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals( - "yb", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals( - true, - model - .serviceSpecification() - .metricSpecifications() - .get(0) - .dimensions() - .get(0) - .toBeExportedForShoebox()); - Assertions - .assertEquals( - "duqkt", model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "spwgcuertumkdosv", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "hbmdgbbjfdd", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("eofjaeqjh") - .withDisplayName("b") - .withBlobDuration("v"), - new LogSpecification() - .withName("mjqulngsn") - .withDisplayName("bybkzgcwrwclxx") - .withBlobDuration("ljdousk"), - new LogSpecification() - .withName("vkocrcjdkwtn") - .withDisplayName("bnjbiksqrglssain") - .withBlobDuration("jwnzlljfmp"), - new LogSpecification() - .withName("ebvmgxsabkyqd") - .withDisplayName("jitcjczdzevn") - .withBlobDuration("krwpdap"))) - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("dkvwrwjfe") - .withDisplayName("nhutjeltmrldhugj") - .withDisplayDescription("datqxhocdgeabl") - .withUnit("huticndvkao") - .withCategory("yiftyhxhuro") - .withAggregationType("tyxolniwpwc") - .withSupportedAggregationTypes( - Arrays.asList("fkgiawxk", "ryplwckbasyypn", "dhsgcba")) - .withSupportedTimeGrainTypes(Arrays.asList("ejk", "tynqgoul", "ndlik")) - .withFillGapWithZero(true) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("gibma") - .withDisplayName("akeqs") - .withInternalName("yb") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("dqytbciqfouflmm") - .withDisplayName("zsm") - .withInternalName("mglougpbkw") - .withToBeExportedForShoebox(true))) - .withEnableRegionalMdmAccount("duqkt") - .withSourceMdmAccount("spwgcuertumkdosv") - .withSourceMdmNamespace("hbmdgbbjfdd"), - new MetricSpecification() - .withName("bmbexppbhtqqro") - .withDisplayName("p") - .withDisplayDescription("s") - .withUnit("gbquxigj") - .withCategory("gzjaoyfhrtxilne") - .withAggregationType("ujysvle") - .withSupportedAggregationTypes( - Arrays.asList("fqawrlyxw", "kcprbnw", "xgjvtbv", "ysszdnrujqguh")) - .withSupportedTimeGrainTypes(Arrays.asList("uqfprwzw", "nguitnwuizgazxu")) - .withFillGapWithZero(false) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("y") - .withDisplayName("hr") - .withInternalName("dfvzwdzuhty") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("dkfthwxmnt") - .withDisplayName("waopvkmijcmmxd") - .withInternalName("fufsrpymzi") - .withToBeExportedForShoebox(false))) - .withEnableRegionalMdmAccount("zcxtbzsgfyccsn") - .withSourceMdmAccount("mdwzjeiachboo") - .withSourceMdmNamespace("lnrosfqp")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("eofjaeqjh", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("b", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("v", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("dkvwrwjfe", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("nhutjeltmrldhugj", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "datqxhocdgeabl", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("huticndvkao", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("yiftyhxhuro", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals("tyxolniwpwc", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "fkgiawxk", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions - .assertEquals( - "ejk", model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "gibma", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions - .assertEquals( - "akeqs", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals( - "yb", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals( - true, - model - .serviceSpecification() - .metricSpecifications() - .get(0) - .dimensions() - .get(0) - .toBeExportedForShoebox()); - Assertions - .assertEquals( - "duqkt", model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "spwgcuertumkdosv", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "hbmdgbbjfdd", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java index c42a96edfe5c1..d5ad3ebfcc9c7 100644 --- 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 @@ -1,214 +1,43 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; +import com.azure.resourcemanager.avs.models.ActionType; import com.azure.resourcemanager.avs.models.Operation; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class OperationsListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"name\":\"nhdwdigumbnra\",\"isDataAction\":false,\"display\":{\"provider\":\"tj\",\"resource\":\"ysdzhez\",\"operation\":\"vaiqyuvvf\",\"description\":\"kphhq\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; - String responseStr = - "{\"value\":[{\"name\":\"isofieypefojyqd\",\"display\":{\"provider\":\"plcplcwkhi\",\"resource\":\"hlhzdsqtzbsrgno\",\"operation\":\"jhf\",\"description\":\"vecactx\"},\"isDataAction\":false,\"origin\":\"e\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"qovekqvgqou\",\"displayName\":\"fzmpjwyivq\",\"blobDuration\":\"f\"},{\"name\":\"vhrfsphuagrt\",\"displayName\":\"kteusqczk\",\"blobDuration\":\"klxubyja\"},{\"name\":\"mmfblcqcuubgqib\",\"displayName\":\"a\",\"blobDuration\":\"etttwgdslqxihhr\"}],\"metricSpecifications\":[{\"name\":\"z\",\"displayName\":\"eypxiutcxapzhyr\",\"displayDescription\":\"togebjoxsl\",\"unit\":\"nhl\",\"category\":\"rqnkkzjcjbtr\",\"aggregationType\":\"ehvvib\",\"supportedAggregationTypes\":[\"jsto\"],\"supportedTimeGrainTypes\":[\"it\",\"kxzt\",\"oobklftidgfcwq\"],\"fillGapWithZero\":false,\"dimensions\":[{},{},{}],\"enableRegionalMdmAccount\":\"xzhemjyh\",\"sourceMdmAccount\":\"uj\",\"sourceMdmNamespace\":\"t\"}]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + 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); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("e", response.iterator().next().origin()); - Assertions - .assertEquals( - "qovekqvgqou", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "fzmpjwyivq", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .logSpecifications() - .get(0) - .displayName()); - Assertions - .assertEquals( - "f", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .logSpecifications() - .get(0) - .blobDuration()); - Assertions - .assertEquals( - "z", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "eypxiutcxapzhyr", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayName()); - Assertions - .assertEquals( - "togebjoxsl", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayDescription()); - Assertions - .assertEquals( - "nhl", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "rqnkkzjcjbtr", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .category()); - Assertions - .assertEquals( - "ehvvib", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .aggregationType()); - Assertions - .assertEquals( - "jsto", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions - .assertEquals( - "it", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions - .assertEquals( - false, - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .fillGapWithZero()); - Assertions - .assertEquals( - "xzhemjyh", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .enableRegionalMdmAccount()); - Assertions - .assertEquals( - "uj", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .sourceMdmAccount()); - Assertions - .assertEquals( - "t", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .sourceMdmNamespace()); + Assertions.assertEquals("tj", response.iterator().next().display().provider()); + Assertions.assertEquals("ysdzhez", response.iterator().next().display().resource()); + Assertions.assertEquals("vaiqyuvvf", response.iterator().next().display().operation()); + Assertions.assertEquals("kphhq", response.iterator().next().display().description()); + Assertions.assertEquals(ActionType.INTERNAL, response.iterator().next().actionType()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PagedOperationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PagedOperationTests.java new file mode 100644 index 0000000000000..6907edad23150 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PagedOperationTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.PagedOperation; +import com.azure.resourcemanager.avs.models.ActionType; +import org.junit.jupiter.api.Assertions; + +public final class PagedOperationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PagedOperation model = BinaryData.fromString( + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") + .toObject(PagedOperation.class); + Assertions.assertEquals("pybczmehmtzopb", model.value().get(0).display().provider()); + Assertions.assertEquals("h", model.value().get(0).display().resource()); + Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).display().operation()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().description()); + Assertions.assertEquals(ActionType.INTERNAL, model.value().get(0).actionType()); + Assertions.assertEquals("kfo", model.nextLink()); + } +} 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 index cd520a39d5794..fe466079fcfda 100644 --- 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 @@ -1,78 +1,45 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PlacementPoliciesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"ggsvoujkxibdaf\",\"provisioningState\":\"Succeeded\"},\"id\":\"mdyomkxfbvfbh\",\"name\":\"y\",\"type\":\"rhpw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PlacementPolicy response = - manager - .placementPolicies() - .define("a") - .withExistingCluster("wwsko", "dcbrwimuvq", "josovyrrl") - .withProperties( - new PlacementPolicyProperties() - .withState(PlacementPolicyState.ENABLED) - .withDisplayName("qtljqobbpihehc")) - .create(); - - Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); - Assertions.assertEquals("ggsvoujkxibdaf", response.properties().displayName()); + String responseStr + = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"nmzlanru\",\"provisioningState\":\"Succeeded\"},\"id\":\"nphcnzqtpjhmqrh\",\"name\":\"thlaiwdcxs\",\"type\":\"lzzhzdtxet\"}"; + + 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("whmozusgzvlnsnnj") + .withExistingCluster("lhguyn", "chl", "mltx") + .withProperties( + new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("olpy")) + .create(); + + Assertions.assertEquals(PlacementPolicyState.DISABLED, response.properties().state()); + Assertions.assertEquals("nmzlanru", 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 index acad00272c22f..de1aa803f8fc0 100644 --- 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 @@ -1,63 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PlacementPoliciesDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("rkolawjm", "smwr", "kcdxfzzzw", "jafi", com.azure.core.util.Context.NONE); - manager - .placementPolicies() - .delete("skw", "qjjyslurl", "shhkvpedw", "slsrhmpq", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java index 5b55547ff9cef..1c09718a98f49 100644 --- 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 @@ -1,72 +1,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PlacementPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"xcdglj\",\"provisioningState\":\"Deleting\"},\"id\":\"euachtomfl\",\"name\":\"ytswfp\",\"type\":\"mdgycxn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PlacementPolicy response = - manager - .placementPolicies() - .getWithResponse("mzegjon", "hj", "rwgdnqzbrfks", "zhzmtksjci", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(PlacementPolicyState.DISABLED, response.properties().state()); - Assertions.assertEquals("xcdglj", response.properties().displayName()); + String responseStr + = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"uzk\",\"provisioningState\":\"Failed\"},\"id\":\"o\",\"name\":\"xrzvhqjwtrhtgvgz\",\"type\":\"c\"}"; + + 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("vlwyzg", "blkujrllfojuidjp", "uyjucejikzo", "ovvtzejetjkln", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); + Assertions.assertEquals("uzk", 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 index b54220da09447..a59d39888e7c0 100644 --- 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 @@ -1,72 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PlacementPoliciesListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"tl\",\"provisioningState\":\"Updating\"},\"id\":\"agb\",\"name\":\"idqlvhu\",\"type\":\"oveofizrvjfnmj\"}]}"; - String responseStr = - "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"gydlhqv\",\"provisioningState\":\"Canceled\"},\"id\":\"pxy\",\"name\":\"afiqgeaarbgjekg\",\"type\":\"klbyulidwcw\"}]}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + PagedIterable response = manager.placementPolicies() + .list("ttcjuhplrvkmjc", "mjvlgfgg", "vkyylizrzbjpsf", com.azure.core.util.Context.NONE); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .placementPolicies() - .list("rupdwvnphcnzq", "pjhmqrhvthl", "iwdcxsmlzzhzd", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PlacementPolicyState.ENABLED, response.iterator().next().properties().state()); - Assertions.assertEquals("gydlhqv", response.iterator().next().properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, response.iterator().next().properties().state()); + Assertions.assertEquals("tl", response.iterator().next().properties().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java deleted file mode 100644 index c0230e34f3530..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.PlacementPoliciesList; - -public final class PlacementPoliciesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlacementPoliciesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"umwctondz\",\"provisioningState\":\"Canceled\"},\"id\":\"udfdlwgg\",\"name\":\"tsbwtovvtgse\",\"type\":\"nqfiufxqknpi\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"ttwqmsni\",\"provisioningState\":\"Deleting\"},\"id\":\"dmqnrojlpij\",\"name\":\"k\",\"type\":\"xfrdd\"}],\"nextLink\":\"ratiz\"}") - .toObject(PlacementPoliciesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementPoliciesList model = new PlacementPoliciesList(); - model = BinaryData.fromObject(model).toObject(PlacementPoliciesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.java index b83104b6eca04..41ebef68aadaa 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -13,25 +13,19 @@ public final class PlacementPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PlacementPolicyInner model = - BinaryData - .fromString( - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"sxiftozq\",\"provisioningState\":\"Canceled\"},\"id\":\"f\",\"name\":\"wesgogczh\",\"type\":\"nnxk\"}") - .toObject(PlacementPolicyInner.class); + PlacementPolicyInner model = BinaryData.fromString( + "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"klff\",\"provisioningState\":\"Deleting\"},\"id\":\"wqlgzrf\",\"name\":\"eeyebi\",\"type\":\"ikayuhqlbjbsybb\"}") + .toObject(PlacementPolicyInner.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); - Assertions.assertEquals("sxiftozq", model.properties().displayName()); + Assertions.assertEquals("klff", model.properties().displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PlacementPolicyInner model = - new PlacementPolicyInner() - .withProperties( - new PlacementPolicyProperties() - .withState(PlacementPolicyState.ENABLED) - .withDisplayName("sxiftozq")); + PlacementPolicyInner model = new PlacementPolicyInner().withProperties( + new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("klff")); model = BinaryData.fromObject(model).toObject(PlacementPolicyInner.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); - Assertions.assertEquals("sxiftozq", model.properties().displayName()); + Assertions.assertEquals("klff", model.properties().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyListResultTests.java new file mode 100644 index 0000000000000..4e1bb6f55a052 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.PlacementPolicyListResult; +import com.azure.resourcemanager.avs.models.PlacementPolicyState; +import org.junit.jupiter.api.Assertions; + +public final class PlacementPolicyListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PlacementPolicyListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"stwit\",\"provisioningState\":\"Succeeded\"},\"id\":\"vxccedcp\",\"name\":\"md\",\"type\":\"odn\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"jc\",\"provisioningState\":\"Updating\"},\"id\":\"tiugcxnav\",\"name\":\"wxqibyq\",\"type\":\"nyowxwlmdjrkvfg\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"dbodacizsjqlhkrr\",\"provisioningState\":\"Building\"},\"id\":\"ibqipqkg\",\"name\":\"vxndz\",\"type\":\"mkrefajpjorwkq\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"ij\",\"provisioningState\":\"Building\"},\"id\":\"fxzsjabibsyst\",\"name\":\"wfsdjpvkvpbj\",\"type\":\"bkzbzkd\"}],\"nextLink\":\"cjabudurgkakmo\"}") + .toObject(PlacementPolicyListResult.class); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.value().get(0).properties().state()); + Assertions.assertEquals("stwit", model.value().get(0).properties().displayName()); + Assertions.assertEquals("cjabudurgkakmo", model.nextLink()); + } +} 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 index 4411175939819..b66388814c2bc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,21 +12,19 @@ public final class PlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PlacementPolicyProperties model = - BinaryData - .fromString( - "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"yhmossxkkg\",\"provisioningState\":\"Failed\"}") - .toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("yhmossxkkg", model.displayName()); + PlacementPolicyProperties model = BinaryData.fromString( + "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"t\",\"provisioningState\":\"Updating\"}") + .toObject(PlacementPolicyProperties.class); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("t", model.displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PlacementPolicyProperties model = - new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("yhmossxkkg"); + PlacementPolicyProperties model + = new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("t"); model = BinaryData.fromObject(model).toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("yhmossxkkg", model.displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("t", 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 index 399de323d8fc3..509d809bb3941 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -15,32 +15,29 @@ public final class PlacementPolicyUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PlacementPolicyUpdateProperties model = - BinaryData - .fromString( - "{\"state\":\"Enabled\",\"vmMembers\":[\"sewgioilqukr\"],\"hostMembers\":[\"tqmieox\",\"rgguf\",\"yaomtb\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\"}") - .toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("sewgioilqukr", model.vmMembers().get(0)); - Assertions.assertEquals("tqmieox", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); + PlacementPolicyUpdateProperties model = BinaryData.fromString( + "{\"state\":\"Disabled\",\"vmMembers\":[\"flsjc\"],\"hostMembers\":[\"zfjvfbgofe\",\"jagrqmqhldvr\",\"iiojnal\",\"hfkvtvsexsowuel\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}") + .toObject(PlacementPolicyUpdateProperties.class); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("flsjc", model.vmMembers().get(0)); + Assertions.assertEquals("zfjvfbgofe", 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.ENABLED) - .withVmMembers(Arrays.asList("sewgioilqukr")) - .withHostMembers(Arrays.asList("tqmieox", "rgguf", "yaomtb")) - .withAffinityStrength(AffinityStrength.SHOULD) + PlacementPolicyUpdateProperties model + = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.DISABLED) + .withVmMembers(Arrays.asList("flsjc")) + .withHostMembers(Arrays.asList("zfjvfbgofe", "jagrqmqhldvr", "iiojnal", "hfkvtvsexsowuel")) + .withAffinityStrength(AffinityStrength.MUST) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("sewgioilqukr", model.vmMembers().get(0)); - Assertions.assertEquals("tqmieox", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("flsjc", model.vmMembers().get(0)); + Assertions.assertEquals("zfjvfbgofe", 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 index b011e0ff2c9e4..1e90d8af0bcd9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -15,32 +15,28 @@ public final class PlacementPolicyUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PlacementPolicyUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"state\":\"Disabled\",\"vmMembers\":[\"bdhqxvcxgf\",\"pdso\"],\"hostMembers\":[\"hrnsvbu\",\"wdvzyy\",\"ycnunvjsrtk\",\"awnopqgikyzirtxd\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\"}}") - .toObject(PlacementPolicyUpdate.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("bdhqxvcxgf", model.vmMembers().get(0)); - Assertions.assertEquals("hrnsvbu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); + PlacementPolicyUpdate model = BinaryData.fromString( + "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"rmbzo\",\"okixrjqcir\"],\"hostMembers\":[\"frl\",\"zszrnwoiindfpw\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"None\"}}") + .toObject(PlacementPolicyUpdate.class); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("rmbzo", model.vmMembers().get(0)); + Assertions.assertEquals("frl", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); + Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PlacementPolicyUpdate model = - new PlacementPolicyUpdate() - .withState(PlacementPolicyState.DISABLED) - .withVmMembers(Arrays.asList("bdhqxvcxgf", "pdso")) - .withHostMembers(Arrays.asList("hrnsvbu", "wdvzyy", "ycnunvjsrtk", "awnopqgikyzirtxd")) - .withAffinityStrength(AffinityStrength.SHOULD) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); + PlacementPolicyUpdate model = new PlacementPolicyUpdate().withState(PlacementPolicyState.ENABLED) + .withVmMembers(Arrays.asList("rmbzo", "okixrjqcir")) + .withHostMembers(Arrays.asList("frl", "zszrnwoiindfpw")) + .withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.NONE); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdate.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("bdhqxvcxgf", model.vmMembers().get(0)); - Assertions.assertEquals("hrnsvbu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("rmbzo", model.vmMembers().get(0)); + Assertions.assertEquals("frl", model.hostMembers().get(0)); + 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/PrivateCloudIdentityTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudIdentityTests.java index 0b3a3f8350ca7..9b0a999769de5 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,17 +12,16 @@ public final class PrivateCloudIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateCloudIdentity model = - BinaryData - .fromString("{\"principalId\":\"micykvceoveilo\",\"tenantId\":\"oty\",\"type\":\"SystemAssigned\"}") + PrivateCloudIdentity model + = BinaryData.fromString("{\"tenantId\":\"gakeqsr\",\"principalId\":\"bzqqedqytbciq\",\"type\":\"None\"}") .toObject(PrivateCloudIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateCloudIdentity model = new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); + PrivateCloudIdentity model = new PrivateCloudIdentity().withType(ResourceIdentityType.NONE); model = BinaryData.fromObject(model).toObject(PrivateCloudIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ResourceIdentityType.NONE, 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 index 148d7c9e30584..a6cbf6514c39b 100644 --- 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 @@ -1,61 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateCloudsDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("etoge", "joxslhvnhla", com.azure.core.util.Context.NONE); - manager.privateClouds().delete("vbkbxgomf", "juwasqvdaeyyguxa", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java index 51391084fa116..632eca03b9b28 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,16 +10,8 @@ public final class QuotaInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - QuotaInner model = - BinaryData - .fromString( - "{\"hostsRemaining\":{\"de\":229483686,\"jzicwifsjt\":856772857},\"quotaEnabled\":\"Disabled\"}") + QuotaInner model + = BinaryData.fromString("{\"hostsRemaining\":{\"bifpikxwczb\":1575612003},\"quotaEnabled\":\"Disabled\"}") .toObject(QuotaInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaInner model = new QuotaInner(); - model = BinaryData.fromObject(model).toObject(QuotaInner.class); - } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java index 59848430cdc17..f1a2969ba26f1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,16 +10,8 @@ public final class ScriptCmdletInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptCmdletInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"eydbsd\",\"timeout\":\"m\",\"parameters\":[{\"type\":\"Credential\",\"name\":\"vbbxuripl\",\"description\":\"n\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Bool\",\"name\":\"ywrckp\",\"description\":\"lyhpluodpvruud\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"stgktst\",\"description\":\"xeclzedqbcvhzlhp\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"dlwwqfbumlkxt\",\"name\":\"qjfsmlmbtxhw\",\"type\":\"fwsrtawcoezbrhu\"}") - .toObject(ScriptCmdletInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptCmdletInner model = new ScriptCmdletInner(); - model = BinaryData.fromObject(model).toObject(ScriptCmdletInner.class); + ScriptCmdletInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"lpijnkrxfrd\",\"timeout\":\"c\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"nasx\",\"description\":\"tozqyzhftwesgo\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"krlgnyhm\",\"description\":\"sxkkg\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"xjb\",\"name\":\"hqxvcxgfrpdsofbs\",\"type\":\"rnsvbuswd\"}") + .toObject(ScriptCmdletInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletListResultTests.java new file mode 100644 index 0000000000000..5f5f0861b01fd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.ScriptCmdletListResult; +import org.junit.jupiter.api.Assertions; + +public final class ScriptCmdletListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScriptCmdletListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"bxvvyhg\",\"timeout\":\"pbyrqufegxu\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"mctlpdngitv\",\"description\":\"mhrixkwmyijejve\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"xexccbdreaxhcexd\",\"description\":\"vqahqkghtpwi\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"vfycxzb\",\"name\":\"voowvr\",\"type\":\"mtg\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ostronz\",\"timeout\":\"hgfipnsxkmcw\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"afxtsgum\",\"description\":\"glikkxwslolb\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"felfktg\",\"description\":\"crpw\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Bool\",\"name\":\"brnjwmw\",\"description\":\"nbsazejjoqkag\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"augzxnfaazpxdtn\",\"name\":\"dm\",\"type\":\"qjjlwuen\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ou\",\"timeout\":\"bre\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Credential\",\"name\":\"ixqtn\",\"description\":\"tezlwff\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"qmt\",\"description\":\"ltmm\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Bool\",\"name\":\"hvwauyqncy\",\"description\":\"p\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"wx\",\"description\":\"pevzhfst\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"ujbypelmcuvhixb\",\"name\":\"xyfwnylrcool\",\"type\":\"ttpkiwkkbnujrywv\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"pncur\",\"timeout\":\"iwii\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"cbihwqk\",\"description\":\"dntwjchrdgo\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"String\",\"name\":\"ond\",\"description\":\"luudfdlwggytsb\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"gseinq\",\"name\":\"iufxqknpir\",\"type\":\"nepttwqmsni\"}],\"nextLink\":\"cdm\"}") + .toObject(ScriptCmdletListResult.class); + Assertions.assertEquals("cdm", model.nextLink()); + } +} 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 index 5d7a9c5a1c6b7..6c853883a5580 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,16 +10,8 @@ public final class ScriptCmdletPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptCmdletProperties model = - BinaryData - .fromString( - "{\"description\":\"kh\",\"timeout\":\"ygo\",\"parameters\":[{\"type\":\"String\",\"name\":\"qjbvleorfmlu\",\"description\":\"tqzfavyv\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"euayjkqabqgzsles\",\"description\":\"bhernntiew\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"rbe\",\"description\":\"agohbuff\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]}") - .toObject(ScriptCmdletProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptCmdletProperties model = new ScriptCmdletProperties(); - model = BinaryData.fromObject(model).toObject(ScriptCmdletProperties.class); + ScriptCmdletProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"description\":\"bycnunvjsrtkf\",\"timeout\":\"nopqgikyzirtx\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Credential\",\"name\":\"tpsew\",\"description\":\"oi\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"tqmieox\",\"description\":\"ggufhyaomtb\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]}") + .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 index 13fb12301a16e..afb413e506356 100644 --- 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 @@ -1,67 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.ScriptCmdlet; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ScriptCmdletsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"kltytmhdroz\",\"timeout\":\"hdrlktg\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"String\",\"name\":\"eml\",\"description\":\"waeeczgfb\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"xblycsxzuj\",\"description\":\"rlsmdesqplpvmjc\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"dyvt\",\"name\":\"owx\",\"type\":\"gpiudeug\"}"; - String responseStr = - "{\"properties\":{\"description\":\"iov\",\"timeout\":\"cgxuugqkctotiowl\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"tjgwdtguk\",\"description\":\"nblwphqlkcc\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"qwahoi\",\"name\":\"lwgniiprglvawu\",\"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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + ScriptCmdlet response = manager.scriptCmdlets() + .getWithResponse("th", "hn", "naoyank", "oe", com.azure.core.util.Context.NONE) + .getValue(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptCmdlet response = - manager - .scriptCmdlets() - .getWithResponse("emmucfxh", "kkflrmymyincqlhr", "s", "sl", com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java index 44b12f9521d4b..eaea474fcb25c 100644 --- 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 @@ -1,65 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.ScriptCmdlet; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ScriptCmdletsListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"gjggsv\",\"timeout\":\"jkxibda\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"mkxfbvfbhdyir\",\"description\":\"wpg\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"String\",\"name\":\"o\",\"description\":\"kkum\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"ztbws\",\"description\":\"qowxwcom\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"zc\",\"description\":\"k\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"fdv\",\"name\":\"vhb\",\"type\":\"rnfxtgddp\"}]}"; - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"sxze\",\"timeout\":\"axwk\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"uhxep\",\"description\":\"utznabaobns\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"ltymkmvguihywart\",\"name\":\"pphkixkykxds\",\"type\":\"j\"}]}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + PagedIterable response + = manager.scriptCmdlets().list("mrqbrjbbmpxdlv", "kfrexcrseqwjks", "hud", com.azure.core.util.Context.NONE); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.scriptCmdlets().list("oewbid", "vteo", "xvgpiude", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java deleted file mode 100644 index 9998d584750c7..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptCmdletsList; - -public final class ScriptCmdletsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptCmdletsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"hu\",\"timeout\":\"wp\",\"parameters\":[{\"type\":\"String\",\"name\":\"gjup\",\"description\":\"utpwoqhihejqgw\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"ypsxjvfoim\",\"description\":\"slirciz\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"fceacvlhvygd\",\"name\":\"ftumrtwnawjslbiw\",\"type\":\"ojgcyzt\"},{\"properties\":{\"description\":\"z\",\"timeout\":\"aeqphchqnr\",\"parameters\":[{\"type\":\"Int\",\"name\":\"uwrykqgaifmvikl\",\"description\":\"dvk\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"cvdsrhnj\",\"description\":\"olvtnovqfzge\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"ltducea\",\"description\":\"mczuo\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"w\",\"name\":\"qioknssxmojm\",\"type\":\"vpkjpr\"}],\"nextLink\":\"wcfzqljyxgt\"}") - .toObject(ScriptCmdletsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptCmdletsList model = new ScriptCmdletsList(); - model = BinaryData.fromObject(model).toObject(ScriptCmdletsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java index 774802635e1fb..53ca6f17ccc92 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -15,44 +15,40 @@ public final class ScriptExecutionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptExecutionInner model = - BinaryData - .fromString( - "{\"properties\":{\"scriptCmdletId\":\"abwidfcxsspuun\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"yhkx\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"drihpfhoqcaaewda\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mdjvlpj\"}],\"failureReason\":\"kzbrmsgeivsiy\",\"timeout\":\"zkdnc\",\"retention\":\"xonbzoggculapz\",\"submittedAt\":\"2021-07-25T18:35:20Z\",\"startedAt\":\"2021-08-05T01:58:35Z\",\"finishedAt\":\"2021-06-21T04:03:02Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"pnylb\",\"uajlyj\"],\"namedOutputs\":{\"zhvfcibyfmowuxr\":\"dataof\",\"xfzwi\":\"datajpvd\",\"xjrk\":\"datavwzjbhyz\"},\"information\":[\"trnegvmnvuqeqvld\",\"pa\"],\"warnings\":[\"bkkd\",\"flvestmjlxrrilo\",\"apeewchpxlkt\",\"kuziycsle\"],\"errors\":[\"uztcktyhjtqed\"]},\"id\":\"gzulwmmrqzzr\",\"name\":\"jvpglydzgk\",\"type\":\"vqeevtoep\"}") - .toObject(ScriptExecutionInner.class); - Assertions.assertEquals("abwidfcxsspuun", model.scriptCmdletId()); - Assertions.assertEquals("yhkx", model.parameters().get(0).name()); - Assertions.assertEquals("drihpfhoqcaaewda", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("kzbrmsgeivsiy", model.failureReason()); - Assertions.assertEquals("zkdnc", model.timeout()); - Assertions.assertEquals("xonbzoggculapz", model.retention()); - Assertions.assertEquals("pnylb", model.output().get(0)); + ScriptExecutionInner model = BinaryData.fromString( + "{\"properties\":{\"scriptCmdletId\":\"izsh\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"impevf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mblrrilbywd\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"icc\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rwfscjfnynszquj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"zdvoqytibyowbb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gyavu\"}],\"failureReason\":\"thjoxoism\",\"timeout\":\"ksbpimlqoljx\",\"retention\":\"gxxlxsffgcvizq\",\"submittedAt\":\"2021-03-28T18:15:03Z\",\"startedAt\":\"2021-04-12T21:20:45Z\",\"finishedAt\":\"2021-04-04T23:05:36Z\",\"provisioningState\":\"Pending\",\"output\":[\"fgfb\",\"jub\",\"yhgk\"],\"namedOutputs\":{\"ktlahbqa\":\"datansgowzfttst\"},\"information\":[\"tgzukxitmmqt\",\"qqqxhrnxrx\",\"pjui\",\"av\"],\"warnings\":[\"dzf\",\"azivjlfrqttbajl\",\"atnwxyiopi\",\"kqqfk\"],\"errors\":[\"cxkdmligovi\"]},\"id\":\"xk\",\"name\":\"mloazuru\",\"type\":\"cbgoor\"}") + .toObject(ScriptExecutionInner.class); + Assertions.assertEquals("izsh", model.scriptCmdletId()); + Assertions.assertEquals("impevf", model.parameters().get(0).name()); + Assertions.assertEquals("icc", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("thjoxoism", model.failureReason()); + Assertions.assertEquals("ksbpimlqoljx", model.timeout()); + Assertions.assertEquals("gxxlxsffgcvizq", model.retention()); + Assertions.assertEquals("fgfb", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionInner model = - new ScriptExecutionInner() - .withScriptCmdletId("abwidfcxsspuun") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("yhkx"))) - .withHiddenParameters( - Arrays - .asList( - new ScriptExecutionParameter().withName("drihpfhoqcaaewda"), - new ScriptExecutionParameter().withName("mdjvlpj"))) - .withFailureReason("kzbrmsgeivsiy") - .withTimeout("zkdnc") - .withRetention("xonbzoggculapz") - .withOutput(Arrays.asList("pnylb", "uajlyj")) - .withNamedOutputs(mapOf("zhvfcibyfmowuxr", "dataof", "xfzwi", "datajpvd", "xjrk", "datavwzjbhyz")); + ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("izsh") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("impevf"), + new ScriptExecutionParameter().withName("mblrrilbywd"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("icc"), + new ScriptExecutionParameter().withName("rwfscjfnynszquj"), + new ScriptExecutionParameter().withName("zdvoqytibyowbb"), + new ScriptExecutionParameter().withName("gyavu"))) + .withFailureReason("thjoxoism") + .withTimeout("ksbpimlqoljx") + .withRetention("gxxlxsffgcvizq") + .withOutput(Arrays.asList("fgfb", "jub", "yhgk")) + .withNamedOutputs(mapOf("ktlahbqa", "datansgowzfttst")); model = BinaryData.fromObject(model).toObject(ScriptExecutionInner.class); - Assertions.assertEquals("abwidfcxsspuun", model.scriptCmdletId()); - Assertions.assertEquals("yhkx", model.parameters().get(0).name()); - Assertions.assertEquals("drihpfhoqcaaewda", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("kzbrmsgeivsiy", model.failureReason()); - Assertions.assertEquals("zkdnc", model.timeout()); - Assertions.assertEquals("xonbzoggculapz", model.retention()); - Assertions.assertEquals("pnylb", model.output().get(0)); + Assertions.assertEquals("izsh", model.scriptCmdletId()); + Assertions.assertEquals("impevf", model.parameters().get(0).name()); + Assertions.assertEquals("icc", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("thjoxoism", model.failureReason()); + Assertions.assertEquals("ksbpimlqoljx", model.timeout()); + Assertions.assertEquals("gxxlxsffgcvizq", model.retention()); + Assertions.assertEquals("fgfb", model.output().get(0)); } // Use "Map.of" if available diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionListResultTests.java new file mode 100644 index 0000000000000..71c0c46de8c9a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.ScriptExecutionListResult; +import org.junit.jupiter.api.Assertions; + +public final class ScriptExecutionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScriptExecutionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"fezzxscyhwzdg\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jbzbomvzzbtdcq\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"iyujviylwdshfs\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"n\"}],\"failureReason\":\"gy\",\"timeout\":\"frymsgaojfmwnc\",\"retention\":\"mrfhirctymox\",\"submittedAt\":\"2021-09-02T06:19:11Z\",\"startedAt\":\"2021-05-10T08:06:55Z\",\"finishedAt\":\"2021-04-03T05:33:45Z\",\"provisioningState\":\"Running\",\"output\":[\"uh\"],\"namedOutputs\":{\"asdvl\":\"datapqjlihhyusps\",\"mrsreuzvxurisjnh\":\"datafwdgzxulucvp\",\"blwpcesutrgj\":\"dataytxifqjzgxmrh\"},\"information\":[\"uutpwoqhih\",\"jqgwzp\",\"fqntcyp\"],\"warnings\":[\"vfoimwksli\"],\"errors\":[\"zjxvydfcea\"]},\"id\":\"lhvygdyftu\",\"name\":\"rtwnawjslbi\",\"type\":\"kojgcyzts\"},{\"properties\":{\"scriptCmdletId\":\"nbaeqphchqn\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"pxehuwrykqga\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fmviklby\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"hbejdznxcvdsrhnj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"volvtn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"v\"}],\"failureReason\":\"zgemjdftuljlt\",\"timeout\":\"ucea\",\"retention\":\"mczuo\",\"submittedAt\":\"2021-10-02T15:37:14Z\",\"startedAt\":\"2021-01-27T20:06:14Z\",\"finishedAt\":\"2021-10-08T11:59:32Z\",\"provisioningState\":\"Running\",\"output\":[\"nssxmojmsvpk\",\"prvkwcfzqljyxgtc\",\"heyd\"],\"namedOutputs\":{\"pltfnhtba\":\"datashmkxmaehvbbxur\",\"kpyklyhp\":\"datakgxywr\",\"uudl\":\"datauodpv\",\"ostgkts\":\"datazibt\"},\"information\":[\"xeclzedqbcvhzlhp\",\"odqkdlwwqfb\",\"mlkxtrqjfs\",\"lmbtxhwgfwsrt\"],\"warnings\":[\"oezbrhubsk\",\"udygooo\",\"kqfqjbvl\"],\"errors\":[\"fmluiqtqzfavyvn\",\"qybaryeua\",\"jkqa\"]},\"id\":\"gzslesjcbhernnti\",\"name\":\"w\",\"type\":\"jcvb\"},{\"properties\":{\"scriptCmdletId\":\"rbe\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"gohbuffkmrq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mvvhmxtdrjfuta\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"bj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ewzcjznmwcp\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"guaadraufactkahz\"}],\"failureReason\":\"ajjziuxxpshne\",\"timeout\":\"kulfg\",\"retention\":\"qubkw\",\"submittedAt\":\"2021-05-19T05:23:07Z\",\"startedAt\":\"2021-05-29T00:44:01Z\",\"finishedAt\":\"2021-02-18T06:07:47Z\",\"provisioningState\":\"Running\",\"output\":[\"bazpjuohmi\",\"yfln\",\"rwm\",\"uvwpklvxwmyg\"],\"namedOutputs\":{\"sze\":\"datagpqch\",\"rxgibbd\":\"datannbj\",\"kokwbqplhlvnu\":\"dataxconfozauors\",\"phwzsoldweyuqdu\":\"dataepzl\"},\"information\":[\"nnrwrbiork\",\"alywjhhgdn\"],\"warnings\":[\"sivfomilo\"],\"errors\":[\"dufiq\",\"dieuzaofj\"]},\"id\":\"vcyy\",\"name\":\"s\",\"type\":\"gdotcubiipuipwo\"}],\"nextLink\":\"nmacj\"}") + .toObject(ScriptExecutionListResult.class); + Assertions.assertEquals("fezzxscyhwzdg", model.value().get(0).scriptCmdletId()); + Assertions.assertEquals("jbzbomvzzbtdcq", model.value().get(0).parameters().get(0).name()); + Assertions.assertEquals("iyujviylwdshfs", model.value().get(0).hiddenParameters().get(0).name()); + Assertions.assertEquals("gy", model.value().get(0).failureReason()); + Assertions.assertEquals("frymsgaojfmwnc", model.value().get(0).timeout()); + Assertions.assertEquals("mrfhirctymox", model.value().get(0).retention()); + Assertions.assertEquals("uh", model.value().get(0).output().get(0)); + Assertions.assertEquals("nmacj", model.nextLink()); + } +} 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 index 8f3c9e0344c32..e0a7c1a752b89 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,17 +11,16 @@ public final class ScriptExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptExecutionParameter model = - BinaryData - .fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"tppn\"}") + ScriptExecutionParameter model + = BinaryData.fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"zkdnc\"}") .toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("tppn", model.name()); + Assertions.assertEquals("zkdnc", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionParameter model = new ScriptExecutionParameter().withName("tppn"); + ScriptExecutionParameter model = new ScriptExecutionParameter().withName("zkdnc"); model = BinaryData.fromObject(model).toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("tppn", model.name()); + Assertions.assertEquals("zkdnc", 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 index edbdbe68dae0a..f6da7bf542477 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -15,44 +15,39 @@ public final class ScriptExecutionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptExecutionProperties model = - BinaryData - .fromString( - "{\"scriptCmdletId\":\"utnwytpzdmovzvf\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"wzqa\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"f\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ur\"}],\"failureReason\":\"laecxndticok\",\"timeout\":\"vzm\",\"retention\":\"t\",\"submittedAt\":\"2021-01-29T20:58:55Z\",\"startedAt\":\"2021-12-03T00:07:08Z\",\"finishedAt\":\"2021-05-21T11:49:52Z\",\"provisioningState\":\"Failed\",\"output\":[\"lnpkciay\",\"riykhyawfvjlbox\"],\"namedOutputs\":{\"digumbnr\":\"datajlmxhomdynhd\",\"hezwwvaiq\":\"dataauzzptjazysd\"},\"information\":[\"vfonkphhqyikvyl\"],\"warnings\":[\"avluwmncs\",\"tijfybvp\",\"ekrsgs\"],\"errors\":[\"huzqgn\",\"dgkynscliqhzvhxn\",\"omtkub\"]}") - .toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("utnwytpzdmovzvf", model.scriptCmdletId()); - Assertions.assertEquals("wzqa", model.parameters().get(0).name()); - Assertions.assertEquals("ur", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("laecxndticok", model.failureReason()); - Assertions.assertEquals("vzm", model.timeout()); - Assertions.assertEquals("t", model.retention()); - Assertions.assertEquals("lnpkciay", model.output().get(0)); + ScriptExecutionProperties model = BinaryData.fromString( + "{\"scriptCmdletId\":\"eoybfhjxakvvjgs\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dilmyww\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"kxn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"edabgyvudtjue\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"bcihxuuwhc\"}],\"failureReason\":\"xccybvpa\",\"timeout\":\"akkud\",\"retention\":\"xgwjplmagstcyoh\",\"submittedAt\":\"2021-07-05T16:33:29Z\",\"startedAt\":\"2021-11-14T02:06:38Z\",\"finishedAt\":\"2021-05-12T18:54:52Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"ogsjkmnwqjno\",\"aiy\",\"ddviacegfnmntfpm\"],\"namedOutputs\":{\"vvbalx\":\"datamfnczd\",\"chp\":\"datal\",\"evwrdnhfuk\":\"datadb\",\"fcvlerch\":\"datavsjcswsmystuluqy\"},\"information\":[\"mfpjbabw\"],\"warnings\":[\"cxsspuunnoxyh\",\"xgqddrih\",\"fhoqca\",\"ewda\"],\"errors\":[\"jvlpjxxkzbr\",\"sgeivsiy\"]}") + .toObject(ScriptExecutionProperties.class); + Assertions.assertEquals("eoybfhjxakvvjgs", model.scriptCmdletId()); + Assertions.assertEquals("dilmyww", model.parameters().get(0).name()); + Assertions.assertEquals("kxn", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("xccybvpa", model.failureReason()); + Assertions.assertEquals("akkud", model.timeout()); + Assertions.assertEquals("xgwjplmagstcyoh", model.retention()); + Assertions.assertEquals("ogsjkmnwqjno", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionProperties model = - new ScriptExecutionProperties() - .withScriptCmdletId("utnwytpzdmovzvf") - .withParameters( - Arrays - .asList( - new ScriptExecutionParameter().withName("wzqa"), - new ScriptExecutionParameter().withName("f"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("ur"))) - .withFailureReason("laecxndticok") - .withTimeout("vzm") - .withRetention("t") - .withOutput(Arrays.asList("lnpkciay", "riykhyawfvjlbox")) - .withNamedOutputs(mapOf("digumbnr", "datajlmxhomdynhd", "hezwwvaiq", "dataauzzptjazysd")); + ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("eoybfhjxakvvjgs") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("dilmyww"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("kxn"), + new ScriptExecutionParameter().withName("edabgyvudtjue"), + new ScriptExecutionParameter().withName("bcihxuuwhc"))) + .withFailureReason("xccybvpa") + .withTimeout("akkud") + .withRetention("xgwjplmagstcyoh") + .withOutput(Arrays.asList("ogsjkmnwqjno", "aiy", "ddviacegfnmntfpm")) + .withNamedOutputs(mapOf("vvbalx", "datamfnczd", "chp", "datal", "evwrdnhfuk", "datadb", "fcvlerch", + "datavsjcswsmystuluqy")); model = BinaryData.fromObject(model).toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("utnwytpzdmovzvf", model.scriptCmdletId()); - Assertions.assertEquals("wzqa", model.parameters().get(0).name()); - Assertions.assertEquals("ur", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("laecxndticok", model.failureReason()); - Assertions.assertEquals("vzm", model.timeout()); - Assertions.assertEquals("t", model.retention()); - Assertions.assertEquals("lnpkciay", model.output().get(0)); + Assertions.assertEquals("eoybfhjxakvvjgs", model.scriptCmdletId()); + Assertions.assertEquals("dilmyww", model.parameters().get(0).name()); + Assertions.assertEquals("kxn", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("xccybvpa", model.failureReason()); + Assertions.assertEquals("akkud", model.timeout()); + Assertions.assertEquals("xgwjplmagstcyoh", model.retention()); + Assertions.assertEquals("ogsjkmnwqjno", model.output().get(0)); } // Use "Map.of" if available 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 index 87c7312d42373..e5e3898a5b56f 100644 --- 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 @@ -1,20 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -22,73 +19,42 @@ import java.util.Map; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ScriptExecutionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"scriptCmdletId\":\"wzfgbrttuiaclkie\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jlfnthiq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"yuttdiygbpvnwswm\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xkyctwwgzwx\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ecvo\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ygzyvneezaifght\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"oqqtl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fhzbkr\"}],\"failureReason\":\"jjavfq\",\"timeout\":\"vhnqo\",\"retention\":\"dogiyetesyp\",\"submittedAt\":\"2021-10-20T02:22:42Z\",\"startedAt\":\"2021-07-21T20:44:49Z\",\"finishedAt\":\"2021-08-24T04:40:21Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"b\"],\"namedOutputs\":{\"p\":\"dataynkbwetnju\",\"piaccxnafb\":\"dataprkzya\"},\"information\":[\"oohtuovmaonurjtu\"],\"warnings\":[\"ihpvecmslclblyj\",\"lt\",\"sjuscvsfxigctmg\"],\"errors\":[\"pbezqccydrtceu\",\"d\",\"kkyihzt\"]},\"id\":\"qm\",\"name\":\"qzgwldoychil\",\"type\":\"cecfehuwaoaguh\"}"; - String responseStr = - "{\"properties\":{\"scriptCmdletId\":\"mslclblyjxlt\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"uscv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"f\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ctmgxuupbezqccy\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rtceukdqkkyihzt\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"eq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gqzgwldoychill\"}],\"failureReason\":\"cfehuwaoagu\",\"timeout\":\"icq\",\"retention\":\"izs\",\"submittedAt\":\"2021-05-20T02:42:18Z\",\"startedAt\":\"2021-03-15T23:43:36Z\",\"finishedAt\":\"2021-06-27T17:41:19Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"tk\",\"qejpmvssehaepwa\"],\"namedOutputs\":{\"y\":\"datatczhupeuknijd\",\"ydjfb\":\"dataes\",\"v\":\"datac\",\"uflgbhgauacdixm\":\"datahulrtywikdmhla\"},\"information\":[\"rs\"],\"warnings\":[\"qg\",\"kfnozoeoqbvj\",\"vefgwbmqjchntas\"],\"errors\":[\"mx\",\"ulpzealb\",\"qkyojwyvf\"]},\"id\":\"mbtsuahxsg\",\"name\":\"jcmmzrrscub\",\"type\":\"wsdrnpxqwodif\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + ScriptExecution response = manager.scriptExecutions() + .define("xameblydyvkfkm") + .withExistingPrivateCloud("zfrgqhaohcm", "uocnjrohmbpyr") + .withScriptCmdletId("xne") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("mtodl"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("apucygvo"), + new ScriptExecutionParameter().withName("vyuns"), new ScriptExecutionParameter().withName("xlghieegj"))) + .withFailureReason("vvpa") + .withTimeout("eksgbuxantuygd") + .withRetention("aq") + .withOutput(Arrays.asList("ulopmjnlexwhcb", "pibkephuu", "erctatoyin", "qpbrlc")) + .withNamedOutputs(mapOf("crrpcjttbstvje", "datauczkgofxyfsruc", "mlghktuidvrmazlp", "dataqnrmvvfko")) + .create(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptExecution response = - manager - .scriptExecutions() - .define("mlghktuidvrmazlp") - .withExistingPrivateCloud("crrpcjttbstvje", "qnrmvvfko") - .withScriptCmdletId("exymzvla") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("bhpwvqsgnyy"))) - .withHiddenParameters( - Arrays - .asList( - new ScriptExecutionParameter().withName("ivensrpmeyyvpk"), - new ScriptExecutionParameter().withName("atlb"))) - .withFailureReason("pzgsk") - .withTimeout("rfhfvo") - .withRetention("knbnxwcdommpvfq") - .withOutput(Arrays.asList("aclkiexhajlfnt")) - .withNamedOutputs(mapOf("diygbpvnwswmtxky", "datafyut", "l", "datatwwgzwx")) - .create(); - - Assertions.assertEquals("mslclblyjxlt", response.scriptCmdletId()); - Assertions.assertEquals("uscv", response.parameters().get(0).name()); - Assertions.assertEquals("ctmgxuupbezqccy", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("cfehuwaoagu", response.failureReason()); - Assertions.assertEquals("icq", response.timeout()); - Assertions.assertEquals("izs", response.retention()); - Assertions.assertEquals("tk", response.output().get(0)); + Assertions.assertEquals("wzfgbrttuiaclkie", response.scriptCmdletId()); + Assertions.assertEquals("jlfnthiq", response.parameters().get(0).name()); + Assertions.assertEquals("ecvo", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("jjavfq", response.failureReason()); + Assertions.assertEquals("vhnqo", response.timeout()); + Assertions.assertEquals("dogiyetesyp", response.retention()); + Assertions.assertEquals("b", response.output().get(0)); } // Use "Map.of" if available 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 index 86ab2b39f46f8..cc7fd67054c67 100644 --- 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 @@ -1,61 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ScriptExecutionsDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - 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("bqqqagwwrxa", "mz", "sgl", com.azure.core.util.Context.NONE); - manager.scriptExecutions().delete("gnzxojpslsvj", "pli", "fiqwoy", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java index 2fc8a4763f85d..ebecbca21329f 100644 --- 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 @@ -1,88 +1,50 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.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.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ScriptExecutionsGetExecutionLogsWithResponseMockTests { @Test public void testGetExecutionLogsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"scriptCmdletId\":\"benribcawetzq\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jwfljhznamtua\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mzwcjjncqt\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"z\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"izvg\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"tzuuvb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ngrebwg\"}],\"failureReason\":\"httzlswvajqfutlx\",\"timeout\":\"oqza\",\"retention\":\"nwqrjzfrgqh\",\"submittedAt\":\"2021-05-07T20:50:08Z\",\"startedAt\":\"2021-05-24T01:31:46Z\",\"finishedAt\":\"2021-03-17T16:52:41Z\",\"provisioningState\":\"Canceled\",\"output\":[\"r\",\"hmbpyryxamebly\",\"yvk\",\"kmrocxne\"],\"namedOutputs\":{\"pyapucygvoav\":\"datamtodl\"},\"information\":[\"ssxlghieegjlg\",\"vpaseksgbu\"],\"warnings\":[\"tu\",\"gdhg\",\"qipir\",\"iwrqofulopmjnl\"],\"errors\":[\"hcbjpibk\"]},\"id\":\"phuuuerctato\",\"name\":\"intqpbrlcyr\",\"type\":\"uczkgofxyfsruc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptExecution response = - manager - .scriptExecutions() - .getExecutionLogsWithResponse( - "qvapcohhoucq", - "q", - "jxcx", - Arrays - .asList( - ScriptOutputStreamType.OUTPUT, - ScriptOutputStreamType.ERROR, - ScriptOutputStreamType.INFORMATION, - ScriptOutputStreamType.WARNING), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("benribcawetzq", response.scriptCmdletId()); - Assertions.assertEquals("jwfljhznamtua", response.parameters().get(0).name()); - Assertions.assertEquals("tzuuvb", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("httzlswvajqfutlx", response.failureReason()); - Assertions.assertEquals("oqza", response.timeout()); - Assertions.assertEquals("nwqrjzfrgqh", response.retention()); - Assertions.assertEquals("r", response.output().get(0)); + String responseStr + = "{\"properties\":{\"scriptCmdletId\":\"qthwmgnmbscbb\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dhxiidlopedbwd\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"yqyybxubmdna\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"qwremjel\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qacigeleo\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"d\"}],\"failureReason\":\"qvwzkjopwbeonrl\",\"timeout\":\"wzdqybxceakxcpts\",\"retention\":\"fyiaseqch\",\"submittedAt\":\"2021-11-05T11:59:35Z\",\"startedAt\":\"2021-08-04T17:40:23Z\",\"finishedAt\":\"2021-01-20T16:29:41Z\",\"provisioningState\":\"Deleting\",\"output\":[\"ykiue\"],\"namedOutputs\":{\"klinhmdptysprq\":\"datanbwzohmnrxxbso\",\"pli\":\"datagnzxojpslsvj\",\"qvapcohhoucq\":\"datafiqwoy\",\"jxcx\":\"dataq\"},\"information\":[\"dcgdzbenribca\",\"etzqd\",\"tjwfljhznamtua\"],\"warnings\":[\"wcjjncqt\",\"z\",\"izvg\"],\"errors\":[\"tzuuvb\",\"ngrebwg\"]},\"id\":\"httzlswvajqfutlx\",\"name\":\"oqza\",\"type\":\"unwqr\"}"; + + 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("rczezkhhlt", "jadhqoawj", "oyueayfbpcmsp", + Arrays.asList(ScriptOutputStreamType.WARNING, ScriptOutputStreamType.OUTPUT, + ScriptOutputStreamType.WARNING), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("qthwmgnmbscbb", response.scriptCmdletId()); + Assertions.assertEquals("dhxiidlopedbwd", response.parameters().get(0).name()); + Assertions.assertEquals("qwremjel", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("qvwzkjopwbeonrl", response.failureReason()); + Assertions.assertEquals("wzdqybxceakxcpts", response.timeout()); + Assertions.assertEquals("fyiaseqch", response.retention()); + Assertions.assertEquals("ykiue", 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 index fbb3865b6fab6..77ccbbe0b488b 100644 --- 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 @@ -1,76 +1,45 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.ScriptExecution; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ScriptExecutionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"scriptCmdletId\":\"zydmxzjijpvuaurk\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"irldefxr\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"xnbkkj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"nurnnq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"nqbpi\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xqltgrd\"}],\"failureReason\":\"ypxrx\",\"timeout\":\"bfihw\",\"retention\":\"vctafsrb\",\"submittedAt\":\"2021-08-17T18:59:51Z\",\"startedAt\":\"2021-06-04T08:10:19Z\",\"finishedAt\":\"2021-02-19T23:36:25Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"hspnxwqagnepz\",\"aklsbsbq\",\"qagwwrxaomz\",\"sgl\"],\"namedOutputs\":{\"oawjqoyueay\":\"datazezkhhltnjadh\",\"lbyrru\":\"databpcms\",\"igdhxiidlo\":\"dataqthwmgnmbscbb\"},\"information\":[\"bwdpyqyyb\",\"ubmdnafcbqwre\",\"jelaqacigele\",\"hdbvqvwzkjop\"],\"warnings\":[\"onrlkwzdqybxceak\",\"cptsoqfyiase\",\"chkrttzr\",\"zisgykiuemvanb\"],\"errors\":[\"hmnr\"]},\"id\":\"xbsojkli\",\"name\":\"hmdp\",\"type\":\"ysprq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptExecution response = - manager - .scriptExecutions() - .getWithResponse("ssffxuifmc", "ypobkdqzr", "zsylollgt", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zydmxzjijpvuaurk", response.scriptCmdletId()); - Assertions.assertEquals("irldefxr", response.parameters().get(0).name()); - Assertions.assertEquals("xnbkkj", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("ypxrx", response.failureReason()); - Assertions.assertEquals("bfihw", response.timeout()); - Assertions.assertEquals("vctafsrb", response.retention()); - Assertions.assertEquals("hspnxwqagnepz", response.output().get(0)); + String responseStr + = "{\"properties\":{\"scriptCmdletId\":\"wxeiqbpsmgomg\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ljdlrgmspl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gaufcs\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hvn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"wgnxkympqanxrj\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"tw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"taoypnyghshxc\"}],\"failureReason\":\"hkgmnsg\",\"timeout\":\"pxycphdr\",\"retention\":\"jkhvyomacluzvxnq\",\"submittedAt\":\"2021-05-26T18:55:49Z\",\"startedAt\":\"2021-08-18T08:28:39Z\",\"finishedAt\":\"2021-05-17T11:48:53Z\",\"provisioningState\":\"Pending\",\"output\":[\"oi\"],\"namedOutputs\":{\"ypobkdqzr\":\"datassffxuifmc\"},\"information\":[\"ylollgtrczzydmxz\",\"ijpvuaurkihc\",\"rldefxrdcox\"],\"warnings\":[\"kjanur\",\"nqbnqb\",\"izxqltgrd\",\"gypxrxvbfihwuhvc\"],\"errors\":[\"s\"]},\"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)); + + ScriptExecution response = manager.scriptExecutions() + .getWithResponse("wtoaukhfk", "cisiz", "oaedsxjwuivedwcg", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("wxeiqbpsmgomg", response.scriptCmdletId()); + Assertions.assertEquals("ljdlrgmspl", response.parameters().get(0).name()); + Assertions.assertEquals("tw", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("hkgmnsg", response.failureReason()); + Assertions.assertEquals("pxycphdr", response.timeout()); + Assertions.assertEquals("jkhvyomacluzvxnq", response.retention()); + Assertions.assertEquals("oi", 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 index c9d390ac9d152..3474050e700ba 100644 --- 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 @@ -1,74 +1,45 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.ScriptExecution; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ScriptExecutionsListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"ifoxxkubvphav\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"brbqgvgovp\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"tefjoknssqyzq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"dikdfrdbi\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mrjgeihfqlggwfi\"}],\"failureReason\":\"cxmjpbyephmg\",\"timeout\":\"vljvrc\",\"retention\":\"fqip\",\"submittedAt\":\"2020-12-22T02:20:11Z\",\"startedAt\":\"2021-09-18T18:40:03Z\",\"finishedAt\":\"2021-04-01T06:59Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"abvn\",\"ilee\"],\"namedOutputs\":{\"aukhfkvcisiz\":\"datawlpaugmrmfjlrxwt\",\"eewxeiqbpsmg\":\"dataoaedsxjwuivedwcg\",\"dlrgms\":\"datamguaml\"},\"information\":[\"gaufcs\",\"hvn\",\"wgnxkympqanxrj\"],\"warnings\":[\"tw\",\"taoypnyghshxc\"],\"errors\":[\"kgmnsghpxyc\",\"hdrwjjkh\"]},\"id\":\"yomacluzvxnqm\",\"name\":\"rpqpd\",\"type\":\"wmkoisq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.scriptExecutions().list("ufypiv", "sbbjpmcu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ifoxxkubvphav", response.iterator().next().scriptCmdletId()); - Assertions.assertEquals("brbqgvgovp", response.iterator().next().parameters().get(0).name()); - Assertions.assertEquals("tefjoknssqyzq", response.iterator().next().hiddenParameters().get(0).name()); - Assertions.assertEquals("cxmjpbyephmg", response.iterator().next().failureReason()); - Assertions.assertEquals("vljvrc", response.iterator().next().timeout()); - Assertions.assertEquals("fqip", response.iterator().next().retention()); - Assertions.assertEquals("abvn", response.iterator().next().output().get(0)); + String responseStr + = "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"hxepmrutzna\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"bnslujdjltym\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"guihywar\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"spphk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xkykxdssjp\"}],\"failureReason\":\"mucfxhikkf\",\"timeout\":\"rmymyincqlhr\",\"retention\":\"wslmiiiovgqcg\",\"submittedAt\":\"2021-03-09T10:20:04Z\",\"startedAt\":\"2021-07-06T10:58:26Z\",\"finishedAt\":\"2021-03-05T05:58:38Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"owlxte\",\"dptjgwdtgukranb\",\"wphqlkccuzgygqw\"],\"namedOutputs\":{\"gniiprglvaw\":\"dataiul\",\"pmcubkmifoxxkub\":\"datawzdufypivlsbb\",\"gvgovpbbttefjo\":\"dataphavpmhbrb\"},\"information\":[\"sqyzqedikdfr\",\"biqmrjgei\",\"fqlggw\"],\"warnings\":[\"zcxmjpbyep\",\"mgtvlj\",\"rc\",\"yfqi\"],\"errors\":[\"hnp\",\"myqwcab\"]},\"id\":\"ui\",\"name\":\"eeyaswl\",\"type\":\"augmrmfjlr\"}]}"; + + 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("sxze", "paxwkufyk", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hxepmrutzna", response.iterator().next().scriptCmdletId()); + Assertions.assertEquals("bnslujdjltym", response.iterator().next().parameters().get(0).name()); + Assertions.assertEquals("guihywar", response.iterator().next().hiddenParameters().get(0).name()); + Assertions.assertEquals("mucfxhikkf", response.iterator().next().failureReason()); + Assertions.assertEquals("rmymyincqlhr", response.iterator().next().timeout()); + Assertions.assertEquals("wslmiiiovgqcg", response.iterator().next().retention()); + Assertions.assertEquals("owlxte", response.iterator().next().output().get(0)); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java deleted file mode 100644 index 7887ac46d7651..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptExecutionsList; - -public final class ScriptExecutionsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptExecutionsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"nmwcpmgu\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"raufactkahzova\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"j\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"iuxxpshneekulfg\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ubkwdle\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rds\"}],\"failureReason\":\"ujbazpjuohminyfl\",\"timeout\":\"orwmduvwpklv\",\"retention\":\"mygdxpgpqch\",\"submittedAt\":\"2021-12-04T12:22:10Z\",\"startedAt\":\"2021-05-26T11:43:30Z\",\"finishedAt\":\"2021-04-10T21:01:23Z\",\"provisioningState\":\"Deleting\",\"output\":[\"xgibbda\",\"confozauors\"],\"namedOutputs\":{\"pzlrphw\":\"datakwbqplhlvnuu\",\"nnrwrbiork\":\"datasoldweyuqdunv\"},\"information\":[\"ywjhhgdnhx\",\"sivfomilo\"],\"warnings\":[\"dufiq\",\"dieuzaofj\"],\"errors\":[\"cyyysfgdot\"]},\"id\":\"ubiipuipwoqonma\",\"name\":\"jeknizshq\",\"type\":\"cimpevfg\"},{\"properties\":{\"scriptCmdletId\":\"rrilbywdxsmic\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"wfscjfn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"nszqujiz\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"voqyt\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"byowbblgyavutp\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"oxoismsksbpim\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qolj\"}],\"failureReason\":\"cgxxlxs\",\"timeout\":\"fgcviz\",\"retention\":\"dwl\",\"submittedAt\":\"2021-04-04T23:05:36Z\",\"startedAt\":\"2021-03-22T22:39:30Z\",\"finishedAt\":\"2021-10-25T23:33:10Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"k\",\"ubdyhgk\",\"minsgowzf\",\"tsttktlahbq\"],\"namedOutputs\":{\"x\":\"dataxtgzukxitmmqtgqq\"},\"information\":[\"xrxc\"],\"warnings\":[\"isavok\",\"dzf\"],\"errors\":[\"ivjlfrqttbajlka\"]},\"id\":\"nwxyiop\",\"name\":\"dkqqfkuvscxkd\",\"type\":\"ligovibrxkpm\"},{\"properties\":{\"scriptCmdletId\":\"zuruocbgo\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"te\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ybfhjxa\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jgslordilmyww\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"kgkxn\"}],\"failureReason\":\"dabg\",\"timeout\":\"vudtjuewbcihx\",\"retention\":\"whcjyxcc\",\"submittedAt\":\"2021-08-23T00:43:43Z\",\"startedAt\":\"2020-12-23T12:08:57Z\",\"finishedAt\":\"2021-09-20T03:02:08Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"zp\",\"gwjplmag\",\"tcyohpfkyrk\"],\"namedOutputs\":{\"aiy\":\"datagiogsjkmnwqjno\"},\"information\":[\"viacegfnmntfpmv\"],\"warnings\":[\"fnczdwvvbalx\",\"l\"],\"errors\":[\"podbzevwrdnh\",\"ukuv\"]},\"id\":\"jcswsmys\",\"name\":\"uluqypfc\",\"type\":\"lerchpq\"}],\"nextLink\":\"f\"}") - .toObject(ScriptExecutionsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionsList model = new ScriptExecutionsList(); - model = BinaryData.fromObject(model).toObject(ScriptExecutionsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java index c52d80e883562..ac88ecd563181 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,16 +10,8 @@ public final class ScriptPackageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptPackageInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"hfssnrb\",\"version\":\"efr\",\"company\":\"sgaojfmwncot\",\"uri\":\"fhir\"},\"id\":\"tymoxoftp\",\"name\":\"piwyczuhxacpqjl\",\"type\":\"h\"}") - .toObject(ScriptPackageInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptPackageInner model = new ScriptPackageInner(); - model = BinaryData.fromObject(model).toObject(ScriptPackageInner.class); + ScriptPackageInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"khtj\",\"version\":\"i\",\"company\":\"wfqatmtd\",\"uri\":\"mdvy\"},\"id\":\"ikdgszywkbir\",\"name\":\"yuzhlhkjoqrvq\",\"type\":\"aatjinrvgoupmfi\"}") + .toObject(ScriptPackageInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageListResultTests.java new file mode 100644 index 0000000000000..efdc95b0757f6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.ScriptPackageListResult; +import org.junit.jupiter.api.Assertions; + +public final class ScriptPackageListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScriptPackageListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"hmzk\",\"version\":\"jgwwspughftq\",\"company\":\"hqxujxukndxdi\",\"uri\":\"jguufzdm\"},\"id\":\"qtfihwhbotzinga\",\"name\":\"vppho\",\"type\":\"zqzudph\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"kfwynw\",\"version\":\"tbvkayhmtnvyq\",\"company\":\"tkzwpcnpwzc\",\"uri\":\"esgvvsccyaj\"},\"id\":\"qfhwyg\",\"name\":\"lvdnkfx\",\"type\":\"semdwzrmu\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"qdpsqxqvpsvu\",\"version\":\"mgccelvezrypq\",\"company\":\"feo\",\"uri\":\"rqwky\"},\"id\":\"ob\",\"name\":\"pg\",\"type\":\"edkowepbqpcrfk\"}],\"nextLink\":\"ccsnjvcdwxlpq\"}") + .toObject(ScriptPackageListResult.class); + Assertions.assertEquals("ccsnjvcdwxlpq", model.nextLink()); + } +} 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 index fc61eaa167611..774954182e505 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,16 +10,8 @@ public final class ScriptPackagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptPackageProperties model = - BinaryData - .fromString( - "{\"description\":\"usps\",\"version\":\"sdvlmfwdgzxulucv\",\"company\":\"mrsreuzvxurisjnh\",\"uri\":\"txifqj\"}") - .toObject(ScriptPackageProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptPackageProperties model = new ScriptPackageProperties(); - model = BinaryData.fromObject(model).toObject(ScriptPackageProperties.class); + ScriptPackageProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Failed\",\"description\":\"gjio\",\"version\":\"vrwxkv\",\"company\":\"k\",\"uri\":\"lqwjygvjayvblm\"}") + .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 index e7a82f925d51a..6b549d633a151 100644 --- 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 @@ -1,67 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.ScriptPackage; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ScriptPackagesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"qjjyslurl\",\"version\":\"hhkvpedwqs\",\"company\":\"rhmpqvwwsk\",\"uri\":\"dcbrwimuvq\"},\"id\":\"osovyrrleaesin\",\"name\":\"qtljqobbpihehc\",\"type\":\"cy\"}"; - String responseStr = - "{\"properties\":{\"description\":\"tgjcsgguxheml\",\"version\":\"waeeczgfb\",\"company\":\"klelssxb\",\"uri\":\"c\"},\"id\":\"xzujksrlsm\",\"name\":\"esqplp\",\"type\":\"mjc\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + ScriptPackage response = manager.scriptPackages() + .getWithResponse("ua", "htomflrytswfp", "mdgycxn", com.azure.core.util.Context.NONE) + .getValue(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptPackage response = - manager - .scriptPackages() - .getWithResponse("ehnmnaoyankco", "qswankltytmhdr", "znnhd", com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java index 06a8e820b6601..10f77fa002ff7 100644 --- 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 @@ -1,65 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.ScriptPackage; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ScriptPackagesListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"afiqgeaarbgjekg\",\"version\":\"lbyulidwcwvmze\",\"company\":\"o\",\"uri\":\"hj\"},\"id\":\"wgdnqzbr\",\"name\":\"kspzhzmtksjcit\",\"type\":\"igsxcdgljplk\"}]}"; - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"kumuikjcjca\",\"version\":\"bwsnsqow\",\"company\":\"comlikytwvczc\",\"uri\":\"k\"},\"id\":\"cvejyfdvlvhbwrn\",\"name\":\"xt\",\"type\":\"ddpqt\"}]}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + PagedIterable response + = manager.scriptPackages().list("gydlhqv", "n", com.azure.core.util.Context.NONE); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.scriptPackages().list("gddeimaw", "o", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java deleted file mode 100644 index 7fc4e152c53fd..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptPackagesList; - -public final class ScriptPackagesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptPackagesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"ffovjzhpj\",\"version\":\"bgj\",\"company\":\"xumvfcluyovw\",\"uri\":\"bkfezzxscyhwzdgi\"},\"id\":\"ujb\",\"name\":\"bomvzzbtdcqv\",\"type\":\"niyujv\"}],\"nextLink\":\"l\"}") - .toObject(ScriptPackagesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptPackagesList model = new ScriptPackagesList(); - model = BinaryData.fromObject(model).toObject(ScriptPackagesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.java index bfa4f0861d51f..9272af3f9af7e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,18 +11,9 @@ public final class ScriptParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptParameter model = - BinaryData - .fromString( - "{\"type\":\"String\",\"name\":\"hmxtdr\",\"description\":\"utacoe\",\"visibility\":\"Visible\",\"optional\":\"Required\"}") - .toObject(ScriptParameter.class); - Assertions.assertEquals("hmxtdr", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptParameter model = new ScriptParameter().withName("hmxtdr"); - model = BinaryData.fromObject(model).toObject(ScriptParameter.class); - Assertions.assertEquals("hmxtdr", model.name()); + ScriptParameter model = BinaryData.fromString( + "{\"type\":\"Bool\",\"name\":\"kffovjzhpjbibgjm\",\"description\":\"umvfclu\",\"visibility\":\"Visible\",\"optional\":\"Required\"}") + .toObject(ScriptParameter.class); + Assertions.assertEquals("kffovjzhpjbibgjm", 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 index 316c87706f26e..12709eabe799e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,21 +11,19 @@ public final class ScriptSecureStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptSecureStringExecutionParameter model = - BinaryData - .fromString( - "{\"type\":\"SecureValue\",\"secureValue\":\"knlrariaawiuagy\",\"name\":\"wqfbylyrfgiagt\"}") + ScriptSecureStringExecutionParameter model + = BinaryData.fromString("{\"type\":\"SecureValue\",\"secureValue\":\"xonbzoggculapz\",\"name\":\"y\"}") .toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("wqfbylyrfgiagt", model.name()); - Assertions.assertEquals("knlrariaawiuagy", model.secureValue()); + Assertions.assertEquals("y", model.name()); + Assertions.assertEquals("xonbzoggculapz", model.secureValue()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptSecureStringExecutionParameter model = - new ScriptSecureStringExecutionParameter().withName("wqfbylyrfgiagt").withSecureValue("knlrariaawiuagy"); + ScriptSecureStringExecutionParameter model + = new ScriptSecureStringExecutionParameter().withName("y").withSecureValue("xonbzoggculapz"); model = BinaryData.fromObject(model).toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("wqfbylyrfgiagt", model.name()); - Assertions.assertEquals("knlrariaawiuagy", model.secureValue()); + Assertions.assertEquals("y", model.name()); + Assertions.assertEquals("xonbzoggculapz", 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 index 1368ec6b13086..f7cbf720f4872 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,20 +11,19 @@ public final class ScriptStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptStringExecutionParameter model = - BinaryData - .fromString("{\"type\":\"Value\",\"value\":\"jocqwogfnzjvusf\",\"name\":\"ld\"}") + ScriptStringExecutionParameter model + = BinaryData.fromString("{\"type\":\"Value\",\"value\":\"gogtqxepnylbf\",\"name\":\"ajlyjtlvofqzhv\"}") .toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("ld", model.name()); - Assertions.assertEquals("jocqwogfnzjvusf", model.value()); + Assertions.assertEquals("ajlyjtlvofqzhv", model.name()); + Assertions.assertEquals("gogtqxepnylbf", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptStringExecutionParameter model = - new ScriptStringExecutionParameter().withName("ld").withValue("jocqwogfnzjvusf"); + ScriptStringExecutionParameter model + = new ScriptStringExecutionParameter().withName("ajlyjtlvofqzhv").withValue("gogtqxepnylbf"); model = BinaryData.fromObject(model).toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("ld", model.name()); - Assertions.assertEquals("jocqwogfnzjvusf", model.value()); + Assertions.assertEquals("ajlyjtlvofqzhv", model.name()); + Assertions.assertEquals("gogtqxepnylbf", model.value()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ServiceSpecificationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ServiceSpecificationTests.java deleted file mode 100644 index cc8999c2ae897..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.LogSpecification; -import com.azure.resourcemanager.avs.models.MetricDimension; -import com.azure.resourcemanager.avs.models.MetricSpecification; -import com.azure.resourcemanager.avs.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = - BinaryData - .fromString( - "{\"logSpecifications\":[{\"name\":\"zzvypyqrimzinp\",\"displayName\":\"wjdk\",\"blobDuration\":\"soodqxhcrmnoh\"},{\"name\":\"ckwhds\",\"displayName\":\"fiyipjxsqwpgrj\",\"blobDuration\":\"norcjxvsnbyxqab\"},{\"name\":\"ocpcy\",\"displayName\":\"urzafb\",\"blobDuration\":\"j\"}],\"metricSpecifications\":[{\"name\":\"oq\",\"displayName\":\"mkljavb\",\"displayDescription\":\"dtqajzyulpkudj\",\"unit\":\"lkhbz\",\"category\":\"epgzgqexz\",\"aggregationType\":\"c\",\"supportedAggregationTypes\":[\"paierh\"],\"supportedTimeGrainTypes\":[\"sglumma\",\"tjaodxobnb\"],\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"okaj\",\"displayName\":\"npime\",\"internalName\":\"stxgc\",\"toBeExportedForShoebox\":false},{\"name\":\"maajrmvdjwzrlo\",\"displayName\":\"clwhijcoejctbz\",\"internalName\":\"s\",\"toBeExportedForShoebox\":false},{\"name\":\"bkbfkgukdkex\",\"displayName\":\"pofm\",\"internalName\":\"x\",\"toBeExportedForShoebox\":false}],\"enableRegionalMdmAccount\":\"gddtocj\",\"sourceMdmAccount\":\"hvpmoue\",\"sourceMdmNamespace\":\"dzxibqeojnxqbzvd\"},{\"name\":\"t\",\"displayName\":\"deicbtwnpzao\",\"displayDescription\":\"uhrhcffcyddgl\",\"unit\":\"t\",\"category\":\"qkwpyeicxmqc\",\"aggregationType\":\"q\",\"supportedAggregationTypes\":[\"hix\",\"igdtopbob\",\"og\",\"m\"],\"supportedTimeGrainTypes\":[\"a\"],\"fillGapWithZero\":true,\"dimensions\":[{\"name\":\"ayvvtpgvdf\",\"displayName\":\"otkftutqxlngx\",\"internalName\":\"fgugnxkrxdqmid\",\"toBeExportedForShoebox\":false},{\"name\":\"rvqdra\",\"displayName\":\"jybige\",\"internalName\":\"qfbow\",\"toBeExportedForShoebox\":true}],\"enableRegionalMdmAccount\":\"yktz\",\"sourceMdmAccount\":\"u\",\"sourceMdmNamespace\":\"wgqyw\"},{\"name\":\"drvyn\",\"displayName\":\"gpphrcgyn\",\"displayDescription\":\"cpecfvmmcoofs\",\"unit\":\"zevgb\",\"category\":\"jqabcypmivkwlzuv\",\"aggregationType\":\"fwnfnb\",\"supportedAggregationTypes\":[\"ionle\",\"x\"],\"supportedTimeGrainTypes\":[\"gtzxdpn\"],\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"rjfeallnwsubisnj\",\"displayName\":\"pmng\",\"internalName\":\"scxaq\",\"toBeExportedForShoebox\":true},{\"name\":\"hcbonqvpkvlr\",\"displayName\":\"jease\",\"internalName\":\"heoflokeyyienjbd\",\"toBeExportedForShoebox\":true},{\"name\":\"rhpdjpjumas\",\"displayName\":\"zj\",\"internalName\":\"yegu\",\"toBeExportedForShoebox\":false},{\"name\":\"xxhejjzzvd\",\"displayName\":\"gwdslfhotwm\",\"internalName\":\"npwlbjnpg\",\"toBeExportedForShoebox\":true}],\"enableRegionalMdmAccount\":\"adehxnltyfsopp\",\"sourceMdmAccount\":\"uesnzwdejbavo\",\"sourceMdmNamespace\":\"zdmohctbqvu\"},{\"name\":\"xdn\",\"displayName\":\"vo\",\"displayDescription\":\"ujjugwdkcglh\",\"unit\":\"azjdyggd\",\"category\":\"ixhbkuofqweykhm\",\"aggregationType\":\"evfyexfwhybcib\",\"supportedAggregationTypes\":[\"dcsi\",\"ynnaam\",\"ectehf\"],\"supportedTimeGrainTypes\":[\"cj\",\"ypvhezrkg\"],\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"fovgmkqsleyyvxy\",\"displayName\":\"pkc\",\"internalName\":\"tpngjcrcczsqpjh\",\"toBeExportedForShoebox\":false},{\"name\":\"jvnysounqe\",\"displayName\":\"noae\",\"internalName\":\"fhyhltrpmopjmcma\",\"toBeExportedForShoebox\":false},{\"name\":\"thfuiuaodsfcpkvx\",\"displayName\":\"puozmyzydag\",\"internalName\":\"axbezyiuo\",\"toBeExportedForShoebox\":true},{\"name\":\"hrdxwzywqsmbs\",\"displayName\":\"exim\",\"internalName\":\"yocf\",\"toBeExportedForShoebox\":false}],\"enableRegionalMdmAccount\":\"ymddys\",\"sourceMdmAccount\":\"i\",\"sourceMdmNamespace\":\"xhqyudxorrqnb\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("zzvypyqrimzinp", model.logSpecifications().get(0).name()); - Assertions.assertEquals("wjdk", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("soodqxhcrmnoh", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("oq", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("mkljavb", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("dtqajzyulpkudj", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("lkhbz", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("epgzgqexz", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("c", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("paierh", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("sglumma", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("okaj", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("npime", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("stxgc", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals(false, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("gddtocj", model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("hvpmoue", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("dzxibqeojnxqbzvd", model.metricSpecifications().get(0).sourceMdmNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("zzvypyqrimzinp") - .withDisplayName("wjdk") - .withBlobDuration("soodqxhcrmnoh"), - new LogSpecification() - .withName("ckwhds") - .withDisplayName("fiyipjxsqwpgrj") - .withBlobDuration("norcjxvsnbyxqab"), - new LogSpecification().withName("ocpcy").withDisplayName("urzafb").withBlobDuration("j"))) - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("oq") - .withDisplayName("mkljavb") - .withDisplayDescription("dtqajzyulpkudj") - .withUnit("lkhbz") - .withCategory("epgzgqexz") - .withAggregationType("c") - .withSupportedAggregationTypes(Arrays.asList("paierh")) - .withSupportedTimeGrainTypes(Arrays.asList("sglumma", "tjaodxobnb")) - .withFillGapWithZero(false) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("okaj") - .withDisplayName("npime") - .withInternalName("stxgc") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("maajrmvdjwzrlo") - .withDisplayName("clwhijcoejctbz") - .withInternalName("s") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("bkbfkgukdkex") - .withDisplayName("pofm") - .withInternalName("x") - .withToBeExportedForShoebox(false))) - .withEnableRegionalMdmAccount("gddtocj") - .withSourceMdmAccount("hvpmoue") - .withSourceMdmNamespace("dzxibqeojnxqbzvd"), - new MetricSpecification() - .withName("t") - .withDisplayName("deicbtwnpzao") - .withDisplayDescription("uhrhcffcyddgl") - .withUnit("t") - .withCategory("qkwpyeicxmqc") - .withAggregationType("q") - .withSupportedAggregationTypes(Arrays.asList("hix", "igdtopbob", "og", "m")) - .withSupportedTimeGrainTypes(Arrays.asList("a")) - .withFillGapWithZero(true) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("ayvvtpgvdf") - .withDisplayName("otkftutqxlngx") - .withInternalName("fgugnxkrxdqmid") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("rvqdra") - .withDisplayName("jybige") - .withInternalName("qfbow") - .withToBeExportedForShoebox(true))) - .withEnableRegionalMdmAccount("yktz") - .withSourceMdmAccount("u") - .withSourceMdmNamespace("wgqyw"), - new MetricSpecification() - .withName("drvyn") - .withDisplayName("gpphrcgyn") - .withDisplayDescription("cpecfvmmcoofs") - .withUnit("zevgb") - .withCategory("jqabcypmivkwlzuv") - .withAggregationType("fwnfnb") - .withSupportedAggregationTypes(Arrays.asList("ionle", "x")) - .withSupportedTimeGrainTypes(Arrays.asList("gtzxdpn")) - .withFillGapWithZero(false) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("rjfeallnwsubisnj") - .withDisplayName("pmng") - .withInternalName("scxaq") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("hcbonqvpkvlr") - .withDisplayName("jease") - .withInternalName("heoflokeyyienjbd") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("rhpdjpjumas") - .withDisplayName("zj") - .withInternalName("yegu") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("xxhejjzzvd") - .withDisplayName("gwdslfhotwm") - .withInternalName("npwlbjnpg") - .withToBeExportedForShoebox(true))) - .withEnableRegionalMdmAccount("adehxnltyfsopp") - .withSourceMdmAccount("uesnzwdejbavo") - .withSourceMdmNamespace("zdmohctbqvu"), - new MetricSpecification() - .withName("xdn") - .withDisplayName("vo") - .withDisplayDescription("ujjugwdkcglh") - .withUnit("azjdyggd") - .withCategory("ixhbkuofqweykhm") - .withAggregationType("evfyexfwhybcib") - .withSupportedAggregationTypes(Arrays.asList("dcsi", "ynnaam", "ectehf")) - .withSupportedTimeGrainTypes(Arrays.asList("cj", "ypvhezrkg")) - .withFillGapWithZero(false) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("fovgmkqsleyyvxy") - .withDisplayName("pkc") - .withInternalName("tpngjcrcczsqpjh") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("jvnysounqe") - .withDisplayName("noae") - .withInternalName("fhyhltrpmopjmcma") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("thfuiuaodsfcpkvx") - .withDisplayName("puozmyzydag") - .withInternalName("axbezyiuo") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("hrdxwzywqsmbs") - .withDisplayName("exim") - .withInternalName("yocf") - .withToBeExportedForShoebox(false))) - .withEnableRegionalMdmAccount("ymddys") - .withSourceMdmAccount("i") - .withSourceMdmNamespace("xhqyudxorrqnb"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("zzvypyqrimzinp", model.logSpecifications().get(0).name()); - Assertions.assertEquals("wjdk", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("soodqxhcrmnoh", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("oq", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("mkljavb", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("dtqajzyulpkudj", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("lkhbz", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("epgzgqexz", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("c", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("paierh", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("sglumma", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("okaj", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("npime", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("stxgc", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals(false, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("gddtocj", model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("hvpmoue", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("dzxibqeojnxqbzvd", model.metricSpecifications().get(0).sourceMdmNamespace()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SkuTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SkuTests.java index 01aed020e20b1..45186de8c387c 100644 --- 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 @@ -1,24 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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\":\"typmrbpizcdrqjsd\"}").toObject(Sku.class); - Assertions.assertEquals("typmrbpizcdrqjsd", model.name()); + Sku model = BinaryData.fromString( + "{\"name\":\"tijbpzvgnwzsymgl\",\"tier\":\"Premium\",\"size\":\"yzkohdbihanuf\",\"family\":\"cbjy\",\"capacity\":758913948}") + .toObject(Sku.class); + Assertions.assertEquals("tijbpzvgnwzsymgl", model.name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.tier()); + Assertions.assertEquals("yzkohdbihanuf", model.size()); + Assertions.assertEquals("cbjy", model.family()); + Assertions.assertEquals(758913948, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model = new Sku().withName("typmrbpizcdrqjsd"); + Sku model = new Sku().withName("tijbpzvgnwzsymgl") + .withTier(SkuTier.PREMIUM) + .withSize("yzkohdbihanuf") + .withFamily("cbjy") + .withCapacity(758913948); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("typmrbpizcdrqjsd", model.name()); + Assertions.assertEquals("tijbpzvgnwzsymgl", model.name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.tier()); + Assertions.assertEquals("yzkohdbihanuf", model.size()); + Assertions.assertEquals("cbjy", model.family()); + Assertions.assertEquals(758913948, 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 index 6e6ee4c3362de..46ff08d2a1d9b 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,15 +10,7 @@ public final class TrialInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TrialInner model = - BinaryData - .fromString("{\"status\":\"TrialAvailable\",\"availableHosts\":1342514759}") - .toObject(TrialInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrialInner model = new TrialInner(); - model = BinaryData.fromObject(model).toObject(TrialInner.class); + TrialInner model = BinaryData.fromString("{\"status\":\"TrialDisabled\",\"availableHosts\":1438180551}") + .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 index f9856ed6f15bc..7e48374e45668 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,16 +10,8 @@ public final class VirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"phvwauyqncygu\",\"moRefId\":\"vipmdscwxqupevzh\",\"folderPath\":\"totxhojujb\",\"restrictMovement\":\"Disabled\"},\"id\":\"lmcuvhixb\",\"name\":\"xyfwnylrcool\",\"type\":\"ttpkiwkkbnujrywv\"}") - .toObject(VirtualMachineInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInner model = new VirtualMachineInner(); - model = BinaryData.fromObject(model).toObject(VirtualMachineInner.class); + VirtualMachineInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"uslfead\",\"moRefId\":\"gq\",\"folderPath\":\"yhejhzisxgfp\",\"restrictMovement\":\"Disabled\"},\"id\":\"p\",\"name\":\"vk\",\"type\":\"r\"}") + .toObject(VirtualMachineInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineListResultTests.java new file mode 100644 index 0000000000000..eea2f3b83d062 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.VirtualMachineListResult; +import org.junit.jupiter.api.Assertions; + +public final class VirtualMachineListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VirtualMachineListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"witqscywuggwoluh\",\"moRefId\":\"bwemhairs\",\"folderPath\":\"gzd\",\"restrictMovement\":\"Enabled\"},\"id\":\"eypqwdxggicccn\",\"name\":\"qhuexm\",\"type\":\"ttlstvlzywemhz\"}],\"nextLink\":\"csdtclusiypbs\"}") + .toObject(VirtualMachineListResult.class); + Assertions.assertEquals("csdtclusiypbs", model.nextLink()); + } +} 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 index 0ec626792840c..3ddcb278d5ca7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,16 +10,8 @@ public final class VirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineProperties model = - BinaryData - .fromString( - "{\"displayName\":\"lbfpncurd\",\"moRefId\":\"wiithtywub\",\"folderPath\":\"bihwqknfdnt\",\"restrictMovement\":\"Disabled\"}") - .toObject(VirtualMachineProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineProperties model = new VirtualMachineProperties(); - model = BinaryData.fromObject(model).toObject(VirtualMachineProperties.class); + VirtualMachineProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"displayName\":\"jzraehtwdwrf\",\"moRefId\":\"wib\",\"folderPath\":\"cdl\",\"restrictMovement\":\"Disabled\"}") + .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 index 94e1077ae6668..38137b2b78ded 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,15 +12,15 @@ public final class VirtualMachineRestrictMovementTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineRestrictMovement model = - BinaryData.fromString("{\"restrictMovement\":\"Disabled\"}").toObject(VirtualMachineRestrictMovement.class); + VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Disabled\"}") + .toObject(VirtualMachineRestrictMovement.class); Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualMachineRestrictMovement model = - new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.DISABLED); + VirtualMachineRestrictMovement model + = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.DISABLED); model = BinaryData.fromObject(model).toObject(VirtualMachineRestrictMovement.class); Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java index 33208b5073184..47a6a25d7555e 100644 --- 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 @@ -1,67 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.VirtualMachine; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class VirtualMachinesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"ihiqakydiw\",\"moRefId\":\"rkwpzdqtvhcspod\",\"folderPath\":\"axsipietgb\",\"restrictMovement\":\"Disabled\"},\"id\":\"ulbmoichdlp\",\"name\":\"fpubntnbatz\",\"type\":\"iqsowsaaelc\"}"; - String responseStr = - "{\"properties\":{\"displayName\":\"mozusgzvlnsnnjz\",\"moRefId\":\"afolpymwamxqzrag\",\"folderPath\":\"dphtv\",\"restrictMovement\":\"Enabled\"},\"id\":\"a\",\"name\":\"vl\",\"type\":\"jchcsrlzknmzla\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + VirtualMachine response = manager.virtualMachines() + .getWithResponse("rryejylmbkzudnig", "fihotj", "wlpxuzzjg", "refqy", com.azure.core.util.Context.NONE) + .getValue(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualMachine response = - manager - .virtualMachines() - .getWithResponse("jafi", "lhguyn", "chl", "mltx", com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java index cb54ad355ac41..287ce3efc8c28 100644 --- 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 @@ -1,65 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.VirtualMachine; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class VirtualMachinesListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"hvtrrmhwrbfdpyf\",\"moRefId\":\"bhvjglr\",\"folderPath\":\"uyzlw\",\"restrictMovement\":\"Disabled\"},\"id\":\"mhoocl\",\"name\":\"tnpqmemczjk\",\"type\":\"mykyujxsglhs\"}]}"; - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"zolxrzvhqjwtr\",\"moRefId\":\"gv\",\"folderPath\":\"pcrrk\",\"restrictMovement\":\"Enabled\"},\"id\":\"w\",\"name\":\"mjsmwr\",\"type\":\"kcdxfzzzw\"}]}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + PagedIterable response + = manager.virtualMachines().list("lhikcyychunsj", "pjrtws", "hv", com.azure.core.util.Context.NONE); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.virtualMachines().list("ovvtzejetjkln", "ikyju", "k", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java deleted file mode 100644 index fef84378bd11d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.VirtualMachinesList; - -public final class VirtualMachinesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachinesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"wuenvr\",\"moRefId\":\"yo\",\"folderPath\":\"ibreb\",\"restrictMovement\":\"Disabled\"},\"id\":\"ysjkixqtnqttez\",\"name\":\"wfff\",\"type\":\"akpjpqqmtedlt\"}],\"nextLink\":\"jihy\"}") - .toObject(VirtualMachinesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachinesList model = new VirtualMachinesList(); - model = BinaryData.fromObject(model).toObject(VirtualMachinesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.java index 4edc668ea01f3..8877a3837c95d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -16,37 +16,34 @@ public final class VmHostPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VmHostPlacementPolicyProperties model = - BinaryData - .fromString( - "{\"type\":\"VmHost\",\"vmMembers\":[\"ffukiscvw\"],\"hostMembers\":[\"hwplefaxvx\",\"l\",\"btgn\",\"nzeyqxtjj\"],\"affinityType\":\"Affinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"vodggxdbee\",\"provisioningState\":\"Building\"}") - .toObject(VmHostPlacementPolicyProperties.class); + VmHostPlacementPolicyProperties model = BinaryData.fromString( + "{\"type\":\"VmHost\",\"vmMembers\":[\"smwutwbdsrezpd\"],\"hostMembers\":[\"neuyow\",\"kdw\",\"t\"],\"affinityType\":\"AntiAffinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"ikpzimejza\",\"provisioningState\":\"Failed\"}") + .toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("vodggxdbee", model.displayName()); - Assertions.assertEquals("ffukiscvw", model.vmMembers().get(0)); - Assertions.assertEquals("hwplefaxvx", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); + Assertions.assertEquals("ikpzimejza", model.displayName()); + Assertions.assertEquals("smwutwbdsrezpd", model.vmMembers().get(0)); + Assertions.assertEquals("neuyow", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmHostPlacementPolicyProperties model = - new VmHostPlacementPolicyProperties() - .withState(PlacementPolicyState.DISABLED) - .withDisplayName("vodggxdbee") - .withVmMembers(Arrays.asList("ffukiscvw")) - .withHostMembers(Arrays.asList("hwplefaxvx", "l", "btgn", "nzeyqxtjj")) - .withAffinityType(AffinityType.AFFINITY) + VmHostPlacementPolicyProperties model + = new VmHostPlacementPolicyProperties().withState(PlacementPolicyState.DISABLED) + .withDisplayName("ikpzimejza") + .withVmMembers(Arrays.asList("smwutwbdsrezpd")) + .withHostMembers(Arrays.asList("neuyow", "kdw", "t")) + .withAffinityType(AffinityType.ANTI_AFFINITY) .withAffinityStrength(AffinityStrength.SHOULD) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("vodggxdbee", model.displayName()); - Assertions.assertEquals("ffukiscvw", model.vmMembers().get(0)); - Assertions.assertEquals("hwplefaxvx", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); + Assertions.assertEquals("ikpzimejza", model.displayName()); + Assertions.assertEquals("smwutwbdsrezpd", model.vmMembers().get(0)); + Assertions.assertEquals("neuyow", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java index 2c671318e23b5..ec774707adc47 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -14,29 +14,25 @@ public final class VmPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VmPlacementPolicyProperties model = - BinaryData - .fromString( - "{\"type\":\"VmVm\",\"vmMembers\":[\"xg\",\"moy\",\"cdyuibhmfdnbzyd\",\"f\"],\"affinityType\":\"AntiAffinity\",\"state\":\"Enabled\",\"displayName\":\"aeoisrvh\",\"provisioningState\":\"Succeeded\"}") - .toObject(VmPlacementPolicyProperties.class); + VmPlacementPolicyProperties model = BinaryData.fromString( + "{\"type\":\"VmVm\",\"vmMembers\":[\"fp\",\"vm\"],\"affinityType\":\"AntiAffinity\",\"state\":\"Enabled\",\"displayName\":\"ltha\",\"provisioningState\":\"Building\"}") + .toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("aeoisrvh", model.displayName()); - Assertions.assertEquals("xg", model.vmMembers().get(0)); + Assertions.assertEquals("ltha", model.displayName()); + Assertions.assertEquals("fp", model.vmMembers().get(0)); Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VmPlacementPolicyProperties model = - new VmPlacementPolicyProperties() - .withState(PlacementPolicyState.ENABLED) - .withDisplayName("aeoisrvh") - .withVmMembers(Arrays.asList("xg", "moy", "cdyuibhmfdnbzyd", "f")) - .withAffinityType(AffinityType.ANTI_AFFINITY); + VmPlacementPolicyProperties model = new VmPlacementPolicyProperties().withState(PlacementPolicyState.ENABLED) + .withDisplayName("ltha") + .withVmMembers(Arrays.asList("fp", "vm")) + .withAffinityType(AffinityType.ANTI_AFFINITY); model = BinaryData.fromObject(model).toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("aeoisrvh", model.displayName()); - Assertions.assertEquals("xg", model.vmMembers().get(0)); + Assertions.assertEquals("ltha", model.displayName()); + Assertions.assertEquals("fp", 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/WorkloadNetworkDhcpConfigurationsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java new file mode 100644 index 0000000000000..efc7872d93674 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDhcpConfigurationsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ivmxyasfl\",\"segments\":[\"gzwywak\",\"ihknsmjbl\",\"ljhlnymzotq\",\"ryuzcbmqqv\"],\"provisioningState\":\"Succeeded\",\"revision\":2672748922256801426},\"id\":\"ayxonsupeujl\",\"name\":\"qnhcvsqltnzoibg\",\"type\":\"xgnxfyqonmpqoxwd\"}"; + + 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.workloadNetworkDhcpConfigurations() + .define("ickpz") + .withExistingPrivateCloud("aglkafhon", "juj") + .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("opmx").withRevision(1149822936606293846L)) + .create(); + + Assertions.assertEquals("ivmxyasfl", response.properties().displayName()); + Assertions.assertEquals(2672748922256801426L, response.properties().revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java new file mode 100644 index 0000000000000..d6e7b8631107a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDhcpConfigurationsDeleteMockTests { + @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.workloadNetworkDhcpConfigurations() + .delete("lxecwcrojphslh", "awjutifd", "fmvigorqjbttzh", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java new file mode 100644 index 0000000000000..c20d26c4ff37b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"glcfhmlrqryxyn\",\"segments\":[\"rd\",\"sovwxznptgoeiyb\",\"abpfhvfs\",\"kvntjlrigjkskyri\"],\"provisioningState\":\"Succeeded\",\"revision\":6697301089417631797},\"id\":\"xwaabzmifrygznmm\",\"name\":\"xrizkzobgop\",\"type\":\"lhslnelxieixyn\"}"; + + 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.workloadNetworkDhcpConfigurations() + .getWithResponse("sf", "svtui", "zh", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("glcfhmlrqryxyn", response.properties().displayName()); + Assertions.assertEquals(6697301089417631797L, response.properties().revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTests.java new file mode 100644 index 0000000000000..a3f98ada655f5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTests { + @Test + public void testListByWorkloadNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"xa\",\"segments\":[\"yaipidsda\"],\"provisioningState\":\"Updating\",\"revision\":7630151299469052576},\"id\":\"um\",\"name\":\"qwazlnqnmcjngzq\",\"type\":\"qxtbjwgnyf\"}]}"; + + 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.workloadNetworkDhcpConfigurations() + .listByWorkloadNetwork("qwpwyawbzasqbuc", "jg", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("xa", response.iterator().next().properties().displayName()); + Assertions.assertEquals(7630151299469052576L, response.iterator().next().properties().revision()); + } +} 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 index 76e320b52fbbb..c1b5859b01dc1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,21 +11,19 @@ public final class WorkloadNetworkDhcpEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkDhcpEntity model = - BinaryData - .fromString( - "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ph\",\"segments\":[\"l\",\"jrvxaglrv\"],\"provisioningState\":\"Building\",\"revision\":6059783226180243872}") - .toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("ph", model.displayName()); - Assertions.assertEquals(6059783226180243872L, model.revision()); + WorkloadNetworkDhcpEntity model = BinaryData.fromString( + "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"hjkbegibtnmxieb\",\"segments\":[\"loayqcgw\",\"tzjuzgwyzmhtxo\",\"gmtsavjcbpwxqpsr\",\"nftguvriuhpr\"],\"provisioningState\":\"Deleting\",\"revision\":8091606100814503434}") + .toObject(WorkloadNetworkDhcpEntity.class); + Assertions.assertEquals("hjkbegibtnmxieb", model.displayName()); + Assertions.assertEquals(8091606100814503434L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpEntity model = - new WorkloadNetworkDhcpEntity().withDisplayName("ph").withRevision(6059783226180243872L); + WorkloadNetworkDhcpEntity model + = new WorkloadNetworkDhcpEntity().withDisplayName("hjkbegibtnmxieb").withRevision(8091606100814503434L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("ph", model.displayName()); - Assertions.assertEquals(6059783226180243872L, model.revision()); + Assertions.assertEquals("hjkbegibtnmxieb", model.displayName()); + Assertions.assertEquals(8091606100814503434L, 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 index 85f027b648e83..6d77282ed74f4 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,23 +12,19 @@ public final class WorkloadNetworkDhcpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkDhcpInner model = - BinaryData - .fromString( - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"jhfjxwm\",\"segments\":[\"kfoqreyfkzikfj\",\"wneaiv\"],\"provisioningState\":\"Building\",\"revision\":8376736309034828237},\"id\":\"pcirelsfeaen\",\"name\":\"abfatkl\",\"type\":\"dxbjhwuaanozj\"}") - .toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("jhfjxwm", model.properties().displayName()); - Assertions.assertEquals(8376736309034828237L, model.properties().revision()); + WorkloadNetworkDhcpInner model = BinaryData.fromString( + "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"h\",\"segments\":[\"znbmpowuwprzq\"],\"provisioningState\":\"Updating\",\"revision\":6373733976515318396},\"id\":\"pjmkhfxobbc\",\"name\":\"wsrtjriplrbpbe\",\"type\":\"tghfgblcgwxzvl\"}") + .toObject(WorkloadNetworkDhcpInner.class); + Assertions.assertEquals("h", model.properties().displayName()); + Assertions.assertEquals(6373733976515318396L, model.properties().revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpInner model = - new WorkloadNetworkDhcpInner() - .withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("jhfjxwm").withRevision(8376736309034828237L)); + WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner() + .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("h").withRevision(6373733976515318396L)); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("jhfjxwm", model.properties().displayName()); - Assertions.assertEquals(8376736309034828237L, model.properties().revision()); + Assertions.assertEquals("h", model.properties().displayName()); + Assertions.assertEquals(6373733976515318396L, model.properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListResultTests.java new file mode 100644 index 0000000000000..ad6dc91d135c0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpListResult; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkDhcpListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkDhcpListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"rts\",\"segments\":[\"pkdeemaofmxagkvt\",\"elmqk\"],\"provisioningState\":\"Failed\",\"revision\":4758332856472261291},\"id\":\"uahaquhcdhmd\",\"name\":\"alaexqpvfadmwsrc\",\"type\":\"gvxp\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"mzlfmisgwb\",\"segments\":[\"e\",\"dawkzbali\",\"urqhaka\",\"hashsfwxosow\"],\"provisioningState\":\"Updating\",\"revision\":2516732809766062265},\"id\":\"jooxdjebw\",\"name\":\"ucww\",\"type\":\"vo\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"meue\",\"segments\":[\"yhz\",\"euojgjrwju\",\"iotwmcdytdxwit\",\"nrjawgqwg\"],\"provisioningState\":\"Updating\",\"revision\":5815100244885765209},\"id\":\"fbkp\",\"name\":\"cg\",\"type\":\"lwn\"}],\"nextLink\":\"hjdauwhvylwz\"}") + .toObject(WorkloadNetworkDhcpListResult.class); + Assertions.assertEquals("rts", model.value().get(0).properties().displayName()); + Assertions.assertEquals(4758332856472261291L, model.value().get(0).properties().revision()); + Assertions.assertEquals("hjdauwhvylwz", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java deleted file mode 100644 index c7d1d97d6f929..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpList; - -public final class WorkloadNetworkDhcpListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDhcpList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"gjltdtbnnhado\",\"segments\":[\"kvci\",\"hnvpamqgxq\",\"u\"],\"provisioningState\":\"Canceled\",\"revision\":5551509476153562500},\"id\":\"ggxkallatmelwuip\",\"name\":\"ccjzkzivgvv\",\"type\":\"nayrhyrnxxmueedn\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"v\",\"segments\":[\"wq\",\"tchealmf\",\"tdaaygdvwvg\"],\"provisioningState\":\"Updating\",\"revision\":492065479137109444},\"id\":\"xrtfudxep\",\"name\":\"gyqagvrvmnpkuk\",\"type\":\"himdbl\"}],\"nextLink\":\"wi\"}") - .toObject(WorkloadNetworkDhcpList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpList model = new WorkloadNetworkDhcpList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.java index 43721f4e3aab6..c21f6c8fa8554 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,26 +12,22 @@ public final class WorkloadNetworkDhcpRelayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkDhcpRelay model = - BinaryData - .fromString( - "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"fffwafqroudaspav\"],\"displayName\":\"hrv\",\"segments\":[\"n\"],\"provisioningState\":\"Updating\",\"revision\":152087869378436778}") - .toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("hrv", model.displayName()); - Assertions.assertEquals(152087869378436778L, model.revision()); - Assertions.assertEquals("fffwafqroudaspav", model.serverAddresses().get(0)); + WorkloadNetworkDhcpRelay model = BinaryData.fromString( + "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"cjrvxdjzlmwlxkv\",\"gfhzovawjvzunlut\",\"nnprn\",\"i\"],\"displayName\":\"ilpjzuaejxdult\",\"segments\":[\"bbtdzumvee\",\"gpw\",\"zuhkfpbsjyof\"],\"provisioningState\":\"Building\",\"revision\":1294807089782778037}") + .toObject(WorkloadNetworkDhcpRelay.class); + Assertions.assertEquals("ilpjzuaejxdult", model.displayName()); + Assertions.assertEquals(1294807089782778037L, model.revision()); + Assertions.assertEquals("cjrvxdjzlmwlxkv", model.serverAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpRelay model = - new WorkloadNetworkDhcpRelay() - .withDisplayName("hrv") - .withRevision(152087869378436778L) - .withServerAddresses(Arrays.asList("fffwafqroudaspav")); + WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("ilpjzuaejxdult") + .withRevision(1294807089782778037L) + .withServerAddresses(Arrays.asList("cjrvxdjzlmwlxkv", "gfhzovawjvzunlut", "nnprn", "i")); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("hrv", model.displayName()); - Assertions.assertEquals(152087869378436778L, model.revision()); - Assertions.assertEquals("fffwafqroudaspav", model.serverAddresses().get(0)); + Assertions.assertEquals("ilpjzuaejxdult", model.displayName()); + Assertions.assertEquals(1294807089782778037L, model.revision()); + Assertions.assertEquals("cjrvxdjzlmwlxkv", 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 index ca8a59530d497..5927824fdf33d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,29 +11,25 @@ public final class WorkloadNetworkDhcpServerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkDhcpServer model = - BinaryData - .fromString( - "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"py\",\"leaseTime\":3485711592453889453,\"displayName\":\"dcnifmz\",\"segments\":[\"ymbrnysuxmpraf\",\"g\"],\"provisioningState\":\"Updating\",\"revision\":8975968727108219865}") - .toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("dcnifmz", model.displayName()); - Assertions.assertEquals(8975968727108219865L, model.revision()); - Assertions.assertEquals("py", model.serverAddress()); - Assertions.assertEquals(3485711592453889453L, model.leaseTime()); + WorkloadNetworkDhcpServer model = BinaryData.fromString( + "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"tayriwwroyqbex\",\"leaseTime\":398335028,\"displayName\":\"ibycno\",\"segments\":[\"nmefqsgzvahapj\"],\"provisioningState\":\"Failed\",\"revision\":1752139018010177019}") + .toObject(WorkloadNetworkDhcpServer.class); + Assertions.assertEquals("ibycno", model.displayName()); + Assertions.assertEquals(1752139018010177019L, model.revision()); + Assertions.assertEquals("tayriwwroyqbex", model.serverAddress()); + Assertions.assertEquals(398335028, model.leaseTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpServer model = - new WorkloadNetworkDhcpServer() - .withDisplayName("dcnifmz") - .withRevision(8975968727108219865L) - .withServerAddress("py") - .withLeaseTime(3485711592453889453L); + WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("ibycno") + .withRevision(1752139018010177019L) + .withServerAddress("tayriwwroyqbex") + .withLeaseTime(398335028); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("dcnifmz", model.displayName()); - Assertions.assertEquals(8975968727108219865L, model.revision()); - Assertions.assertEquals("py", model.serverAddress()); - Assertions.assertEquals(3485711592453889453L, model.leaseTime()); + Assertions.assertEquals("ibycno", model.displayName()); + Assertions.assertEquals(1752139018010177019L, model.revision()); + Assertions.assertEquals("tayriwwroyqbex", model.serverAddress()); + Assertions.assertEquals(398335028, model.leaseTime()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpUpdateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpUpdateTests.java new file mode 100644 index 0000000000000..af77c18ce57dc --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpUpdateTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkDhcpUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkDhcpUpdate model = BinaryData.fromString( + "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"touwaboekqv\",\"segments\":[\"nsmvbxwyj\"],\"provisioningState\":\"Building\",\"revision\":100815762283495119}}") + .toObject(WorkloadNetworkDhcpUpdate.class); + Assertions.assertEquals("touwaboekqv", model.properties().displayName()); + Assertions.assertEquals(100815762283495119L, model.properties().revision()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkloadNetworkDhcpUpdate model = new WorkloadNetworkDhcpUpdate().withProperties( + new WorkloadNetworkDhcpEntity().withDisplayName("touwaboekqv").withRevision(100815762283495119L)); + model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpUpdate.class); + Assertions.assertEquals("touwaboekqv", model.properties().displayName()); + Assertions.assertEquals(100815762283495119L, model.properties().revision()); + } +} 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 index a52c58350e20f..d75a9d6cbc0cc 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -13,35 +13,31 @@ public final class WorkloadNetworkDnsServiceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkDnsServiceInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"wpracstwitykhev\",\"dnsServiceIp\":\"cedcpnmdy\",\"defaultDnsZone\":\"nwzxltjcv\",\"fqdnZones\":[\"tiugcxnav\",\"wxqibyq\",\"nyowxwlmdjrkvfg\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":5624857824409587662},\"id\":\"cizsjqlhkrribdei\",\"name\":\"qipqkghvxndz\",\"type\":\"mkrefajpjorwkq\"}") - .toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("wpracstwitykhev", model.displayName()); - Assertions.assertEquals("cedcpnmdy", model.dnsServiceIp()); - Assertions.assertEquals("nwzxltjcv", model.defaultDnsZone()); - Assertions.assertEquals("tiugcxnav", model.fqdnZones().get(0)); + WorkloadNetworkDnsServiceInner model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"vvqfovljxyws\",\"dnsServiceIp\":\"syrsndsytgadgvra\",\"defaultDnsZone\":\"en\",\"fqdnZones\":[\"zar\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":4399358999277003826},\"id\":\"acewiipfpubjibw\",\"name\":\"iftohqkvpu\",\"type\":\"ksgplsa\"}") + .toObject(WorkloadNetworkDnsServiceInner.class); + Assertions.assertEquals("vvqfovljxyws", model.displayName()); + Assertions.assertEquals("syrsndsytgadgvra", model.dnsServiceIp()); + Assertions.assertEquals("en", model.defaultDnsZone()); + Assertions.assertEquals("zar", model.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(5624857824409587662L, model.revision()); + Assertions.assertEquals(4399358999277003826L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceInner model = - new WorkloadNetworkDnsServiceInner() - .withDisplayName("wpracstwitykhev") - .withDnsServiceIp("cedcpnmdy") - .withDefaultDnsZone("nwzxltjcv") - .withFqdnZones(Arrays.asList("tiugcxnav", "wxqibyq", "nyowxwlmdjrkvfg")) - .withLogLevel(DnsServiceLogLevelEnum.DEBUG) - .withRevision(5624857824409587662L); + WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("vvqfovljxyws") + .withDnsServiceIp("syrsndsytgadgvra") + .withDefaultDnsZone("en") + .withFqdnZones(Arrays.asList("zar")) + .withLogLevel(DnsServiceLogLevelEnum.DEBUG) + .withRevision(4399358999277003826L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("wpracstwitykhev", model.displayName()); - Assertions.assertEquals("cedcpnmdy", model.dnsServiceIp()); - Assertions.assertEquals("nwzxltjcv", model.defaultDnsZone()); - Assertions.assertEquals("tiugcxnav", model.fqdnZones().get(0)); + Assertions.assertEquals("vvqfovljxyws", model.displayName()); + Assertions.assertEquals("syrsndsytgadgvra", model.dnsServiceIp()); + Assertions.assertEquals("en", model.defaultDnsZone()); + Assertions.assertEquals("zar", model.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(5624857824409587662L, model.revision()); + Assertions.assertEquals(4399358999277003826L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceListResultTests.java new file mode 100644 index 0000000000000..649d74243256d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServiceListResult; +import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkDnsServiceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkDnsServiceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"displayName\":\"cpi\",\"dnsServiceIp\":\"pbtg\",\"defaultDnsZone\":\"bwoenwashrt\",\"fqdnZones\":[\"cnqxwbpokulpi\",\"jwaa\",\"ipqiiobyuqerpq\"],\"logLevel\":\"WARNING\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":8353822306247184184},\"id\":\"dbutauvfbtkuwhh\",\"name\":\"hykojoxafnndlpic\",\"type\":\"koymkcd\"}],\"nextLink\":\"bpkkpwdre\"}") + .toObject(WorkloadNetworkDnsServiceListResult.class); + Assertions.assertEquals("cpi", model.value().get(0).displayName()); + Assertions.assertEquals("pbtg", model.value().get(0).dnsServiceIp()); + Assertions.assertEquals("bwoenwashrt", model.value().get(0).defaultDnsZone()); + Assertions.assertEquals("cnqxwbpokulpi", model.value().get(0).fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.value().get(0).logLevel()); + Assertions.assertEquals(8353822306247184184L, model.value().get(0).revision()); + Assertions.assertEquals("bpkkpwdre", model.nextLink()); + } +} 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 index 1f4984235d63e..4ad62e576e23d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -13,35 +13,31 @@ public final class WorkloadNetworkDnsServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkDnsServiceProperties model = - BinaryData - .fromString( - "{\"displayName\":\"hgbijt\",\"dnsServiceIp\":\"vfxzsjab\",\"defaultDnsZone\":\"systawfsdjp\",\"fqdnZones\":[\"p\"],\"logLevel\":\"WARNING\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":1701030021377266817}") - .toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("hgbijt", model.displayName()); - Assertions.assertEquals("vfxzsjab", model.dnsServiceIp()); - Assertions.assertEquals("systawfsdjp", model.defaultDnsZone()); - Assertions.assertEquals("p", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(1701030021377266817L, model.revision()); + WorkloadNetworkDnsServiceProperties model = BinaryData.fromString( + "{\"displayName\":\"ynfs\",\"dnsServiceIp\":\"ljphuopxodl\",\"defaultDnsZone\":\"ynt\",\"fqdnZones\":[\"ihleos\",\"swsrms\",\"yzrpzbchckqqzq\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":335810871861495992}") + .toObject(WorkloadNetworkDnsServiceProperties.class); + Assertions.assertEquals("ynfs", model.displayName()); + Assertions.assertEquals("ljphuopxodl", model.dnsServiceIp()); + Assertions.assertEquals("ynt", model.defaultDnsZone()); + Assertions.assertEquals("ihleos", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); + Assertions.assertEquals(335810871861495992L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceProperties model = - new WorkloadNetworkDnsServiceProperties() - .withDisplayName("hgbijt") - .withDnsServiceIp("vfxzsjab") - .withDefaultDnsZone("systawfsdjp") - .withFqdnZones(Arrays.asList("p")) - .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(1701030021377266817L); + WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("ynfs") + .withDnsServiceIp("ljphuopxodl") + .withDefaultDnsZone("ynt") + .withFqdnZones(Arrays.asList("ihleos", "swsrms", "yzrpzbchckqqzq")) + .withLogLevel(DnsServiceLogLevelEnum.ERROR) + .withRevision(335810871861495992L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("hgbijt", model.displayName()); - Assertions.assertEquals("vfxzsjab", model.dnsServiceIp()); - Assertions.assertEquals("systawfsdjp", model.defaultDnsZone()); - Assertions.assertEquals("p", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(1701030021377266817L, model.revision()); + Assertions.assertEquals("ynfs", model.displayName()); + Assertions.assertEquals("ljphuopxodl", model.dnsServiceIp()); + Assertions.assertEquals("ynt", model.defaultDnsZone()); + Assertions.assertEquals("ihleos", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); + Assertions.assertEquals(335810871861495992L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceUpdateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceUpdateTests.java new file mode 100644 index 0000000000000..d1d2d74e394ca --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceUpdateTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkDnsServiceUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkDnsServiceUpdate model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"ked\",\"dnsServiceIp\":\"trwyhqmib\",\"defaultDnsZone\":\"hwit\",\"fqdnZones\":[\"pyy\",\"pcdpumnz\",\"mwzn\",\"abikns\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":47198303661040179}}") + .toObject(WorkloadNetworkDnsServiceUpdate.class); + Assertions.assertEquals("ked", model.displayName()); + Assertions.assertEquals("trwyhqmib", model.dnsServiceIp()); + Assertions.assertEquals("hwit", model.defaultDnsZone()); + Assertions.assertEquals("pyy", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); + Assertions.assertEquals(47198303661040179L, model.revision()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkloadNetworkDnsServiceUpdate model = new WorkloadNetworkDnsServiceUpdate().withDisplayName("ked") + .withDnsServiceIp("trwyhqmib") + .withDefaultDnsZone("hwit") + .withFqdnZones(Arrays.asList("pyy", "pcdpumnz", "mwzn", "abikns")) + .withLogLevel(DnsServiceLogLevelEnum.DEBUG) + .withRevision(47198303661040179L); + model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceUpdate.class); + Assertions.assertEquals("ked", model.displayName()); + Assertions.assertEquals("trwyhqmib", model.dnsServiceIp()); + Assertions.assertEquals("hwit", model.defaultDnsZone()); + Assertions.assertEquals("pyy", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); + Assertions.assertEquals(47198303661040179L, model.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java new file mode 100644 index 0000000000000..903486f050d26 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsServicesCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"lafcbahh\",\"dnsServiceIp\":\"pofoi\",\"defaultDnsZone\":\"w\",\"fqdnZones\":[\"lkmkkholvdndvi\",\"uogphuartvtiuky\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2106546841040847875},\"id\":\"xhk\",\"name\":\"jqirwrw\",\"type\":\"ooxf\"}"; + + 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.workloadNetworkDnsServices() + .define("cvclxynpdk") + .withExistingPrivateCloud("zcugswvxwlmzqw", "vtxnjmxmcuqud") + .withDisplayName("abuiy") + .withDnsServiceIp("buzphdugn") + .withDefaultDnsZone("knpgoxgjiuq") + .withFqdnZones(Arrays.asList("tozipqwj", "d", "urrxxgewpktv")) + .withLogLevel(DnsServiceLogLevelEnum.WARNING) + .withRevision(112541729358028808L) + .create(); + + Assertions.assertEquals("lafcbahh", response.displayName()); + Assertions.assertEquals("pofoi", response.dnsServiceIp()); + Assertions.assertEquals("w", response.defaultDnsZone()); + Assertions.assertEquals("lkmkkholvdndvi", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, response.logLevel()); + Assertions.assertEquals(2106546841040847875L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java new file mode 100644 index 0000000000000..882e51a096dfa --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsServicesDeleteMockTests { + @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.workloadNetworkDnsServices() + .delete("mmkjsvthnwpztek", "vmribiat", "gplucfotangcfhny", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java new file mode 100644 index 0000000000000..2b0c15e325c79 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsServicesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"lxxhljfp\",\"dnsServiceIp\":\"icrmnzh\",\"defaultDnsZone\":\"mqgjsxvpq\",\"fqdnZones\":[\"rmbodt\",\"s\",\"qgvriibakcla\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":8318985222878155880},\"id\":\"uzlwvsgmw\",\"name\":\"hqf\",\"type\":\"izvu\"}"; + + 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.workloadNetworkDnsServices() + .getWithResponse("vxcnqmxqps", "okmvkhlggd", "bemzqkzszuwi", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("lxxhljfp", response.displayName()); + Assertions.assertEquals("icrmnzh", response.dnsServiceIp()); + Assertions.assertEquals("mqgjsxvpq", response.defaultDnsZone()); + Assertions.assertEquals("rmbodt", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, response.logLevel()); + Assertions.assertEquals(8318985222878155880L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests.java new file mode 100644 index 0000000000000..d1d2e58085dde --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests { + @Test + public void testListByWorkloadNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"displayName\":\"qivbgkcvkh\",\"dnsServiceIp\":\"vuqd\",\"defaultDnsZone\":\"voniypfp\",\"fqdnZones\":[\"pzgpxtivhj\",\"nidibgqjxg\",\"n\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":2222279634211271133},\"id\":\"mhha\",\"name\":\"wjrmzvuporqzd\",\"type\":\"uydzvk\"}]}"; + + 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.workloadNetworkDnsServices() + .listByWorkloadNetwork("yxrxmunj", "xvglnkvxlxp", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qivbgkcvkh", response.iterator().next().displayName()); + Assertions.assertEquals("vuqd", response.iterator().next().dnsServiceIp()); + Assertions.assertEquals("voniypfp", response.iterator().next().defaultDnsZone()); + Assertions.assertEquals("pzgpxtivhj", response.iterator().next().fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.iterator().next().logLevel()); + Assertions.assertEquals(2222279634211271133L, response.iterator().next().revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java deleted file mode 100644 index 72ed2e874412a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServicesList; - -public final class WorkloadNetworkDnsServicesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsServicesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"msweypqwdxggicc\",\"dnsServiceIp\":\"xqhuexm\",\"defaultDnsZone\":\"tlstvlzywem\",\"fqdnZones\":[\"ncsdtclusiyp\",\"sfgytguslfead\",\"ygqukyhejh\"],\"logLevel\":\"FATAL\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":3624367237798775147},\"id\":\"lppvksrpq\",\"name\":\"ujzra\",\"type\":\"htwdwrftswibyrcd\"}],\"nextLink\":\"h\"}") - .toObject(WorkloadNetworkDnsServicesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsServicesList model = new WorkloadNetworkDnsServicesList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServicesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.java index 042367400bfd9..9d06e7514f5d1 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,35 +12,31 @@ public final class WorkloadNetworkDnsZoneInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkDnsZoneInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"gpikpzimejza\",\"domain\":[\"zxiavrm\",\"zonokixrjqci\",\"gzpfrla\"],\"dnsServerIps\":[\"rnwoiindfp\"],\"sourceIp\":\"jylwbtlhflsj\",\"dnsServices\":9210142067978159406,\"provisioningState\":\"Failed\",\"revision\":8719927850018337646},\"id\":\"bgofeljag\",\"name\":\"qmqhldvriii\",\"type\":\"jnalghf\"}") - .toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("gpikpzimejza", model.displayName()); - Assertions.assertEquals("zxiavrm", model.domain().get(0)); - Assertions.assertEquals("rnwoiindfp", model.dnsServerIps().get(0)); - Assertions.assertEquals("jylwbtlhflsj", model.sourceIp()); - Assertions.assertEquals(9210142067978159406L, model.dnsServices()); - Assertions.assertEquals(8719927850018337646L, model.revision()); + WorkloadNetworkDnsZoneInner model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"osphyoul\",\"domain\":[\"v\",\"ag\",\"rvimjwosytxitcsk\",\"cktqumiekkezzi\"],\"dnsServerIps\":[\"yf\"],\"sourceIp\":\"dgqggebdu\",\"dnsServices\":253317009,\"provisioningState\":\"Deleting\",\"revision\":2683403328100371700},\"id\":\"qfatpxllrxcyjm\",\"name\":\"a\",\"type\":\"su\"}") + .toObject(WorkloadNetworkDnsZoneInner.class); + Assertions.assertEquals("osphyoul", model.displayName()); + Assertions.assertEquals("v", model.domain().get(0)); + Assertions.assertEquals("yf", model.dnsServerIps().get(0)); + Assertions.assertEquals("dgqggebdu", model.sourceIp()); + Assertions.assertEquals(253317009, model.dnsServices()); + Assertions.assertEquals(2683403328100371700L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneInner model = - new WorkloadNetworkDnsZoneInner() - .withDisplayName("gpikpzimejza") - .withDomain(Arrays.asList("zxiavrm", "zonokixrjqci", "gzpfrla")) - .withDnsServerIps(Arrays.asList("rnwoiindfp")) - .withSourceIp("jylwbtlhflsj") - .withDnsServices(9210142067978159406L) - .withRevision(8719927850018337646L); + WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("osphyoul") + .withDomain(Arrays.asList("v", "ag", "rvimjwosytxitcsk", "cktqumiekkezzi")) + .withDnsServerIps(Arrays.asList("yf")) + .withSourceIp("dgqggebdu") + .withDnsServices(253317009) + .withRevision(2683403328100371700L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("gpikpzimejza", model.displayName()); - Assertions.assertEquals("zxiavrm", model.domain().get(0)); - Assertions.assertEquals("rnwoiindfp", model.dnsServerIps().get(0)); - Assertions.assertEquals("jylwbtlhflsj", model.sourceIp()); - Assertions.assertEquals(9210142067978159406L, model.dnsServices()); - Assertions.assertEquals(8719927850018337646L, model.revision()); + Assertions.assertEquals("osphyoul", model.displayName()); + Assertions.assertEquals("v", model.domain().get(0)); + Assertions.assertEquals("yf", model.dnsServerIps().get(0)); + Assertions.assertEquals("dgqggebdu", model.sourceIp()); + Assertions.assertEquals(253317009, model.dnsServices()); + Assertions.assertEquals(2683403328100371700L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneListResultTests.java new file mode 100644 index 0000000000000..82e7e92910f7a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZoneListResult; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkDnsZoneListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkDnsZoneListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"displayName\":\"rlkdmtncvokotl\",\"domain\":[\"yhgsy\"],\"dnsServerIps\":[\"gjltdtbnnhado\",\"crkvcikhnv\",\"amqgxqquezikyw\",\"gxk\"],\"sourceIp\":\"la\",\"dnsServices\":1870481937,\"provisioningState\":\"Updating\",\"revision\":4889606083827449989},\"id\":\"ccjzkzivgvv\",\"name\":\"nayrhyrnxxmueedn\",\"type\":\"rdvstkwqqtch\"},{\"properties\":{\"displayName\":\"mfmtdaaygdvw\",\"domain\":[\"iohgwxrtfud\",\"epxgyqagvr\",\"mnpkukghimdblxg\"],\"dnsServerIps\":[\"fnjhfjxwmszkkfo\",\"rey\"],\"sourceIp\":\"zi\",\"dnsServices\":2032728059,\"provisioningState\":\"Canceled\",\"revision\":1712568362003193345},\"id\":\"vxwc\",\"name\":\"elpcirelsfeaenwa\",\"type\":\"fatkld\"}],\"nextLink\":\"bjhwuaan\"}") + .toObject(WorkloadNetworkDnsZoneListResult.class); + Assertions.assertEquals("rlkdmtncvokotl", model.value().get(0).displayName()); + Assertions.assertEquals("yhgsy", model.value().get(0).domain().get(0)); + Assertions.assertEquals("gjltdtbnnhado", model.value().get(0).dnsServerIps().get(0)); + Assertions.assertEquals("la", model.value().get(0).sourceIp()); + Assertions.assertEquals(1870481937, model.value().get(0).dnsServices()); + Assertions.assertEquals(4889606083827449989L, model.value().get(0).revision()); + Assertions.assertEquals("bjhwuaan", model.nextLink()); + } +} 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 index 4e7c1896ea5cf..df885a5a7156c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,35 +12,31 @@ public final class WorkloadNetworkDnsZonePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = - BinaryData - .fromString( - "{\"displayName\":\"tvsexsowuel\",\"domain\":[\"hahhxvrhmzkwpj\",\"wws\",\"ughftqsx\",\"qxujxukndxd\"],\"dnsServerIps\":[\"jguufzdm\",\"yqtfihwh\",\"otzi\",\"gamv\"],\"sourceIp\":\"ho\",\"dnsServices\":7727848197027665557,\"provisioningState\":\"Updating\",\"revision\":8365308553932036978}") - .toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("tvsexsowuel", model.displayName()); - Assertions.assertEquals("hahhxvrhmzkwpj", model.domain().get(0)); - Assertions.assertEquals("jguufzdm", model.dnsServerIps().get(0)); - Assertions.assertEquals("ho", model.sourceIp()); - Assertions.assertEquals(7727848197027665557L, model.dnsServices()); - Assertions.assertEquals(8365308553932036978L, model.revision()); + WorkloadNetworkDnsZoneProperties model = BinaryData.fromString( + "{\"displayName\":\"r\",\"domain\":[\"dmjsjqb\",\"hhyxxrw\",\"yc\",\"duhpk\"],\"dnsServerIps\":[\"ymareqnajxqugj\",\"ky\"],\"sourceIp\":\"beddgssofw\",\"dnsServices\":1153520576,\"provisioningState\":\"Deleting\",\"revision\":7998631817770989072}") + .toObject(WorkloadNetworkDnsZoneProperties.class); + Assertions.assertEquals("r", model.displayName()); + Assertions.assertEquals("dmjsjqb", model.domain().get(0)); + Assertions.assertEquals("ymareqnajxqugj", model.dnsServerIps().get(0)); + Assertions.assertEquals("beddgssofw", model.sourceIp()); + Assertions.assertEquals(1153520576, model.dnsServices()); + Assertions.assertEquals(7998631817770989072L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = - new WorkloadNetworkDnsZoneProperties() - .withDisplayName("tvsexsowuel") - .withDomain(Arrays.asList("hahhxvrhmzkwpj", "wws", "ughftqsx", "qxujxukndxd")) - .withDnsServerIps(Arrays.asList("jguufzdm", "yqtfihwh", "otzi", "gamv")) - .withSourceIp("ho") - .withDnsServices(7727848197027665557L) - .withRevision(8365308553932036978L); + WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("r") + .withDomain(Arrays.asList("dmjsjqb", "hhyxxrw", "yc", "duhpk")) + .withDnsServerIps(Arrays.asList("ymareqnajxqugj", "ky")) + .withSourceIp("beddgssofw") + .withDnsServices(1153520576) + .withRevision(7998631817770989072L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("tvsexsowuel", model.displayName()); - Assertions.assertEquals("hahhxvrhmzkwpj", model.domain().get(0)); - Assertions.assertEquals("jguufzdm", model.dnsServerIps().get(0)); - Assertions.assertEquals("ho", model.sourceIp()); - Assertions.assertEquals(7727848197027665557L, model.dnsServices()); - Assertions.assertEquals(8365308553932036978L, model.revision()); + Assertions.assertEquals("r", model.displayName()); + Assertions.assertEquals("dmjsjqb", model.domain().get(0)); + Assertions.assertEquals("ymareqnajxqugj", model.dnsServerIps().get(0)); + Assertions.assertEquals("beddgssofw", model.sourceIp()); + Assertions.assertEquals(1153520576, model.dnsServices()); + Assertions.assertEquals(7998631817770989072L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneUpdateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneUpdateTests.java new file mode 100644 index 0000000000000..c5414bd3bf44b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneUpdateTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkDnsZoneUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkDnsZoneUpdate model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"jijpxac\",\"domain\":[\"dfnbyxbaaabjyv\",\"yffimrzrtuzqogs\",\"xnevfdnwn\"],\"dnsServerIps\":[\"wzsyyceuzs\",\"i\",\"judpfrxt\",\"thzvaytdwkqbrqu\"],\"sourceIp\":\"axhexiilivp\",\"dnsServices\":1539937555,\"provisioningState\":\"Deleting\",\"revision\":6198974522263993191}}") + .toObject(WorkloadNetworkDnsZoneUpdate.class); + Assertions.assertEquals("jijpxac", model.displayName()); + Assertions.assertEquals("dfnbyxbaaabjyv", model.domain().get(0)); + Assertions.assertEquals("wzsyyceuzs", model.dnsServerIps().get(0)); + Assertions.assertEquals("axhexiilivp", model.sourceIp()); + Assertions.assertEquals(1539937555, model.dnsServices()); + Assertions.assertEquals(6198974522263993191L, model.revision()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkloadNetworkDnsZoneUpdate model = new WorkloadNetworkDnsZoneUpdate().withDisplayName("jijpxac") + .withDomain(Arrays.asList("dfnbyxbaaabjyv", "yffimrzrtuzqogs", "xnevfdnwn")) + .withDnsServerIps(Arrays.asList("wzsyyceuzs", "i", "judpfrxt", "thzvaytdwkqbrqu")) + .withSourceIp("axhexiilivp") + .withDnsServices(1539937555) + .withRevision(6198974522263993191L); + model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneUpdate.class); + Assertions.assertEquals("jijpxac", model.displayName()); + Assertions.assertEquals("dfnbyxbaaabjyv", model.domain().get(0)); + Assertions.assertEquals("wzsyyceuzs", model.dnsServerIps().get(0)); + Assertions.assertEquals("axhexiilivp", model.sourceIp()); + Assertions.assertEquals(1539937555, model.dnsServices()); + Assertions.assertEquals(6198974522263993191L, model.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java new file mode 100644 index 0000000000000..1a2f3302aa3cd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsZonesCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"ilguooqjagmditg\",\"domain\":[\"ookjbsahrtdtpde\",\"qacsl\",\"otoebnfxofv\"],\"dnsServerIps\":[\"gdirazf\"],\"sourceIp\":\"ejwabmdujtmvco\",\"dnsServices\":2125473384,\"provisioningState\":\"Succeeded\",\"revision\":5623594261073250912},\"id\":\"u\",\"name\":\"hlkyqltqsrog\",\"type\":\"uwkffdjktsysid\"}"; + + 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.workloadNetworkDnsZones() + .define("o") + .withExistingPrivateCloud("dohzjq", "tu") + .withDisplayName("bxncnwfepbnw") + .withDomain(Arrays.asList("xjg")) + .withDnsServerIps(Arrays.asList("jbgdlfgtdysnaquf")) + .withSourceIp("bctqhamzjrwd") + .withDnsServices(605506053) + .withRevision(842034853108788587L) + .create(); + + Assertions.assertEquals("ilguooqjagmditg", response.displayName()); + Assertions.assertEquals("ookjbsahrtdtpde", response.domain().get(0)); + Assertions.assertEquals("gdirazf", response.dnsServerIps().get(0)); + Assertions.assertEquals("ejwabmdujtmvco", response.sourceIp()); + Assertions.assertEquals(2125473384, response.dnsServices()); + Assertions.assertEquals(5623594261073250912L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java new file mode 100644 index 0000000000000..2543a421a2669 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsZonesDeleteMockTests { + @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.workloadNetworkDnsZones() + .delete("cbuewmrswnjlxuz", "hwpusxj", "aqehg", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java new file mode 100644 index 0000000000000..034a4149e3f0f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsZonesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"zonwpngajinnixj\",\"domain\":[\"tmjfjmyccxlzhcox\",\"vnekhenlusfnrdtj\"],\"dnsServerIps\":[\"r\",\"cq\"],\"sourceIp\":\"vidttgepuslvyjt\",\"dnsServices\":1750462834,\"provisioningState\":\"Deleting\",\"revision\":784595038382816064},\"id\":\"iesfuug\",\"name\":\"tuqfecjxeygtu\",\"type\":\"xu\"}"; + + 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.workloadNetworkDnsZones() + .getWithResponse("rjvzuyt", "rmlmuowo", "bauiropi", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("zonwpngajinnixj", response.displayName()); + Assertions.assertEquals("tmjfjmyccxlzhcox", response.domain().get(0)); + Assertions.assertEquals("r", response.dnsServerIps().get(0)); + Assertions.assertEquals("vidttgepuslvyjt", response.sourceIp()); + Assertions.assertEquals(1750462834, response.dnsServices()); + Assertions.assertEquals(784595038382816064L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests.java new file mode 100644 index 0000000000000..d77080298c123 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests { + @Test + public void testListByWorkloadNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"displayName\":\"newmozqvb\",\"domain\":[\"ma\",\"hsycxhxzgaz\",\"taboidvmf\",\"hppubowsepdfgkmt\"],\"dnsServerIps\":[\"rngbtcjuahokqtob\",\"auxofshfph\",\"pnulaiywzej\",\"whslwkoj\"],\"sourceIp\":\"l\",\"dnsServices\":1259433506,\"provisioningState\":\"Failed\",\"revision\":5299549137810832231},\"id\":\"afgfugsnn\",\"name\":\"hyet\",\"type\":\"fypococtfjgti\"}]}"; + + 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.workloadNetworkDnsZones().listByWorkloadNetwork("i", "hx", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("newmozqvb", response.iterator().next().displayName()); + Assertions.assertEquals("ma", response.iterator().next().domain().get(0)); + Assertions.assertEquals("rngbtcjuahokqtob", response.iterator().next().dnsServerIps().get(0)); + Assertions.assertEquals("l", response.iterator().next().sourceIp()); + Assertions.assertEquals(1259433506, response.iterator().next().dnsServices()); + Assertions.assertEquals(5299549137810832231L, response.iterator().next().revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java deleted file mode 100644 index d3839a2353d65..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZonesList; - -public final class WorkloadNetworkDnsZonesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsZonesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"abudurgk\",\"domain\":[\"o\",\"zhjjklffhmouwq\",\"gzrf\"],\"dnsServerIps\":[\"yebizikayuh\",\"lbjbsyb\",\"qwrvtldgmfp\",\"vm\"],\"sourceIp\":\"paslthaqfxssmwu\",\"dnsServices\":5857300583432232826,\"provisioningState\":\"Updating\",\"revision\":8587897237189545303},\"id\":\"drhneuyow\",\"name\":\"kdw\",\"type\":\"t\"}],\"nextLink\":\"ib\"}") - .toObject(WorkloadNetworkDnsZonesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsZonesList model = new WorkloadNetworkDnsZonesList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZonesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.java index ba495306defb1..998a3a99afc6e 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,18 +11,9 @@ public final class WorkloadNetworkGatewayInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkGatewayInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"yxxrwlycoduh\",\"path\":\"xkgymareqnajxqu\"},\"id\":\"jhkycub\",\"name\":\"ddg\",\"type\":\"sofwqmzqalkrmnji\"}") - .toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("yxxrwlycoduh", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkGatewayInner model = new WorkloadNetworkGatewayInner().withDisplayName("yxxrwlycoduh"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("yxxrwlycoduh", model.displayName()); + WorkloadNetworkGatewayInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"ceopzfqrhhuaopp\",\"path\":\"qeqxo\"},\"id\":\"dahzxctobg\",\"name\":\"kdmoi\",\"type\":\"postmgrcfbunrm\"}") + .toObject(WorkloadNetworkGatewayInner.class); + Assertions.assertEquals("ceopzfqrhhuaopp", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListResultTests.java new file mode 100644 index 0000000000000..bc5bf0597cf27 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayListResult; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkGatewayListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkGatewayListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"ixisxyawjoy\",\"path\":\"cslyjpk\"},\"id\":\"dzyexznelixh\",\"name\":\"rzt\",\"type\":\"o\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"knalaulppg\",\"path\":\"tpnapnyiropuhpig\"},\"id\":\"gylgqgitxmedjvcs\",\"name\":\"ynqwwncwzzhxgk\",\"type\":\"rmgucnap\"}],\"nextLink\":\"eoellwptfdygp\"}") + .toObject(WorkloadNetworkGatewayListResult.class); + Assertions.assertEquals("ixisxyawjoy", model.value().get(0).displayName()); + Assertions.assertEquals("eoellwptfdygp", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java deleted file mode 100644 index 6fbbbdafa2d64..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGatewayList; - -public final class WorkloadNetworkGatewayListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkGatewayList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"tcs\",\"path\":\"cktqumiekkezzi\"},\"id\":\"hlyfjhdgqgg\",\"name\":\"bdunygaeqid\",\"type\":\"qfatpxllrxcyjm\"}],\"nextLink\":\"dsuvarmywdmjsjqb\"}") - .toObject(WorkloadNetworkGatewayList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkGatewayList model = new WorkloadNetworkGatewayList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkGatewayList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.java index 6db7c07b38150..023f04e0d34a7 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,17 +11,9 @@ public final class WorkloadNetworkGatewayPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkGatewayProperties model = - BinaryData - .fromString("{\"displayName\":\"xacqqudfnbyx\",\"path\":\"aabjyvayffimrz\"}") + WorkloadNetworkGatewayProperties model + = BinaryData.fromString("{\"provisioningState\":\"Deleting\",\"displayName\":\"hkxbpv\",\"path\":\"mjh\"}") .toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("xacqqudfnbyx", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkGatewayProperties model = new WorkloadNetworkGatewayProperties().withDisplayName("xacqqudfnbyx"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("xacqqudfnbyx", model.displayName()); + Assertions.assertEquals("hkxbpv", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java new file mode 100644 index 0000000000000..c5a19991d2001 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkGatewaysGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"of\",\"path\":\"vuhrylni\"},\"id\":\"rz\",\"name\":\"bzjedmstk\",\"type\":\"nlvxbcuii\"}"; + + 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.workloadNetworkGateways() + .getWithResponse("gbqi", "kxkbsazgakgacyr", "m", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("of", response.displayName()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkMockTests.java new file mode 100644 index 0000000000000..ddc035ffc7012 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkGatewaysListByWorkloadNetworkMockTests { + @Test + public void testListByWorkloadNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"qpofvwbc\",\"path\":\"embnkbw\"},\"id\":\"vxkdivqihebwtswb\",\"name\":\"uwfmduragegizvc\",\"type\":\"felisdjub\"}]}"; + + 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.workloadNetworkGateways() + .listByWorkloadNetwork("fdbxiqxeiiqbim", "tmwwi", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qpofvwbc", response.iterator().next().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 index df7396fca3bf4..012f68835bfe6 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -10,15 +10,8 @@ public final class WorkloadNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkInner model = - BinaryData - .fromString("{\"id\":\"wab\",\"name\":\"ets\",\"type\":\"hszhedplvwiwu\"}") - .toObject(WorkloadNetworkInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkInner model = new WorkloadNetworkInner(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkInner.class); + WorkloadNetworkInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"nehmpvecx\",\"name\":\"odebfqkkrbmpu\",\"type\":\"gr\"}") + .toObject(WorkloadNetworkInner.class); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListResultTests.java new file mode 100644 index 0000000000000..3d0ff3157008d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkListResult; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"xzpuzycisp\",\"name\":\"qzahmgkbrp\",\"type\":\"y\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"uqqkpik\",\"name\":\"drgvtqagn\",\"type\":\"uynhijg\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"siarbutrcvpn\",\"name\":\"zzmhjrunmpxttd\",\"type\":\"hrbnlankxmyskpbh\"}],\"nextLink\":\"btkcxywnytnrsyn\"}") + .toObject(WorkloadNetworkListResult.class); + Assertions.assertEquals("btkcxywnytnrsyn", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java deleted file mode 100644 index 4fa6a4b955be5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkList; - -public final class WorkloadNetworkListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkList model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"mbes\",\"name\":\"dnkwwtppjflcxog\",\"type\":\"okonzmnsikvmkqz\"},{\"id\":\"qqkdltfzxmhhvhgu\",\"name\":\"eodkwobda\",\"type\":\"xtibqdxbxwakbog\"},{\"id\":\"xndlkzgxhu\",\"name\":\"iplbpodxunkbebxm\",\"type\":\"byyntwlrbqt\"}],\"nextLink\":\"ievseotgqrllt\"}") - .toObject(WorkloadNetworkList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkList model = new WorkloadNetworkList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java index ec3d8119b707e..0a51c4f358310 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,32 +12,28 @@ public final class WorkloadNetworkPortMirroringInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkPortMirroringInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"bzkfzbeyvpn\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"invkjjxdxrbuu\",\"destination\":\"clewyhm\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":4379393753371043787},\"id\":\"ofncckwyfzqwhxxb\",\"name\":\"yq\",\"type\":\"xzfe\"}") - .toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("bzkfzbeyvpn", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("invkjjxdxrbuu", model.source()); - Assertions.assertEquals("clewyhm", model.destination()); - Assertions.assertEquals(4379393753371043787L, model.revision()); + WorkloadNetworkPortMirroringInner model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"d\",\"direction\":\"EGRESS\",\"source\":\"gnayqigynduh\",\"destination\":\"hqlkthumaqo\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":3264624170163981005},\"id\":\"r\",\"name\":\"gccymvaolpssl\",\"type\":\"lfmmdnbbglzpswi\"}") + .toObject(WorkloadNetworkPortMirroringInner.class); + Assertions.assertEquals("d", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); + Assertions.assertEquals("gnayqigynduh", model.source()); + Assertions.assertEquals("hqlkthumaqo", model.destination()); + Assertions.assertEquals(3264624170163981005L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringInner model = - new WorkloadNetworkPortMirroringInner() - .withDisplayName("bzkfzbeyvpn") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("invkjjxdxrbuu") - .withDestination("clewyhm") - .withRevision(4379393753371043787L); + WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("d") + .withDirection(PortMirroringDirectionEnum.EGRESS) + .withSource("gnayqigynduh") + .withDestination("hqlkthumaqo") + .withRevision(3264624170163981005L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("bzkfzbeyvpn", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("invkjjxdxrbuu", model.source()); - Assertions.assertEquals("clewyhm", model.destination()); - Assertions.assertEquals(4379393753371043787L, model.revision()); + Assertions.assertEquals("d", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); + Assertions.assertEquals("gnayqigynduh", model.source()); + Assertions.assertEquals("hqlkthumaqo", model.destination()); + Assertions.assertEquals(3264624170163981005L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListResultTests.java new file mode 100644 index 0000000000000..6c0f9ce5c1ac4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringListResult; +import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkPortMirroringListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkPortMirroringListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"displayName\":\"n\",\"direction\":\"INGRESS\",\"source\":\"vkr\",\"destination\":\"wbxqzvszjfau\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":8265803148006565496},\"id\":\"tvtc\",\"name\":\"aqtdoqmcbx\",\"type\":\"wvxysl\"},{\"properties\":{\"displayName\":\"sfxobl\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"lmpewwwfbkr\",\"destination\":\"nsvs\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":1687895599204003561},\"id\":\"bfovasrruvwbhsq\",\"name\":\"sub\",\"type\":\"gjb\"},{\"properties\":{\"displayName\":\"bpybsrfbjf\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"sotftpvj\",\"destination\":\"exilzznfqqnvwpmq\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2678080660083018694},\"id\":\"cjhwq\",\"name\":\"tjrybnwjewgdr\",\"type\":\"ervnaenqpehi\"}],\"nextLink\":\"oygmift\"}") + .toObject(WorkloadNetworkPortMirroringListResult.class); + Assertions.assertEquals("n", model.value().get(0).displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.value().get(0).direction()); + Assertions.assertEquals("vkr", model.value().get(0).source()); + Assertions.assertEquals("wbxqzvszjfau", model.value().get(0).destination()); + Assertions.assertEquals(8265803148006565496L, model.value().get(0).revision()); + Assertions.assertEquals("oygmift", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java deleted file mode 100644 index df32ecf00e27c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringList; - -public final class WorkloadNetworkPortMirroringListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPortMirroringList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"ogs\",\"direction\":\"EGRESS\",\"source\":\"vfdnwnwmewzsyyce\",\"destination\":\"soibjudpfrx\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":1649253814789212920},\"id\":\"tdwkqbrq\",\"name\":\"bpaxhexiilivpdt\",\"type\":\"irqtdqoa\"},{\"properties\":{\"displayName\":\"uzf\",\"direction\":\"INGRESS\",\"source\":\"yfxrx\",\"destination\":\"eptra\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":6292061975589121523},\"id\":\"nwxuqlcvydyp\",\"name\":\"tdooaoj\",\"type\":\"niodkooeb\"},{\"properties\":{\"displayName\":\"jhemms\",\"direction\":\"INGRESS\",\"source\":\"c\",\"destination\":\"dtjinfw\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":9167541690912774024},\"id\":\"jvefkdlfoakggkfp\",\"name\":\"gaowpulpqblylsyx\",\"type\":\"qjnsjervtia\"}],\"nextLink\":\"sdszue\"}") - .toObject(WorkloadNetworkPortMirroringList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringList model = new WorkloadNetworkPortMirroringList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java new file mode 100644 index 0000000000000..823d86da59682 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPortMirroringProfilesCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"mxqhndvnoamldse\",\"direction\":\"EGRESS\",\"source\":\"djh\",\"destination\":\"lzok\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":947940587713808603},\"id\":\"eta\",\"name\":\"ltsxoatf\",\"type\":\"g\"}"; + + 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.workloadNetworkPortMirroringProfiles() + .define("gshejjtbxqmulux") + .withExistingPrivateCloud("wcobie", "stmninwjizcilng") + .withDisplayName("zvners") + .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) + .withSource("crwnamikz") + .withDestination("rqbsmswziq") + .withRevision(6886133591151042666L) + .create(); + + Assertions.assertEquals("mxqhndvnoamldse", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); + Assertions.assertEquals("djh", response.source()); + Assertions.assertEquals("lzok", response.destination()); + Assertions.assertEquals(947940587713808603L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java new file mode 100644 index 0000000000000..76b5bdf848979 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPortMirroringProfilesDeleteMockTests { + @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.workloadNetworkPortMirroringProfiles() + .delete("jqepqwhi", "monstshiyxgve", "fclduccbirdsv", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java new file mode 100644 index 0000000000000..e7fbb1d8b2de4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"rgywwp\",\"direction\":\"INGRESS\",\"source\":\"nptfujgi\",\"destination\":\"aaoepttaqut\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":3740922293737514976},\"id\":\"ruunzzjgehkf\",\"name\":\"imrt\",\"type\":\"xokffqyin\"}"; + + 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.workloadNetworkPortMirroringProfiles() + .getWithResponse("cxwaxfewz", "kjexfdeqvhp", "ylkkshkbffmbm", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("rgywwp", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.direction()); + Assertions.assertEquals("nptfujgi", response.source()); + Assertions.assertEquals("aaoepttaqut", response.destination()); + Assertions.assertEquals(3740922293737514976L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMockTests.java new file mode 100644 index 0000000000000..4b4c1a1551242 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMockTests { + @Test + public void testListByWorkloadNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"displayName\":\"yophz\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"gcrpfbcun\",\"destination\":\"zcezelfwyfwl\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":979869830822712459},\"id\":\"ihclafzv\",\"name\":\"ylptrsqqwztcm\",\"type\":\"qkc\"}]}"; + + 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.workloadNetworkPortMirroringProfiles() + .listByWorkloadNetwork("nktwfansnvpdibmi", "ostbzbkiwb", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("yophz", response.iterator().next().displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.iterator().next().direction()); + Assertions.assertEquals("gcrpfbcun", response.iterator().next().source()); + Assertions.assertEquals("zcezelfwyfwl", response.iterator().next().destination()); + Assertions.assertEquals(979869830822712459L, response.iterator().next().revision()); + } +} 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 index 37d28b7f126df..5220f9af3fe52 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,32 +12,29 @@ public final class WorkloadNetworkPortMirroringPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkPortMirroringProperties model = - BinaryData - .fromString( - "{\"displayName\":\"tpp\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"xorjaltolmncwsob\",\"destination\":\"csdbnwdcfhuc\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":6962670154943364996}") - .toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("tpp", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("xorjaltolmncwsob", model.source()); - Assertions.assertEquals("csdbnwdcfhuc", model.destination()); - Assertions.assertEquals(6962670154943364996L, model.revision()); + WorkloadNetworkPortMirroringProperties model = BinaryData.fromString( + "{\"displayName\":\"mcwyhzdxssadb\",\"direction\":\"EGRESS\",\"source\":\"dfznudaodv\",\"destination\":\"bncblylpstdbhhx\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":4128477649983650964}") + .toObject(WorkloadNetworkPortMirroringProperties.class); + Assertions.assertEquals("mcwyhzdxssadb", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); + Assertions.assertEquals("dfznudaodv", model.source()); + Assertions.assertEquals("bncblylpstdbhhx", model.destination()); + Assertions.assertEquals(4128477649983650964L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringProperties model = - new WorkloadNetworkPortMirroringProperties() - .withDisplayName("tpp") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("xorjaltolmncwsob") - .withDestination("csdbnwdcfhuc") - .withRevision(6962670154943364996L); + WorkloadNetworkPortMirroringProperties model + = new WorkloadNetworkPortMirroringProperties().withDisplayName("mcwyhzdxssadb") + .withDirection(PortMirroringDirectionEnum.EGRESS) + .withSource("dfznudaodv") + .withDestination("bncblylpstdbhhx") + .withRevision(4128477649983650964L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("tpp", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("xorjaltolmncwsob", model.source()); - Assertions.assertEquals("csdbnwdcfhuc", model.destination()); - Assertions.assertEquals(6962670154943364996L, model.revision()); + Assertions.assertEquals("mcwyhzdxssadb", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); + Assertions.assertEquals("dfznudaodv", model.source()); + Assertions.assertEquals("bncblylpstdbhhx", model.destination()); + Assertions.assertEquals(4128477649983650964L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringUpdateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringUpdateTests.java new file mode 100644 index 0000000000000..1a8d0a2ba3dbe --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringUpdateTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkPortMirroringUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkPortMirroringUpdate model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"cdntnevfiwjmy\",\"direction\":\"INGRESS\",\"source\":\"slswtm\",\"destination\":\"riofzpyqse\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":1436715784442722991}}") + .toObject(WorkloadNetworkPortMirroringUpdate.class); + Assertions.assertEquals("cdntnevfiwjmy", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("slswtm", model.source()); + Assertions.assertEquals("riofzpyqse", model.destination()); + Assertions.assertEquals(1436715784442722991L, model.revision()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkloadNetworkPortMirroringUpdate model + = new WorkloadNetworkPortMirroringUpdate().withDisplayName("cdntnevfiwjmy") + .withDirection(PortMirroringDirectionEnum.INGRESS) + .withSource("slswtm") + .withDestination("riofzpyqse") + .withRevision(1436715784442722991L); + model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringUpdate.class); + Assertions.assertEquals("cdntnevfiwjmy", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("slswtm", model.source()); + Assertions.assertEquals("riofzpyqse", model.destination()); + Assertions.assertEquals(1436715784442722991L, 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 new file mode 100644 index 0000000000000..543171e16dc4e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Canceled\"}").toObject(WorkloadNetworkProperties.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPListResultTests.java new file mode 100644 index 0000000000000..39048f4bd43b4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPListResult; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkPublicIPListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkPublicIPListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"displayName\":\"xoruzfgsquyfxrx\",\"numberOfPublicIPs\":4742398827211014081,\"publicIPBlock\":\"ramxjezwlwnw\",\"provisioningState\":\"Deleting\"},\"id\":\"cvydypatdoo\",\"name\":\"ojknio\",\"type\":\"kooebwnu\"},{\"properties\":{\"displayName\":\"mmsbvdkcrodtjin\",\"numberOfPublicIPs\":9136407884135204027,\"publicIPBlock\":\"lt\",\"provisioningState\":\"Deleting\"},\"id\":\"vefkdlfoakggk\",\"name\":\"pagao\",\"type\":\"pulpqblylsyxk\"},{\"properties\":{\"displayName\":\"sjervti\",\"numberOfPublicIPs\":2466892292618671362,\"publicIPBlock\":\"sz\",\"provisioningState\":\"Succeeded\"},\"id\":\"sbzkf\",\"name\":\"beyvpnqicvinvkjj\",\"type\":\"dxrbuukzcle\"}],\"nextLink\":\"hmlwpaztzpo\"}") + .toObject(WorkloadNetworkPublicIPListResult.class); + Assertions.assertEquals("xoruzfgsquyfxrx", model.value().get(0).displayName()); + Assertions.assertEquals(4742398827211014081L, model.value().get(0).numberOfPublicIPs()); + Assertions.assertEquals("hmlwpaztzpo", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java deleted file mode 100644 index b5a2a76482159..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIPsList; - -public final class WorkloadNetworkPublicIPsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPublicIPsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"kfwynw\",\"numberOfPublicIPs\":4797206470804726594,\"publicIPBlock\":\"kayh\",\"provisioningState\":\"Deleting\"},\"id\":\"vyqia\",\"name\":\"kzwpcnpw\",\"type\":\"cjaesgvvs\"}],\"nextLink\":\"yajguqfhwygzlv\"}") - .toObject(WorkloadNetworkPublicIPsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPublicIPsList model = new WorkloadNetworkPublicIPsList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIPsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.java index 1f254c13ba071..743c0574942d8 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,23 +11,19 @@ public final class WorkloadNetworkPublicIpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkPublicIpInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"fxusemdwzr\",\"numberOfPublicIPs\":3024534869961182139,\"publicIPBlock\":\"fcqdpsq\",\"provisioningState\":\"Building\"},\"id\":\"psvuoymgc\",\"name\":\"elvezrypq\",\"type\":\"mfe\"}") - .toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("fxusemdwzr", model.displayName()); - Assertions.assertEquals(3024534869961182139L, model.numberOfPublicIPs()); + WorkloadNetworkPublicIpInner model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"ckw\",\"numberOfPublicIPs\":8886702787587006414,\"publicIPBlock\":\"hxx\",\"provisioningState\":\"Succeeded\"},\"id\":\"a\",\"name\":\"zfeqztppri\",\"type\":\"lxorjaltolmncws\"}") + .toObject(WorkloadNetworkPublicIpInner.class); + Assertions.assertEquals("ckw", model.displayName()); + Assertions.assertEquals(8886702787587006414L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpInner model = - new WorkloadNetworkPublicIpInner() - .withDisplayName("fxusemdwzr") - .withNumberOfPublicIPs(3024534869961182139L); + WorkloadNetworkPublicIpInner model + = new WorkloadNetworkPublicIpInner().withDisplayName("ckw").withNumberOfPublicIPs(8886702787587006414L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("fxusemdwzr", model.displayName()); - Assertions.assertEquals(3024534869961182139L, model.numberOfPublicIPs()); + Assertions.assertEquals("ckw", model.displayName()); + Assertions.assertEquals(8886702787587006414L, 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 index 7830c039ac87d..5f0e3c4a9ead2 100644 --- 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 @@ -1,33 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIPProperties; import org.junit.jupiter.api.Assertions; -public final class WorkloadNetworkPublicIpPropertiesTests { +public final class WorkloadNetworkPublicIPPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkPublicIpProperties model = - BinaryData - .fromString( - "{\"displayName\":\"erqwkyhkobopg\",\"numberOfPublicIPs\":3864953731732888830,\"publicIPBlock\":\"wep\",\"provisioningState\":\"Building\"}") - .toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("erqwkyhkobopg", model.displayName()); - Assertions.assertEquals(3864953731732888830L, model.numberOfPublicIPs()); + WorkloadNetworkPublicIPProperties model = BinaryData.fromString( + "{\"displayName\":\"qwcsdbnwdcfhuc\",\"numberOfPublicIPs\":3846405596035643939,\"publicIPBlock\":\"vglsbjjca\",\"provisioningState\":\"Building\"}") + .toObject(WorkloadNetworkPublicIPProperties.class); + Assertions.assertEquals("qwcsdbnwdcfhuc", model.displayName()); + Assertions.assertEquals(3846405596035643939L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpProperties model = - new WorkloadNetworkPublicIpProperties() - .withDisplayName("erqwkyhkobopg") - .withNumberOfPublicIPs(3864953731732888830L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("erqwkyhkobopg", model.displayName()); - Assertions.assertEquals(3864953731732888830L, model.numberOfPublicIPs()); + WorkloadNetworkPublicIPProperties model + = new WorkloadNetworkPublicIPProperties().withDisplayName("qwcsdbnwdcfhuc") + .withNumberOfPublicIPs(3846405596035643939L); + model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIPProperties.class); + Assertions.assertEquals("qwcsdbnwdcfhuc", model.displayName()); + Assertions.assertEquals(3846405596035643939L, model.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java new file mode 100644 index 0000000000000..388bc7b28d7d7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPublicIpsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"gbrouxddbh\",\"numberOfPublicIPs\":8860682105425516466,\"publicIPBlock\":\"azjzo\",\"provisioningState\":\"Succeeded\"},\"id\":\"hpdulon\",\"name\":\"acn\",\"type\":\"qwtehtuevr\"}"; + + 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.workloadNetworkPublicIps() + .define("kzmkwklsnoxaxmqe") + .withExistingPrivateCloud("ucftbyrp", "rohkpigqfusu") + .withDisplayName("h") + .withNumberOfPublicIPs(2801708471199882926L) + .create(); + + Assertions.assertEquals("gbrouxddbh", response.displayName()); + Assertions.assertEquals(8860682105425516466L, response.numberOfPublicIPs()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java new file mode 100644 index 0000000000000..8cf1bed18d8fa --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPublicIpsDeleteMockTests { + @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.workloadNetworkPublicIps().delete("g", "lnlg", "trwahzj", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java new file mode 100644 index 0000000000000..c94ea8661c1d5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPublicIpsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"xhlw\",\"numberOfPublicIPs\":1003428665455506608,\"publicIPBlock\":\"qrsxyp\",\"provisioningState\":\"Canceled\"},\"id\":\"y\",\"name\":\"nchrszizoyu\",\"type\":\"lyetndnbfqygg\"}"; + + 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.workloadNetworkPublicIps() + .getWithResponse("axpunjqikczvv", "tacgxmfc", "serxht", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("xhlw", response.displayName()); + Assertions.assertEquals(1003428665455506608L, response.numberOfPublicIPs()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests.java new file mode 100644 index 0000000000000..787645e89c44b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests { + @Test + public void testListByWorkloadNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"displayName\":\"ikayiansharuj\",\"numberOfPublicIPs\":4425702641866794545,\"publicIPBlock\":\"fzyjqt\",\"provisioningState\":\"Building\"},\"id\":\"pqhjpenuygbqeqq\",\"name\":\"kewvnqv\",\"type\":\"dlguaucmfdjwn\"}]}"; + + 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.workloadNetworkPublicIps() + .listByWorkloadNetwork("vclglxnfuij", "kbusqo", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ikayiansharuj", response.iterator().next().displayName()); + Assertions.assertEquals(4425702641866794545L, response.iterator().next().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 index 6f4a40d50b2b0..49a43344844b9 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -13,34 +13,29 @@ public final class WorkloadNetworkSegmentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkSegmentInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"k\",\"connectedGateway\":\"oxafn\",\"subnet\":{\"dhcpRanges\":[\"ichkoymkcdyhb\",\"kkpwdreqnovvq\",\"ovljxywsu\"],\"gatewayAddress\":\"yrs\"},\"portVif\":[{\"portName\":\"tgadgvraeaen\"},{\"portName\":\"nzar\"},{\"portName\":\"lquuijfqkacewii\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":4401878821743951844},\"id\":\"wwiftohqkvpuv\",\"name\":\"sgplsakn\",\"type\":\"n\"}") - .toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("k", model.displayName()); - Assertions.assertEquals("oxafn", model.connectedGateway()); - Assertions.assertEquals("ichkoymkcdyhb", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("yrs", model.subnet().gatewayAddress()); - Assertions.assertEquals(4401878821743951844L, model.revision()); + WorkloadNetworkSegmentInner model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"iuebbaumny\",\"connectedGateway\":\"ped\",\"subnet\":{\"dhcpRanges\":[\"a\",\"ckhsmtxpsieb\",\"fhvpesaps\"],\"gatewayAddress\":\"dqmh\"},\"portVif\":[{\"portName\":\"tldwkyzxuutk\"},{\"portName\":\"ws\"},{\"portName\":\"svlxotogtwrup\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":896120017372838413},\"id\":\"kvceoveilovnotyf\",\"name\":\"fcnj\",\"type\":\"k\"}") + .toObject(WorkloadNetworkSegmentInner.class); + Assertions.assertEquals("iuebbaumny", model.displayName()); + Assertions.assertEquals("ped", model.connectedGateway()); + Assertions.assertEquals("a", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("dqmh", model.subnet().gatewayAddress()); + Assertions.assertEquals(896120017372838413L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentInner model = - new WorkloadNetworkSegmentInner() - .withDisplayName("k") - .withConnectedGateway("oxafn") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("ichkoymkcdyhb", "kkpwdreqnovvq", "ovljxywsu")) - .withGatewayAddress("yrs")) - .withRevision(4401878821743951844L); + WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("iuebbaumny") + .withConnectedGateway("ped") + .withSubnet( + new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("a", "ckhsmtxpsieb", "fhvpesaps")) + .withGatewayAddress("dqmh")) + .withRevision(896120017372838413L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("k", model.displayName()); - Assertions.assertEquals("oxafn", model.connectedGateway()); - Assertions.assertEquals("ichkoymkcdyhb", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("yrs", model.subnet().gatewayAddress()); - Assertions.assertEquals(4401878821743951844L, model.revision()); + Assertions.assertEquals("iuebbaumny", model.displayName()); + Assertions.assertEquals("ped", model.connectedGateway()); + Assertions.assertEquals("a", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("dqmh", model.subnet().gatewayAddress()); + Assertions.assertEquals(896120017372838413L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentListResultTests.java new file mode 100644 index 0000000000000..781575b137149 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentListResultTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentListResult; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkSegmentListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkSegmentListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"displayName\":\"ybyxc\",\"connectedGateway\":\"clha\",\"subnet\":{\"dhcpRanges\":[\"abphlw\",\"qlfktsths\",\"cocmnyyaztt\"],\"gatewayAddress\":\"wwrq\"},\"portVif\":[{\"portName\":\"ckzywbiexzfeyue\"},{\"portName\":\"ibx\"},{\"portName\":\"wbhqwal\"},{\"portName\":\"zyoxaepdkzjan\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3067424612233139925},\"id\":\"v\",\"name\":\"bniwdj\",\"type\":\"wz\"},{\"properties\":{\"displayName\":\"bpg\",\"connectedGateway\":\"ytxhp\",\"subnet\":{\"dhcpRanges\":[\"pfza\",\"glcuhxwtctyqi\",\"lbbovplw\"],\"gatewayAddress\":\"hvgyuguosvmk\"},\"portVif\":[{\"portName\":\"qukkfp\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":6280051526633281163},\"id\":\"zkd\",\"name\":\"slpvlop\",\"type\":\"i\"}],\"nextLink\":\"ghxpkdw\"}") + .toObject(WorkloadNetworkSegmentListResult.class); + Assertions.assertEquals("ybyxc", model.value().get(0).displayName()); + Assertions.assertEquals("clha", model.value().get(0).connectedGateway()); + Assertions.assertEquals("abphlw", model.value().get(0).subnet().dhcpRanges().get(0)); + Assertions.assertEquals("wwrq", model.value().get(0).subnet().gatewayAddress()); + Assertions.assertEquals(3067424612233139925L, model.value().get(0).revision()); + Assertions.assertEquals("ghxpkdw", model.nextLink()); + } +} 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 index 6de67bafb097c..cc647a81f2d17 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,15 +11,8 @@ public final class WorkloadNetworkSegmentPortVifTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkSegmentPortVif model = - BinaryData.fromString("{\"portName\":\"cvokotllxdyhg\"}").toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("cvokotllxdyhg", model.portName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentPortVif model = new WorkloadNetworkSegmentPortVif().withPortName("cvokotllxdyhg"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("cvokotllxdyhg", model.portName()); + WorkloadNetworkSegmentPortVif model + = BinaryData.fromString("{\"portName\":\"nobglaocq\"}").toObject(WorkloadNetworkSegmentPortVif.class); + Assertions.assertEquals("nobglaocq", 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 index 25c06b17d701f..4ad02aec5b62d 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -13,34 +13,28 @@ public final class WorkloadNetworkSegmentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkSegmentProperties model = - BinaryData - .fromString( - "{\"displayName\":\"ynl\",\"connectedGateway\":\"huopxodlqiynto\",\"subnet\":{\"dhcpRanges\":[\"leosjswsrms\",\"yzrpzbchckqqzq\"],\"gatewayAddress\":\"xiy\"},\"portVif\":[{\"portName\":\"zynkedya\"},{\"portName\":\"wyhqmibzyhwits\"},{\"portName\":\"pyy\"},{\"portName\":\"cdpu\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":359022541227333751}") - .toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("ynl", model.displayName()); - Assertions.assertEquals("huopxodlqiynto", model.connectedGateway()); - Assertions.assertEquals("leosjswsrms", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("xiy", model.subnet().gatewayAddress()); - Assertions.assertEquals(359022541227333751L, model.revision()); + WorkloadNetworkSegmentProperties model = BinaryData.fromString( + "{\"displayName\":\"x\",\"connectedGateway\":\"bttk\",\"subnet\":{\"dhcpRanges\":[\"pnvjtoqnermclf\"],\"gatewayAddress\":\"phoxus\"},\"portVif\":[{\"portName\":\"bgyepsbj\"},{\"portName\":\"zq\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":5351409570335896037}") + .toObject(WorkloadNetworkSegmentProperties.class); + Assertions.assertEquals("x", model.displayName()); + Assertions.assertEquals("bttk", model.connectedGateway()); + Assertions.assertEquals("pnvjtoqnermclf", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("phoxus", model.subnet().gatewayAddress()); + Assertions.assertEquals(5351409570335896037L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentProperties model = - new WorkloadNetworkSegmentProperties() - .withDisplayName("ynl") - .withConnectedGateway("huopxodlqiynto") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("leosjswsrms", "yzrpzbchckqqzq")) - .withGatewayAddress("xiy")) - .withRevision(359022541227333751L); + WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("x") + .withConnectedGateway("bttk") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("pnvjtoqnermclf")) + .withGatewayAddress("phoxus")) + .withRevision(5351409570335896037L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("ynl", model.displayName()); - Assertions.assertEquals("huopxodlqiynto", model.connectedGateway()); - Assertions.assertEquals("leosjswsrms", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("xiy", model.subnet().gatewayAddress()); - Assertions.assertEquals(359022541227333751L, model.revision()); + Assertions.assertEquals("x", model.displayName()); + Assertions.assertEquals("bttk", model.connectedGateway()); + Assertions.assertEquals("pnvjtoqnermclf", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("phoxus", model.subnet().gatewayAddress()); + Assertions.assertEquals(5351409570335896037L, 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 index efa8d77d5c097..7370e0bf9ca90 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,22 +12,19 @@ public final class WorkloadNetworkSegmentSubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkSegmentSubnet model = - BinaryData - .fromString("{\"dhcpRanges\":[\"biknsorgjhxbld\",\"lwwrl\"],\"gatewayAddress\":\"m\"}") + WorkloadNetworkSegmentSubnet model + = BinaryData.fromString("{\"dhcpRanges\":[\"fjz\"],\"gatewayAddress\":\"qkqujidsu\"}") .toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("biknsorgjhxbld", model.dhcpRanges().get(0)); - Assertions.assertEquals("m", model.gatewayAddress()); + Assertions.assertEquals("fjz", model.dhcpRanges().get(0)); + Assertions.assertEquals("qkqujidsu", model.gatewayAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentSubnet model = - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("biknsorgjhxbld", "lwwrl")) - .withGatewayAddress("m"); + WorkloadNetworkSegmentSubnet model + = new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("fjz")).withGatewayAddress("qkqujidsu"); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("biknsorgjhxbld", model.dhcpRanges().get(0)); - Assertions.assertEquals("m", model.gatewayAddress()); + Assertions.assertEquals("fjz", model.dhcpRanges().get(0)); + Assertions.assertEquals("qkqujidsu", model.gatewayAddress()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentUpdateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentUpdateTests.java new file mode 100644 index 0000000000000..258af5200e402 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentUpdateTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkSegmentUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkSegmentUpdate model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"cmgyud\",\"connectedGateway\":\"tlmoyrx\",\"subnet\":{\"dhcpRanges\":[\"dw\"],\"gatewayAddress\":\"ntxhdzhlrqjbhck\"},\"portVif\":[{\"portName\":\"rxsbkyvp\"},{\"portName\":\"anuzbpzkafkuw\"},{\"portName\":\"rnwb\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":3647688567520643313}}") + .toObject(WorkloadNetworkSegmentUpdate.class); + Assertions.assertEquals("cmgyud", model.displayName()); + Assertions.assertEquals("tlmoyrx", model.connectedGateway()); + Assertions.assertEquals("dw", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("ntxhdzhlrqjbhck", model.subnet().gatewayAddress()); + Assertions.assertEquals(3647688567520643313L, model.revision()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkloadNetworkSegmentUpdate model = new WorkloadNetworkSegmentUpdate().withDisplayName("cmgyud") + .withConnectedGateway("tlmoyrx") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("dw")) + .withGatewayAddress("ntxhdzhlrqjbhck")) + .withRevision(3647688567520643313L); + model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentUpdate.class); + Assertions.assertEquals("cmgyud", model.displayName()); + Assertions.assertEquals("tlmoyrx", model.connectedGateway()); + Assertions.assertEquals("dw", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("ntxhdzhlrqjbhck", model.subnet().gatewayAddress()); + Assertions.assertEquals(3647688567520643313L, model.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java new file mode 100644 index 0000000000000..d56abb7ae2b85 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkSegmentsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"ejnhlbkpb\",\"connectedGateway\":\"cpilj\",\"subnet\":{\"dhcpRanges\":[\"vechndbnwiehole\"],\"gatewayAddress\":\"wiuub\"},\"portVif\":[{\"portName\":\"sfapaqtferrq\"},{\"portName\":\"x\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":1053026358378114507},\"id\":\"og\",\"name\":\"qnobp\",\"type\":\"dcdab\"}"; + + 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.workloadNetworkSegments() + .define("pcvhdbevwqqxeys") + .withExistingPrivateCloud("dhohsdtmcdzsuf", "ohdxbzlmcmu") + .withDisplayName("qzinkfkbg") + .withConnectedGateway("bowxe") + .withSubnet(new WorkloadNetworkSegmentSubnet() + .withDhcpRanges(Arrays.asList("jmygvk", "qkjjeokbz", "fezrx", "czurtlei")) + .withGatewayAddress("xbkwv")) + .withRevision(7609604165307370108L) + .create(); + + Assertions.assertEquals("ejnhlbkpb", response.displayName()); + Assertions.assertEquals("cpilj", response.connectedGateway()); + Assertions.assertEquals("vechndbnwiehole", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("wiuub", response.subnet().gatewayAddress()); + Assertions.assertEquals(1053026358378114507L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java new file mode 100644 index 0000000000000..ca616dd56d29b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkSegmentsDeleteSegmentMockTests { + @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.workloadNetworkSegments() + .deleteSegment("bdb", "qgqqihedsvqwthmk", "ibcysihsgqc", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java new file mode 100644 index 0000000000000..eb12ae795dc3d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkSegmentsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"qdsmexiit\",\"connectedGateway\":\"uxtyasiibmi\",\"subnet\":{\"dhcpRanges\":[\"ustgnljhnmgixhc\",\"avmqfoudor\",\"cgyypro\"],\"gatewayAddress\":\"ypundmbxhugc\"},\"portVif\":[{\"portName\":\"vlgo\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":4613723734586965909},\"id\":\"zfjltfvnzcyjto\",\"name\":\"p\",\"type\":\"opv\"}"; + + 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.workloadNetworkSegments() + .getWithResponse("linmfgv", "irpghriypoqeyh", "qhykprlpyzn", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("qdsmexiit", response.displayName()); + Assertions.assertEquals("uxtyasiibmi", response.connectedGateway()); + Assertions.assertEquals("ustgnljhnmgixhc", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("ypundmbxhugc", response.subnet().gatewayAddress()); + Assertions.assertEquals(4613723734586965909L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkMockTests.java new file mode 100644 index 0000000000000..86673a6fcd9ba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkSegmentsListByWorkloadNetworkMockTests { + @Test + public void testListByWorkloadNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"displayName\":\"phojeevyhy\",\"connectedGateway\":\"gzfc\",\"subnet\":{\"dhcpRanges\":[\"mfg\",\"eglqgleohibetn\",\"uankrrfxeeeb\",\"ij\"],\"gatewayAddress\":\"cvbmqzb\"},\"portVif\":[{\"portName\":\"aj\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":4124520510189226193},\"id\":\"h\",\"name\":\"kuyxoafg\",\"type\":\"oqltfae\"}]}"; + + 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.workloadNetworkSegments() + .listByWorkloadNetwork("dgug", "yzihgrkyuizabsn", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("phojeevyhy", response.iterator().next().displayName()); + Assertions.assertEquals("gzfc", response.iterator().next().connectedGateway()); + Assertions.assertEquals("mfg", response.iterator().next().subnet().dhcpRanges().get(0)); + Assertions.assertEquals("cvbmqzb", response.iterator().next().subnet().gatewayAddress()); + Assertions.assertEquals(4124520510189226193L, response.iterator().next().revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java deleted file mode 100644 index 2e30d77c8bfdb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentsList; - -public final class WorkloadNetworkSegmentsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkSegmentsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"uwz\",\"connectedGateway\":\"xbmp\",\"subnet\":{\"dhcpRanges\":[\"fuzmuvpbtt\",\"um\",\"rp\"],\"gatewayAddress\":\"ebmnzbtbhjpglk\"},\"portVif\":[{\"portName\":\"dneu\"},{\"portName\":\"fphsdyhtozfikdow\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":2092756450243660051},\"id\":\"clvit\",\"name\":\"hqzonosggbhcoh\",\"type\":\"wdsjnkalju\"},{\"properties\":{\"displayName\":\"swacffgdkzz\",\"connectedGateway\":\"kfvhqcrailvpn\",\"subnet\":{\"dhcpRanges\":[\"flrwd\",\"hdlxyjrxsagafcn\"],\"gatewayAddress\":\"gwq\"},\"portVif\":[{\"portName\":\"dgfbcvkcvqvpke\"},{\"portName\":\"cvdrhvoodsot\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":5400521651850486690},\"id\":\"j\",\"name\":\"vnhdldwmgxcxr\",\"type\":\"lpmutwuoegrpkhj\"},{\"properties\":{\"displayName\":\"yqsluic\",\"connectedGateway\":\"ggkzzlvmbmpa\",\"subnet\":{\"dhcpRanges\":[\"fv\",\"efyw\"],\"gatewayAddress\":\"pfvmwyhrfou\"},\"portVif\":[{\"portName\":\"akcp\"},{\"portName\":\"yzvqt\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":3901581715856749689},\"id\":\"zksmondj\",\"name\":\"quxvypomgkop\",\"type\":\"whojvp\"},{\"properties\":{\"displayName\":\"gxysmocmbqfqvm\",\"connectedGateway\":\"xozap\",\"subnet\":{\"dhcpRanges\":[\"xprglyatddc\",\"cbcuejrjxgciqi\",\"rhos\",\"sdqrhzoymibmrq\"],\"gatewayAddress\":\"bahwfl\"},\"portVif\":[{\"portName\":\"tmhrkwofyyvoqacp\"},{\"portName\":\"xpbtgiwbwo\"},{\"portName\":\"washr\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":3530483379804377024},\"id\":\"wbpokulpiujwaasi\",\"name\":\"qiiobyuqer\",\"type\":\"qlpqwcciuq\"}],\"nextLink\":\"dbutauvfbtkuwhh\"}") - .toObject(WorkloadNetworkSegmentsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentsList model = new WorkloadNetworkSegmentsList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.java index afb9f1db270f5..ff9bb4be22f70 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,26 +12,22 @@ public final class WorkloadNetworkVMGroupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkVMGroupInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"buruvd\",\"members\":[\"s\",\"zlxwabmqoefkifr\",\"tpuqujmq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":2719047035031836575},\"id\":\"oaongbjc\",\"name\":\"tujitcjedft\",\"type\":\"waezkojvd\"}") - .toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("buruvd", model.displayName()); - Assertions.assertEquals("s", model.members().get(0)); - Assertions.assertEquals(2719047035031836575L, model.revision()); + WorkloadNetworkVMGroupInner model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"bmnzbtbhjpgl\",\"members\":[\"ohdneuel\",\"phsdyhto\",\"fikdowwqu\",\"v\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":9091677111595049669},\"id\":\"hqzonosggbhcoh\",\"name\":\"wdsjnkalju\",\"type\":\"iiswacffgdkzze\"}") + .toObject(WorkloadNetworkVMGroupInner.class); + Assertions.assertEquals("bmnzbtbhjpgl", model.displayName()); + Assertions.assertEquals("ohdneuel", model.members().get(0)); + Assertions.assertEquals(9091677111595049669L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupInner model = - new WorkloadNetworkVMGroupInner() - .withDisplayName("buruvd") - .withMembers(Arrays.asList("s", "zlxwabmqoefkifr", "tpuqujmq")) - .withRevision(2719047035031836575L); + WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("bmnzbtbhjpgl") + .withMembers(Arrays.asList("ohdneuel", "phsdyhto", "fikdowwqu", "v")) + .withRevision(9091677111595049669L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("buruvd", model.displayName()); - Assertions.assertEquals("s", model.members().get(0)); - Assertions.assertEquals(2719047035031836575L, model.revision()); + Assertions.assertEquals("bmnzbtbhjpgl", model.displayName()); + Assertions.assertEquals("ohdneuel", model.members().get(0)); + Assertions.assertEquals(9091677111595049669L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupListResultTests.java new file mode 100644 index 0000000000000..3343483423603 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupListResultTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupListResult; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkVMGroupListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkVMGroupListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"displayName\":\"zhedplvwiw\",\"members\":[\"wmbesldnkw\",\"tppjflcx\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":1050926206308737519},\"id\":\"nsikvmkqzeqqkdl\",\"name\":\"fzxmhhvhgureodkw\",\"type\":\"bdagxt\"},{\"properties\":{\"displayName\":\"dxbx\",\"members\":[\"bogqxndlkzgxhu\",\"iplbpodxunkbebxm\",\"byyntwlrbqt\",\"oievseotgqrlltm\"],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":1220428875779333606},\"id\":\"xbmp\",\"name\":\"cjefuzmu\",\"type\":\"pbttdum\"}],\"nextLink\":\"p\"}") + .toObject(WorkloadNetworkVMGroupListResult.class); + Assertions.assertEquals("zhedplvwiw", model.value().get(0).displayName()); + Assertions.assertEquals("wmbesldnkw", model.value().get(0).members().get(0)); + Assertions.assertEquals(1050926206308737519L, model.value().get(0).revision()); + Assertions.assertEquals("p", model.nextLink()); + } +} 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 index 607bad90e8b95..f1b40cfe70a9c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -12,26 +12,22 @@ public final class WorkloadNetworkVMGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkVMGroupProperties model = - BinaryData - .fromString( - "{\"displayName\":\"zfoqouicybxar\",\"members\":[\"zuf\",\"x\",\"iqopidoamciod\",\"khazxkhnzbonlwn\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":8928756986200818231}") - .toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("zfoqouicybxar", model.displayName()); - Assertions.assertEquals("zuf", model.members().get(0)); - Assertions.assertEquals(8928756986200818231L, model.revision()); + WorkloadNetworkVMGroupProperties model = BinaryData.fromString( + "{\"displayName\":\"fvhqc\",\"members\":[\"lvpnpp\",\"uflrwd\",\"hdlxyjrxsagafcn\",\"hgw\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":8610358802606955668}") + .toObject(WorkloadNetworkVMGroupProperties.class); + Assertions.assertEquals("fvhqc", model.displayName()); + Assertions.assertEquals("lvpnpp", model.members().get(0)); + Assertions.assertEquals(8610358802606955668L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupProperties model = - new WorkloadNetworkVMGroupProperties() - .withDisplayName("zfoqouicybxar") - .withMembers(Arrays.asList("zuf", "x", "iqopidoamciod", "khazxkhnzbonlwn")) - .withRevision(8928756986200818231L); + WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("fvhqc") + .withMembers(Arrays.asList("lvpnpp", "uflrwd", "hdlxyjrxsagafcn", "hgw")) + .withRevision(8610358802606955668L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("zfoqouicybxar", model.displayName()); - Assertions.assertEquals("zuf", model.members().get(0)); - Assertions.assertEquals(8928756986200818231L, model.revision()); + Assertions.assertEquals("fvhqc", model.displayName()); + Assertions.assertEquals("lvpnpp", model.members().get(0)); + Assertions.assertEquals(8610358802606955668L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupUpdateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupUpdateTests.java new file mode 100644 index 0000000000000..4b431e59e46aa --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupUpdateTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkVMGroupUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkVMGroupUpdate model = BinaryData.fromString( + "{\"properties\":{\"displayName\":\"vkcvqvpkeqd\",\"members\":[\"rhvoods\",\"tbobz\",\"opcjwvnhd\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":5739282275631592969}}") + .toObject(WorkloadNetworkVMGroupUpdate.class); + Assertions.assertEquals("vkcvqvpkeqd", model.displayName()); + Assertions.assertEquals("rhvoods", model.members().get(0)); + Assertions.assertEquals(5739282275631592969L, model.revision()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkloadNetworkVMGroupUpdate model = new WorkloadNetworkVMGroupUpdate().withDisplayName("vkcvqvpkeqd") + .withMembers(Arrays.asList("rhvoods", "tbobz", "opcjwvnhd")) + .withRevision(5739282275631592969L); + model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupUpdate.class); + Assertions.assertEquals("vkcvqvpkeqd", model.displayName()); + Assertions.assertEquals("rhvoods", model.members().get(0)); + Assertions.assertEquals(5739282275631592969L, model.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java deleted file mode 100644 index 456045d18334d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupsList; - -public final class WorkloadNetworkVMGroupsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVMGroupsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"ca\",\"members\":[\"bvtvudutncormr\",\"xqtvcofu\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":2516318057912167047},\"id\":\"bgdknnqv\",\"name\":\"aznqntoru\",\"type\":\"sgsahmkycgr\"}],\"nextLink\":\"wjue\"}") - .toObject(WorkloadNetworkVMGroupsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVMGroupsList model = new WorkloadNetworkVMGroupsList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.java index c032150d5c677..a72b433411828 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,19 +11,9 @@ public final class WorkloadNetworkVirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkVirtualMachineInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"slfaoqzpiyyl\",\"vmType\":\"REGULAR\"},\"id\":\"nswhcc\",\"name\":\"ph\",\"type\":\"aivwitqscywu\"}") - .toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("slfaoqzpiyyl", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVirtualMachineInner model = - new WorkloadNetworkVirtualMachineInner().withDisplayName("slfaoqzpiyyl"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("slfaoqzpiyyl", model.displayName()); + WorkloadNetworkVirtualMachineInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"dckcbc\",\"vmType\":\"REGULAR\"},\"id\":\"jxgciqibrh\",\"name\":\"sxsdqrhzoymibm\",\"type\":\"qyib\"}") + .toObject(WorkloadNetworkVirtualMachineInner.class); + Assertions.assertEquals("dckcbc", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineListResultTests.java new file mode 100644 index 0000000000000..e352a0de1e7fb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineListResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachineListResult; +import org.junit.jupiter.api.Assertions; + +public final class WorkloadNetworkVirtualMachineListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkloadNetworkVirtualMachineListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"utwu\",\"vmType\":\"SERVICE\"},\"id\":\"pkhjwni\",\"name\":\"qsluicp\",\"type\":\"ggkzzlvmbmpa\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"vuefywsbpfvmwyh\",\"vmType\":\"REGULAR\"},\"id\":\"yftaakcpw\",\"name\":\"yzvqt\",\"type\":\"nubexk\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"ondjmq\",\"vmType\":\"EDGE\"},\"id\":\"pomgkopkwhojvp\",\"name\":\"jqg\",\"type\":\"ysmocmbqfqvmkcxo\"}],\"nextLink\":\"pvhelxprg\"}") + .toObject(WorkloadNetworkVirtualMachineListResult.class); + Assertions.assertEquals("utwu", model.value().get(0).displayName()); + Assertions.assertEquals("pvhelxprg", model.nextLink()); + } +} 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 index b9de3564195ec..4d351716af0ec 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; @@ -11,18 +11,9 @@ public final class WorkloadNetworkVirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkVirtualMachineProperties model = - BinaryData - .fromString("{\"displayName\":\"woluhczbwemhair\",\"vmType\":\"REGULAR\"}") - .toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("woluhczbwemhair", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVirtualMachineProperties model = - new WorkloadNetworkVirtualMachineProperties().withDisplayName("woluhczbwemhair"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("woluhczbwemhair", model.displayName()); + WorkloadNetworkVirtualMachineProperties model = BinaryData + .fromString("{\"provisioningState\":\"Failed\",\"displayName\":\"luszdtmhrkwof\",\"vmType\":\"REGULAR\"}") + .toObject(WorkloadNetworkVirtualMachineProperties.class); + Assertions.assertEquals("luszdtmhrkwof", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java new file mode 100644 index 0000000000000..736bb08283a65 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVirtualMachinesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"kfkyjp\",\"vmType\":\"EDGE\"},\"id\":\"pssdfppyogtie\",\"name\":\"ujtv\",\"type\":\"zkc\"}"; + + 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.workloadNetworkVirtualMachines() + .getWithResponse("iwhxqszdtmaajq", "huxy", "rjvmtygjbmzyosp", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("kfkyjp", response.displayName()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests.java new file mode 100644 index 0000000000000..2cf2e2dc3167b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests { + @Test + public void testListByWorkloadNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"zytqjtwhauunfpr\",\"vmType\":\"SERVICE\"},\"id\":\"tlxs\",\"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)); + + PagedIterable response = manager.workloadNetworkVirtualMachines() + .listByWorkloadNetwork("smfcttuxuuyilfl", "oiquvrehmrnjhvs", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("zytqjtwhauunfpr", response.iterator().next().displayName()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java deleted file mode 100644 index 25e8f7c445eb0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachinesList; - -public final class WorkloadNetworkVirtualMachinesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVirtualMachinesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"szzcmrvexztv\",\"vmType\":\"SERVICE\"},\"id\":\"gsfraoyzkoow\",\"name\":\"lmnguxaw\",\"type\":\"aldsy\"},{\"properties\":{\"displayName\":\"imerqfobwyznk\",\"vmType\":\"REGULAR\"},\"id\":\"utwpfhp\",\"name\":\"gmhrskdsnfdsdoak\",\"type\":\"tdlmkkzevd\"},{\"properties\":{\"displayName\":\"wpusdsttwvogv\",\"vmType\":\"REGULAR\"},\"id\":\"jdcngqqm\",\"name\":\"akufgmjz\",\"type\":\"wr\"},{\"properties\":{\"displayName\":\"twaenuuzko\",\"vmType\":\"EDGE\"},\"id\":\"inrfdwoyu\",\"name\":\"hziuiefozbhdms\",\"type\":\"l\"}],\"nextLink\":\"qhoftrmaequiah\"}") - .toObject(WorkloadNetworkVirtualMachinesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVirtualMachinesList model = new WorkloadNetworkVirtualMachinesList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVirtualMachinesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java new file mode 100644 index 0000000000000..ceeaa34347225 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVmGroupsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"ctbrxkjzwrgxffm\",\"members\":[\"wfbkgozxwo\",\"dby\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":8453153522791825173},\"id\":\"apxbi\",\"name\":\"gn\",\"type\":\"gjkn\"}"; + + 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.workloadNetworkVmGroups() + .define("xuckpggqoweyir") + .withExistingPrivateCloud("hdenxaulk", "akdkifmjnnawtqab") + .withDisplayName("isngwflqqmpizru") + .withMembers(Arrays.asList("qxpxiwfcngjsaa", "iixtmkzj")) + .withRevision(8321849396779286295L) + .create(); + + Assertions.assertEquals("ctbrxkjzwrgxffm", response.displayName()); + Assertions.assertEquals("wfbkgozxwo", response.members().get(0)); + Assertions.assertEquals(8453153522791825173L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java new file mode 100644 index 0000000000000..39c77b84dcd7f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVmGroupsDeleteMockTests { + @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.workloadNetworkVmGroups().delete("ytunlbfjkwr", "snkq", "hsyrqunj", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java new file mode 100644 index 0000000000000..7613cee371dd2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVmGroupsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"displayName\":\"qeqala\",\"members\":[\"agunbtgfebw\",\"nbmhyree\"],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":1466138960999741534},\"id\":\"qmjxlyyzglgouwtl\",\"name\":\"jjyuojqtobax\",\"type\":\"j\"}"; + + 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.workloadNetworkVmGroups() + .getWithResponse("xqdlyrtltlapr", "tz", "atbhjmznn", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("qeqala", response.displayName()); + Assertions.assertEquals("agunbtgfebw", response.members().get(0)); + Assertions.assertEquals(1466138960999741534L, response.revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests.java new file mode 100644 index 0000000000000..67cca8c08652b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests { + @Test + public void testListByWorkloadNetwork() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"displayName\":\"ky\",\"members\":[\"cjxgrytf\",\"pcycilrmcaykg\",\"noxuztrksx\",\"pndfcpfnznt\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":7745207921111221845},\"id\":\"rxuzvoam\",\"name\":\"tcqiosmg\",\"type\":\"zah\"}]}"; + + 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.workloadNetworkVmGroups() + .listByWorkloadNetwork("pnpbswveflocc", "rmozihmipgawt", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ky", response.iterator().next().displayName()); + Assertions.assertEquals("cjxgrytf", response.iterator().next().members().get(0)); + Assertions.assertEquals(7745207921111221845L, response.iterator().next().revision()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java deleted file mode 100644 index b098ddb14a3d9..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateDhcpMockTests { - @Test - public void testCreateDhcp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"fuughtuqfec\",\"segments\":[\"ygtuhx\"],\"provisioningState\":\"Succeeded\",\"revision\":8894754548360108244},\"id\":\"wmrswnjlxuzrh\",\"name\":\"pusxjb\",\"type\":\"qehgpd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDhcp response = - manager - .workloadNetworks() - .defineDhcp("ixjawrtm") - .withExistingPrivateCloud("opionszon", "pngajin") - .withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("myccx").withRevision(6733942550770793710L)) - .create(); - - Assertions.assertEquals("fuughtuqfec", response.properties().displayName()); - Assertions.assertEquals(8894754548360108244L, response.properties().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java deleted file mode 100644 index ebe4a3f6ccd9c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateDnsServiceMockTests { - @Test - public void testCreateDnsService() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"fdlpukhpyr\",\"dnsServiceIp\":\"izjcpeog\",\"defaultDnsZone\":\"nmg\",\"fqdnZones\":[\"uxddbhfh\",\"fpazjzoywjxhpd\",\"lontacnpq\",\"tehtuevrhrljyoog\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":809684715358738696},\"id\":\"bsre\",\"name\":\"rfqkfuar\",\"type\":\"nlvhhtklnvnafvv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDnsService response = - manager - .workloadNetworks() - .defineDnsService("p") - .withExistingPrivateCloud("oxhlw", "tsjgqrsx") - .withDisplayName("u") - .withDnsServiceIp("nchrszizoyu") - .withDefaultDnsZone("yetnd") - .withFqdnZones(Arrays.asList("qyggagfl", "lgmtrwahzjmucf", "byrplrohkpig", "fusuckzmkwklsno")) - .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(6054442894219666255L) - .create(); - - Assertions.assertEquals("fdlpukhpyr", response.displayName()); - Assertions.assertEquals("izjcpeog", response.dnsServiceIp()); - Assertions.assertEquals("nmg", response.defaultDnsZone()); - Assertions.assertEquals("uxddbhfh", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.logLevel()); - Assertions.assertEquals(809684715358738696L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java deleted file mode 100644 index 6dfae89b2ca17..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateDnsZoneMockTests { - @Test - public void testCreateDnsZone() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"yo\",\"domain\":[\"rouuxvnsasbcry\",\"o\",\"izrxklob\",\"xnazpmkml\"],\"dnsServerIps\":[\"vfxzopjh\",\"zxlioh\",\"d\",\"dtfgxqbawpcbb\"],\"sourceIp\":\"qcy\",\"dnsServices\":3888945371660163872,\"provisioningState\":\"Succeeded\",\"revision\":1167026751673523681},\"id\":\"icdhz\",\"name\":\"dyb\",\"type\":\"wgbdvibidmhmwffp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDnsZone response = - manager - .workloadNetworks() - .defineDnsZone("minqcym") - .withExistingPrivateCloud("yfedevjbo", "lcqxypokk") - .withDisplayName("gn") - .withDomain(Arrays.asList("x", "wuninv")) - .withDnsServerIps(Arrays.asList("chaqdtvqec", "qct")) - .withSourceIp("xdtddmflhuytxzv") - .withDnsServices(3117767040904980283L) - .withRevision(6355503721954410956L) - .create(); - - Assertions.assertEquals("yo", response.displayName()); - Assertions.assertEquals("rouuxvnsasbcry", response.domain().get(0)); - Assertions.assertEquals("vfxzopjh", response.dnsServerIps().get(0)); - Assertions.assertEquals("qcy", response.sourceIp()); - Assertions.assertEquals(3888945371660163872L, response.dnsServices()); - Assertions.assertEquals(1167026751673523681L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java deleted file mode 100644 index b9531b2869dcb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreatePortMirroringMockTests { - @Test - public void testCreatePortMirroring() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"lbnseqac\",\"direction\":\"INGRESS\",\"source\":\"ilguooqjagmditg\",\"destination\":\"iookjbsah\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2010422282594274461},\"id\":\"qacsl\",\"name\":\"otoebnfxofv\",\"type\":\"jkgd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkPortMirroring response = - manager - .workloadNetworks() - .definePortMirroring("bnwgfmxj") - .withExistingPrivateCloud("hzjqatucoige", "xncnwfe") - .withDisplayName("bjb") - .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("gtdysnaqu") - .withDestination("qbctqha") - .withRevision(7064502112567095656L) - .create(); - - Assertions.assertEquals("lbnseqac", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.direction()); - Assertions.assertEquals("ilguooqjagmditg", response.source()); - Assertions.assertEquals("iookjbsah", response.destination()); - Assertions.assertEquals(2010422282594274461L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java deleted file mode 100644 index 44957ce54ee99..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreatePublicIpMockTests { - @Test - public void testCreatePublicIp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"qepvufhbzeh\",\"numberOfPublicIPs\":5833531132490364986,\"publicIPBlock\":\"hnl\",\"provisioningState\":\"Succeeded\"},\"id\":\"bldxeaclgscho\",\"name\":\"imkrsrrmouc\",\"type\":\"ofldpuviyfcaa\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkPublicIp response = - manager - .workloadNetworks() - .definePublicIp("oxoyyukp") - .withExistingPrivateCloud("fmuvapckccr", "vwe") - .withDisplayName("mmoiroqboshbra") - .withNumberOfPublicIPs(7328880240070265535L) - .create(); - - Assertions.assertEquals("qepvufhbzeh", response.displayName()); - Assertions.assertEquals(5833531132490364986L, response.numberOfPublicIPs()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java deleted file mode 100644 index 2eb98cbef43de..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateSegmentsMockTests { - @Test - public void testCreateSegments() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"bowsepd\",\"connectedGateway\":\"kmtdher\",\"subnet\":{\"dhcpRanges\":[\"c\",\"uahokq\",\"obkauxofsh\"],\"gatewayAddress\":\"hwpnulaiywzejywh\"},\"portVif\":[{\"portName\":\"ojpllndnpdwrpqaf\"},{\"portName\":\"ug\"},{\"portName\":\"n\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":5446103695513333706},\"id\":\"pococtfjgt\",\"name\":\"xrjvzuyturmlm\",\"type\":\"owolbaui\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkSegment response = - manager - .workloadNetworks() - .defineSegments("xoe") - .withExistingPrivateCloud("pzoyhlfbcg", "gcl") - .withDisplayName("njipnwjfujql") - .withConnectedGateway("cbahhpzpofoiy") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("ilkmk", "holvdn", "viauogphua")) - .withGatewayAddress("vtiukyef")) - .withRevision(1819806073329112411L) - .create(); - - Assertions.assertEquals("bowsepd", response.displayName()); - Assertions.assertEquals("kmtdher", response.connectedGateway()); - Assertions.assertEquals("c", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("hwpnulaiywzejywh", response.subnet().gatewayAddress()); - Assertions.assertEquals(5446103695513333706L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java deleted file mode 100644 index 87a0dc0e5620c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateVMGroupMockTests { - @Test - public void testCreateVMGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"zyjq\",\"members\":[\"wkpqhjpenuygbq\",\"qqekewvnqvcdlgu\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":6066393981630309590},\"id\":\"nlaxpunjqikcz\",\"name\":\"vitac\",\"type\":\"xmfcsserxhtv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkVMGroup response = - manager - .workloadNetworks() - .defineVMGroup("m") - .withExistingPrivateCloud("razftxejwabmdujt", "vcopex") - .withDisplayName("buhhlkyqlt") - .withMembers(Arrays.asList("ogtu", "kffdjktsys")) - .withRevision(1114803493705852577L) - .create(); - - Assertions.assertEquals("zyjq", response.displayName()); - Assertions.assertEquals("wkpqhjpenuygbq", response.members().get(0)); - Assertions.assertEquals(6066393981630309590L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java deleted file mode 100644 index bfd2257ed8b9e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteDhcpMockTests { - @Test - public void testDeleteDhcp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteDhcp("nh", "vsqltnzoibgsxg", "xfyqonmpqoxwdo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java deleted file mode 100644 index 33b8aee856893..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteDnsServiceMockTests { - @Test - public void testDeleteDnsService() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteDnsService("zqaclna", "xbiygnugjknfsmf", "ttuxuuyilflqoiqu", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java deleted file mode 100644 index bccd7d4a6a787..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteDnsZoneMockTests { - @Test - public void testDeleteDnsZone() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteDnsZone("hr", "mqgjsxvpq", "bfrmbodthsqqgvri", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java deleted file mode 100644 index cc8d1442935b8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeletePortMirroringMockTests { - @Test - public void testDeletePortMirroring() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workloadNetworks().deletePortMirroring("tixo", "ffqyinlj", "epqw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java deleted file mode 100644 index c615d7c2aa560..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeletePublicIpMockTests { - @Test - public void testDeletePublicIp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workloadNetworks().deletePublicIp("pqwjedm", "rrxxgewpktvq", "lkm", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java deleted file mode 100644 index 352e2ac726cee..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteSegmentMockTests { - @Test - public void testDeleteSegment() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteSegment("znmmaxrizkzobgo", "xlhslnel", "ieixynllxe", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java deleted file mode 100644 index 545fda2019c5b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteVMGroupMockTests { - @Test - public void testDeleteVMGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteVMGroup("tgzpnpb", "wvefloccsrmoz", "hmipgawtxxpkyjc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java deleted file mode 100644 index 32afb88007d46..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetDhcpWithResponseMockTests { - @Test - public void testGetDhcpWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"mwabzxrvxc\",\"segments\":[\"sphaivmxyasflvg\",\"gzwywak\",\"ihknsmjbl\"],\"provisioningState\":\"Deleting\",\"revision\":608023064762005271},\"id\":\"ymzotqyryuzcbmq\",\"name\":\"vxmvw\",\"type\":\"gtayxonsupeujlz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDhcp response = - manager - .workloadNetworks() - .getDhcpWithResponse("xm", "f", "kqscazuawxtzx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mwabzxrvxc", response.properties().displayName()); - Assertions.assertEquals(608023064762005271L, response.properties().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java deleted file mode 100644 index 51c78f426ed4f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetDnsServiceWithResponseMockTests { - @Test - public void testGetDnsServiceWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"izruwnpqxpxiwfc\",\"dnsServiceIp\":\"jsa\",\"defaultDnsZone\":\"iixtmkzj\",\"fqdnZones\":[\"iirhgfgrwsd\",\"gratzvzbglbyvict\",\"tbrxkjz\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":5705580041199426767},\"id\":\"wfbkgozxwo\",\"name\":\"dby\",\"type\":\"p\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDnsService response = - manager - .workloadNetworks() - .getDnsServiceWithResponse("wey", "rdhlis", "gwflq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("izruwnpqxpxiwfc", response.displayName()); - Assertions.assertEquals("jsa", response.dnsServiceIp()); - Assertions.assertEquals("iixtmkzj", response.defaultDnsZone()); - Assertions.assertEquals("iirhgfgrwsd", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.logLevel()); - Assertions.assertEquals(5705580041199426767L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java deleted file mode 100644 index 3c3ee2296349d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetDnsZoneWithResponseMockTests { - @Test - public void testGetDnsZoneWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"dibgqjxgpnrhgov\",\"domain\":[\"ik\",\"mhha\"],\"dnsServerIps\":[\"rmzvupo\",\"qzdfuydzvkfvxcn\",\"mx\"],\"sourceIp\":\"swokm\",\"dnsServices\":1866158858475312478,\"provisioningState\":\"Succeeded\",\"revision\":6332875207430967251},\"id\":\"em\",\"name\":\"qkzszuwiwtglxxh\",\"type\":\"jfpgpicrmn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDnsZone response = - manager - .workloadNetworks() - .getDnsZoneWithResponse("niypfpubcpzg", "xtiv", "j", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dibgqjxgpnrhgov", response.displayName()); - Assertions.assertEquals("ik", response.domain().get(0)); - Assertions.assertEquals("rmzvupo", response.dnsServerIps().get(0)); - Assertions.assertEquals("swokm", response.sourceIp()); - Assertions.assertEquals(1866158858475312478L, response.dnsServices()); - Assertions.assertEquals(6332875207430967251L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java deleted file mode 100644 index af72a4c4829db..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetGatewayWithResponseMockTests { - @Test - public void testGetGatewayWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"spofapvuhry\",\"path\":\"iofrzgbzjedmstk\"},\"id\":\"nlvxbcuii\",\"name\":\"nktwfansnvpdibmi\",\"type\":\"ostbzbkiwb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkGateway response = - manager - .workloadNetworks() - .getGatewayWithResponse("gbqi", "kxkbsazgakgacyr", "m", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("spofapvuhry", response.displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java deleted file mode 100644 index 205d6cace95ec..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetPortMirroringWithResponseMockTests { - @Test - public void testGetPortMirroringWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"tf\",\"direction\":\"EGRESS\",\"source\":\"cg\",\"destination\":\"o\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":101208691571516004},\"id\":\"dewemxswv\",\"name\":\"uun\",\"type\":\"zjgehkfkim\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkPortMirroring response = - manager - .workloadNetworks() - .getPortMirroringWithResponse("ffmbmxzjrg", "wwp", "jx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tf", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); - Assertions.assertEquals("cg", response.source()); - Assertions.assertEquals("o", response.destination()); - Assertions.assertEquals(101208691571516004L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java deleted file mode 100644 index 3768c7d8929f4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetPublicIpWithResponseMockTests { - @Test - public void testGetPublicIpWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"cuqudtcvclxy\",\"numberOfPublicIPs\":8353389332864775554,\"publicIPBlock\":\"gfabuiyjibuzphdu\",\"provisioningState\":\"Failed\"},\"id\":\"iknp\",\"name\":\"oxgjiuqhibt\",\"type\":\"z\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkPublicIp response = - manager - .workloadNetworks() - .getPublicIpWithResponse("fotang", "fhnykzcugs", "vxwlmzqwmvtxnj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cuqudtcvclxy", response.displayName()); - Assertions.assertEquals(8353389332864775554L, response.numberOfPublicIPs()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java deleted file mode 100644 index 24c53028ba36d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetSegmentWithResponseMockTests { - @Test - public void testGetSegmentWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"btqwpwyawbzas\",\"connectedGateway\":\"ucljgkyexaoguya\",\"subnet\":{\"dhcpRanges\":[\"sdaultxij\",\"um\",\"qwazlnqnmcjngzq\",\"qxtbjwgnyf\"],\"gatewayAddress\":\"fzsvtuikzh\"},\"portVif\":[{\"portName\":\"lcfhmlrqryxy\"},{\"portName\":\"nzrdpsovwxz\"},{\"portName\":\"tgoe\"},{\"portName\":\"bbabp\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":9143914633435645680},\"id\":\"ntjlr\",\"name\":\"gjkskyrioov\",\"type\":\"idsxwaabzmifry\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkSegment response = - manager - .workloadNetworks() - .getSegmentWithResponse("kmfx", "pjwogqqno", "pud", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("btqwpwyawbzas", response.displayName()); - Assertions.assertEquals("ucljgkyexaoguya", response.connectedGateway()); - Assertions.assertEquals("sdaultxij", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("fzsvtuikzh", response.subnet().gatewayAddress()); - Assertions.assertEquals(9143914633435645680L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java deleted file mode 100644 index 0d324b29c0f3d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetVMGroupWithResponseMockTests { - @Test - public void testGetVMGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"znvfbycjsxjww\",\"members\":[\"vumwmxqh\"],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":2852193462165954889},\"id\":\"dsehaohdjhhflzo\",\"name\":\"xcoxpelnjet\",\"type\":\"gltsxoat\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkVMGroup response = - manager - .workloadNetworks() - .getVMGroupWithResponse("rqbsmswziq", "fuhok", "ruswhv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("znvfbycjsxjww", response.displayName()); - Assertions.assertEquals("vumwmxqh", response.members().get(0)); - Assertions.assertEquals(2852193462165954889L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java deleted file mode 100644 index 042f604b7dcca..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetVirtualMachineWithResponseMockTests { - @Test - public void testGetVirtualMachineWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"katbhjm\",\"vmType\":\"EDGE\"},\"id\":\"bsoqeqala\",\"name\":\"vlagun\",\"type\":\"tgfebwln\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkVirtualMachine response = - manager - .workloadNetworks() - .getVirtualMachineWithResponse("tcqiosmg", "zah", "xqdlyrtltlapr", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("katbhjm", response.displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.java index e89b7625a9947..b549f0458ede3 100644 --- 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 @@ -1,67 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.avs.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.avs.AvsManager; import com.azure.resourcemanager.avs.models.WorkloadNetwork; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class WorkloadNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"wboxjumvqqo\",\"name\":\"ihrraiouaub\",\"type\":\"jtlo\"}"; - String responseStr = "{\"id\":\"qxeysko\",\"name\":\"qzinkfkbg\",\"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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + WorkloadNetwork response = manager.workloadNetworks() + .getWithResponse("pchrqbn", "jrcg", com.azure.core.util.Context.NONE) + .getValue(); - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetwork response = - manager - .workloadNetworks() - .getWithResponse("zlmcmuapcvhdb", "v", WorkloadNetworkName.DEFAULT, com.azure.core.util.Context.NONE) - .getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudMockTests.java new file mode 100644 index 0000000000000..0a6bd3790cdbc --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworksListByPrivateCloudMockTests { + @Test + public void testListByPrivateCloud() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"yjdfqwmky\",\"name\":\"qufdvruzslzojh\",\"type\":\"ctfnmdxotng\"}]}"; + + 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() + .listByPrivateCloud("xfuojrn", "iflrzpasccbiu", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java deleted file mode 100644 index 0e99e94fba48e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListDhcpMockTests { - @Test - public void testListDhcp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"dwfmvigorqjb\",\"segments\":[\"h\",\"aglkafhon\",\"juj\"],\"provisioningState\":\"Updating\",\"revision\":6687319297826159039},\"id\":\"vcpopmxe\",\"name\":\"nwcl\",\"type\":\"yjede\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listDhcp("wcrojphslhcaw", "u", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dwfmvigorqjb", response.iterator().next().properties().displayName()); - Assertions.assertEquals(6687319297826159039L, response.iterator().next().properties().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java deleted file mode 100644 index c87e7fdf6fe3d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListDnsServicesMockTests { - @Test - public void testListDnsServices() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"qmjxlyyzglgouwtl\",\"dnsServiceIp\":\"jyuojqtobaxkjeyt\",\"defaultDnsZone\":\"lbfjkwr\",\"fqdnZones\":[\"kqbh\",\"y\",\"qunjqh\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":6042228062929468639},\"id\":\"kdk\",\"name\":\"fmjnnawtqa\",\"type\":\"pxuckpggq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listDnsServices("mhyreeudz", "av", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qmjxlyyzglgouwtl", response.iterator().next().displayName()); - Assertions.assertEquals("jyuojqtobaxkjeyt", response.iterator().next().dnsServiceIp()); - Assertions.assertEquals("lbfjkwr", response.iterator().next().defaultDnsZone()); - Assertions.assertEquals("kqbh", response.iterator().next().fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, response.iterator().next().logLevel()); - Assertions.assertEquals(6042228062929468639L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java deleted file mode 100644 index a4fb0b811b5cb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListDnsZonesMockTests { - @Test - public void testListDnsZones() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"w\",\"domain\":[\"unfprnjletlxs\",\"rpddouifamo\",\"aziynknlqwzdv\",\"iwhxqszdtmaajq\"],\"dnsServerIps\":[\"xylrjvmtygjbmz\",\"ospspshckf\",\"yjpmspbpssdfppyo\",\"tieyujtvczkcny\"],\"sourceIp\":\"x\",\"dnsServices\":4260501750556213722,\"provisioningState\":\"Failed\",\"revision\":3692931466815096213},\"id\":\"nkvxlxpaglqi\",\"name\":\"bgkc\",\"type\":\"khpzvuqdflv\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listDnsZones("rehmr", "jhvsujztczyt", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("w", response.iterator().next().displayName()); - Assertions.assertEquals("unfprnjletlxs", response.iterator().next().domain().get(0)); - Assertions.assertEquals("xylrjvmtygjbmz", response.iterator().next().dnsServerIps().get(0)); - Assertions.assertEquals("x", response.iterator().next().sourceIp()); - Assertions.assertEquals(4260501750556213722L, response.iterator().next().dnsServices()); - Assertions.assertEquals(3692931466815096213L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java deleted file mode 100644 index 68d8ce0c2cae0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListGatewaysMockTests { - @Test - public void testListGateways() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"mwwinhehfqpofv\",\"path\":\"cblembnkbwv\"},\"id\":\"vxkdivqihebwtswb\",\"name\":\"uwfmduragegizvc\",\"type\":\"felisdjub\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listGateways("dbxiqx", "iiqbi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mwwinhehfqpofv", response.iterator().next().displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java deleted file mode 100644 index 23e185e6756c5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetwork; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"jeokbzefezrxccz\",\"name\":\"rtle\",\"type\":\"pqxbkwvzgnzvdf\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().list("owxeqocljmy", "vkzqk", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java deleted file mode 100644 index 23493c5338c77..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListPortMirroringMockTests { - @Test - public void testListPortMirroring() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"zelfwyfwl\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"etnpsihcl\",\"destination\":\"zvaylptrsqqw\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":7455956743778499737},\"id\":\"hcxwaxfewzjk\",\"name\":\"exfdeqvhpsylk\",\"type\":\"shk\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listPortMirroring("qnyophzfyls", "crpfbcunez", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zelfwyfwl", response.iterator().next().displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.iterator().next().direction()); - Assertions.assertEquals("etnpsihcl", response.iterator().next().source()); - Assertions.assertEquals("zvaylptrsqqw", response.iterator().next().destination()); - Assertions.assertEquals(7455956743778499737L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java deleted file mode 100644 index c1ed8904876dd..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListPublicIPsMockTests { - @Test - public void testListPublicIPs() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"vsg\",\"numberOfPublicIPs\":8376929795743898853,\"publicIPBlock\":\"fz\",\"provisioningState\":\"Failed\"},\"id\":\"uxmmkjsvthnwp\",\"name\":\"tekovmri\",\"type\":\"iattgplu\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listPublicIPs("bakclacjfrnxous", "au", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vsg", response.iterator().next().displayName()); - Assertions.assertEquals(8376929795743898853L, response.iterator().next().numberOfPublicIPs()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java deleted file mode 100644 index b0d201f1326c2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListSegmentsMockTests { - @Test - public void testListSegments() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"qhewj\",\"connectedGateway\":\"mcgsbostzelnd\",\"subnet\":{\"dhcpRanges\":[\"tmzlbiojlv\",\"hrbbpneqvcwwyy\",\"r\",\"ochpprpr\"],\"gatewayAddress\":\"mo\"},\"portVif\":[{\"portName\":\"ejnhlbkpb\"},{\"portName\":\"cpilj\"},{\"portName\":\"hzvechndbnwieho\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":3643909152585347696},\"id\":\"bwefqsfapaqtfer\",\"name\":\"q\",\"type\":\"ex\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listSegments("zdix", "mqpnoda", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qhewj", response.iterator().next().displayName()); - Assertions.assertEquals("mcgsbostzelnd", response.iterator().next().connectedGateway()); - Assertions.assertEquals("tmzlbiojlv", response.iterator().next().subnet().dhcpRanges().get(0)); - Assertions.assertEquals("mo", response.iterator().next().subnet().gatewayAddress()); - Assertions.assertEquals(3643909152585347696L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java deleted file mode 100644 index 5622f11427148..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListVMGroupsMockTests { - @Test - public void testListVMGroups() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"ds\",\"members\":[\"cobiegstmninwjiz\",\"i\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":1072358778361989846},\"id\":\"jjtbxqmuluxlxqz\",\"name\":\"nersb\",\"type\":\"cucrwnamikze\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listVMGroups("ixmonstshiyxg", "elfclducc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ds", response.iterator().next().displayName()); - Assertions.assertEquals("cobiegstmninwjiz", response.iterator().next().members().get(0)); - Assertions.assertEquals(1072358778361989846L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java deleted file mode 100644 index f587ed3562aec..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListVirtualMachinesMockTests { - @Test - public void testListVirtualMachines() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"xu\",\"vmType\":\"EDGE\"},\"id\":\"ksxwpnd\",\"name\":\"cpfnznthjtwkja\",\"type\":\"srxuzvoam\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .workloadNetworks() - .listVirtualMachines("cjxgrytf", "pcycilrmcaykg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xu", response.iterator().next().displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml new file mode 100644 index 0000000000000..aa86864d3dd48 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/vmware/Microsoft.AVS +commit: 3b5fb15f20638c38d14e0dc1e712171422e2fdbf +repo: Azure/azure-rest-api-specs +additionalDirectories: From 21b656488e587b16d823d72ba33a34fafd0a8857 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 5 Jun 2024 10:51:41 +0800 Subject: [PATCH 05/17] Update generate_utils.py --- eng/mgmt/automation/generate_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/mgmt/automation/generate_utils.py b/eng/mgmt/automation/generate_utils.py index 389053695a5ab..8a511acfd3440 100644 --- a/eng/mgmt/automation/generate_utils.py +++ b/eng/mgmt/automation/generate_utils.py @@ -337,7 +337,7 @@ def generate_typespec_project( try: url_match = re.match( - r"^https://github.com/(?P[^/]*/azure-rest-api-specs(-pr)?)/blob/(?P[^/]*)/(?P.*)/tspconfig.yaml$", + r"^https://github.com/(?P[^/]*/azure-rest-api-specs(-pr)?)/blob/(?P[0-9a-f]{40})/(?P.*)/tspconfig.yaml$", tsp_project, re.IGNORECASE, ) From a5d8bec7990fe5bf32bb6ee8187b3ce64170cc96 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 5 Jun 2024 11:16:29 +0800 Subject: [PATCH 06/17] regen --- .../azure/resourcemanager/avs/AvsManager.java | 14 +++---- .../resourcemanager/avs/fluent/AvsClient.java | 4 +- .../models/WorkloadNetworkPublicIpInner.java | 16 ++++---- .../WorkloadNetworkPublicIpProperties.java | 24 ++++++------ .../avs/implementation/AddonsClientImpl.java | 8 ++-- .../AuthorizationsClientImpl.java | 8 ++-- .../avs/implementation/AvsClientBuilder.java | 38 +++++++++---------- .../avs/implementation/AvsClientImpl.java | 14 +++---- .../implementation/CloudLinksClientImpl.java | 8 ++-- .../implementation/ClustersClientImpl.java | 8 ++-- .../implementation/DatastoresClientImpl.java | 8 ++-- .../GlobalReachConnectionsClientImpl.java | 8 ++-- .../HcxEnterpriseSitesClientImpl.java | 8 ++-- .../implementation/IscsiPathsClientImpl.java | 8 ++-- .../implementation/LocationsClientImpl.java | 8 ++-- .../implementation/OperationsClientImpl.java | 8 ++-- .../PlacementPoliciesClientImpl.java | 8 ++-- .../PrivateCloudsClientImpl.java | 8 ++-- .../ScriptCmdletsClientImpl.java | 8 ++-- .../ScriptExecutionsClientImpl.java | 8 ++-- .../ScriptPackagesClientImpl.java | 8 ++-- .../VirtualMachinesClientImpl.java | 8 ++-- ...adNetworkDhcpConfigurationsClientImpl.java | 8 ++-- .../WorkloadNetworkDnsServicesClientImpl.java | 8 ++-- .../WorkloadNetworkDnsZonesClientImpl.java | 8 ++-- .../WorkloadNetworkGatewaysClientImpl.java | 8 ++-- ...etworkPortMirroringProfilesClientImpl.java | 8 ++-- .../WorkloadNetworkPublicIpImpl.java | 4 +- .../WorkloadNetworkPublicIpsClientImpl.java | 8 ++-- .../WorkloadNetworkSegmentsClientImpl.java | 8 ++-- ...kloadNetworkVirtualMachinesClientImpl.java | 8 ++-- .../WorkloadNetworkVmGroupsClientImpl.java | 8 ++-- .../WorkloadNetworksClientImpl.java | 8 ++-- .../avs/models/WorkloadNetworkPublicIp.java | 6 +-- .../reflect-config.json | 4 +- ...orkloadNetworkPublicIpPropertiesTests.java | 14 +++---- .../tsp-location.yaml | 2 +- 37 files changed, 174 insertions(+), 174 deletions(-) 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 80e777bcadc1c..f024e7a0fb45b 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 @@ -23,10 +23,10 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.avs.fluent.AVSClient; +import com.azure.resourcemanager.avs.fluent.AvsClient; import com.azure.resourcemanager.avs.implementation.AddonsImpl; import com.azure.resourcemanager.avs.implementation.AuthorizationsImpl; -import com.azure.resourcemanager.avs.implementation.AVSClientBuilder; +import com.azure.resourcemanager.avs.implementation.AvsClientBuilder; import com.azure.resourcemanager.avs.implementation.CloudLinksImpl; import com.azure.resourcemanager.avs.implementation.ClustersImpl; import com.azure.resourcemanager.avs.implementation.DatastoresImpl; @@ -141,12 +141,12 @@ public final class AvsManager { private IscsiPaths iscsiPaths; - private final AVSClient clientObject; + private final AvsClient clientObject; private AvsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AVSClientBuilder().pipeline(httpPipeline) + this.clientObject = new AvsClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -675,12 +675,12 @@ public IscsiPaths iscsiPaths() { } /** - * Gets wrapped service client AVSClient providing direct access to the underlying auto-generated API + * Gets wrapped service client AvsClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. * - * @return Wrapped service client AVSClient. + * @return Wrapped service client AvsClient. */ - public AVSClient serviceClient() { + public AvsClient serviceClient() { return this.clientObject; } } 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 a5fb6b2d39c54..4eec7e4188bec 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 @@ -8,9 +8,9 @@ import java.time.Duration; /** - * The interface for AVSClient class. + * The interface for AvsClient class. */ -public interface AVSClient { +public interface AvsClient { /** * Gets Server parameter. * diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java index 48b6f2aced4f8..807d9b263d184 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java @@ -19,7 +19,7 @@ public final class WorkloadNetworkPublicIpInner extends ProxyResource { * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") - private WorkloadNetworkPublicIPProperties innerProperties; + private WorkloadNetworkPublicIpProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -38,7 +38,7 @@ public WorkloadNetworkPublicIpInner() { * * @return the innerProperties value. */ - private WorkloadNetworkPublicIPProperties innerProperties() { + private WorkloadNetworkPublicIpProperties innerProperties() { return this.innerProperties; } @@ -68,7 +68,7 @@ public String displayName() { */ public WorkloadNetworkPublicIpInner withDisplayName(String displayName) { if (this.innerProperties() == null) { - this.innerProperties = new WorkloadNetworkPublicIPProperties(); + this.innerProperties = new WorkloadNetworkPublicIpProperties(); } this.innerProperties().withDisplayName(displayName); return this; @@ -91,19 +91,19 @@ public Long numberOfPublicIPs() { */ public WorkloadNetworkPublicIpInner withNumberOfPublicIPs(Long numberOfPublicIPs) { if (this.innerProperties() == null) { - this.innerProperties = new WorkloadNetworkPublicIPProperties(); + this.innerProperties = new WorkloadNetworkPublicIpProperties(); } this.innerProperties().withNumberOfPublicIPs(numberOfPublicIPs); return this; } /** - * Get the publicIPBlock property: CIDR Block of the Public IP Block. + * Get the publicIpBlock property: CIDR Block of the Public IP Block. * - * @return the publicIPBlock value. + * @return the publicIpBlock value. */ - public String publicIPBlock() { - return this.innerProperties() == null ? null : this.innerProperties().publicIPBlock(); + public String publicIpBlock() { + return this.innerProperties() == null ? null : this.innerProperties().publicIpBlock(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java index 0372329057342..29adbe25b6541 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java @@ -12,7 +12,7 @@ * NSX Public IP Block Properties. */ @Fluent -public final class WorkloadNetworkPublicIPProperties { +public final class WorkloadNetworkPublicIpProperties { /* * Display name of the Public IP Block. */ @@ -29,7 +29,7 @@ public final class WorkloadNetworkPublicIPProperties { * CIDR Block of the Public IP Block. */ @JsonProperty(value = "publicIPBlock", access = JsonProperty.Access.WRITE_ONLY) - private String publicIPBlock; + private String publicIpBlock; /* * The provisioning state @@ -38,9 +38,9 @@ public final class WorkloadNetworkPublicIPProperties { private WorkloadNetworkPublicIpProvisioningState provisioningState; /** - * Creates an instance of WorkloadNetworkPublicIPProperties class. + * Creates an instance of WorkloadNetworkPublicIpProperties class. */ - public WorkloadNetworkPublicIPProperties() { + public WorkloadNetworkPublicIpProperties() { } /** @@ -56,9 +56,9 @@ public String displayName() { * Set the displayName property: Display name of the Public IP Block. * * @param displayName the displayName value to set. - * @return the WorkloadNetworkPublicIPProperties object itself. + * @return the WorkloadNetworkPublicIpProperties object itself. */ - public WorkloadNetworkPublicIPProperties withDisplayName(String displayName) { + public WorkloadNetworkPublicIpProperties withDisplayName(String displayName) { this.displayName = displayName; return this; } @@ -76,20 +76,20 @@ public Long numberOfPublicIPs() { * Set the numberOfPublicIPs property: Number of Public IPs requested. * * @param numberOfPublicIPs the numberOfPublicIPs value to set. - * @return the WorkloadNetworkPublicIPProperties object itself. + * @return the WorkloadNetworkPublicIpProperties object itself. */ - public WorkloadNetworkPublicIPProperties withNumberOfPublicIPs(Long numberOfPublicIPs) { + public WorkloadNetworkPublicIpProperties withNumberOfPublicIPs(Long numberOfPublicIPs) { this.numberOfPublicIPs = numberOfPublicIPs; return this; } /** - * Get the publicIPBlock property: CIDR Block of the Public IP Block. + * Get the publicIpBlock property: CIDR Block of the Public IP Block. * - * @return the publicIPBlock value. + * @return the publicIpBlock value. */ - public String publicIPBlock() { - return this.publicIPBlock; + public String publicIpBlock() { + return this.publicIpBlock; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java index 1b94910782953..32d84b3a5db0b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java @@ -50,24 +50,24 @@ public final class AddonsClientImpl implements AddonsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of AddonsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AddonsClientImpl(AVSClientImpl client) { + AddonsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(AddonsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientAddons to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientAddons to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientAddons") + @ServiceInterface(name = "AvsClientAddons") public interface AddonsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java index 59dbeb9a1d47e..61348d711891f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java @@ -50,25 +50,25 @@ public final class AuthorizationsClientImpl implements AuthorizationsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of AuthorizationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AuthorizationsClientImpl(AVSClientImpl client) { + AuthorizationsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(AuthorizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientAuthorizations to be used by the proxy service to perform + * The interface defining all the services for AvsClientAuthorizations to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientAuthorizati") + @ServiceInterface(name = "AvsClientAuthorizati") public interface AuthorizationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java index 5d8608b8f170e..3d5692da4e678 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java @@ -15,10 +15,10 @@ import java.time.Duration; /** - * A builder for creating a new instance of the AVSClientImpl type. + * A builder for creating a new instance of the AvsClientImpl type. */ -@ServiceClientBuilder(serviceClients = { AVSClientImpl.class }) -public final class AVSClientBuilder { +@ServiceClientBuilder(serviceClients = { AvsClientImpl.class }) +public final class AvsClientBuilder { /* * Server parameter */ @@ -28,9 +28,9 @@ public final class AVSClientBuilder { * Sets Server parameter. * * @param endpoint the endpoint value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder endpoint(String endpoint) { + public AvsClientBuilder endpoint(String endpoint) { this.endpoint = endpoint; return this; } @@ -44,9 +44,9 @@ public AVSClientBuilder endpoint(String endpoint) { * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder subscriptionId(String subscriptionId) { + public AvsClientBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public AVSClientBuilder subscriptionId(String subscriptionId) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder environment(AzureEnvironment environment) { + public AvsClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public AVSClientBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder pipeline(HttpPipeline pipeline) { + public AvsClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public AVSClientBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public AvsClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public AVSClientBuilder defaultPollInterval(Duration defaultPollInterval) { * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public AvsClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AVSClientImpl with the provided parameters. + * Builds an instance of AvsClientImpl with the provided parameters. * - * @return an instance of AVSClientImpl. + * @return an instance of AvsClientImpl. */ - public AVSClientImpl buildClient() { + public AvsClientImpl buildClient() { AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) ? pipeline @@ -130,7 +130,7 @@ public AVSClientImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - AVSClientImpl client = new AVSClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, + AvsClientImpl client = new AvsClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.endpoint, this.subscriptionId); return client; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index fab383b1bb86f..00f3ebbaf8c8c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java @@ -25,7 +25,7 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.avs.fluent.AddonsClient; import com.azure.resourcemanager.avs.fluent.AuthorizationsClient; -import com.azure.resourcemanager.avs.fluent.AVSClient; +import com.azure.resourcemanager.avs.fluent.AvsClient; import com.azure.resourcemanager.avs.fluent.CloudLinksClient; import com.azure.resourcemanager.avs.fluent.ClustersClient; import com.azure.resourcemanager.avs.fluent.DatastoresClient; @@ -60,10 +60,10 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the AVSClientImpl type. + * Initializes a new instance of the AvsClientImpl type. */ -@ServiceClient(builder = AVSClientBuilder.class) -public final class AVSClientImpl implements AVSClient { +@ServiceClient(builder = AvsClientBuilder.class) +public final class AvsClientImpl implements AvsClient { /** * Server parameter. */ @@ -513,7 +513,7 @@ public IscsiPathsClient getIscsiPaths() { } /** - * Initializes an instance of AVSClient client. + * Initializes an instance of AvsClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. @@ -522,7 +522,7 @@ public IscsiPathsClient getIscsiPaths() { * @param endpoint Server parameter. * @param subscriptionId The ID of the target subscription. */ - AVSClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AvsClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; @@ -684,5 +684,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AVSClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AvsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java index 9af1e0b63c438..63d905c0276f6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java @@ -50,25 +50,25 @@ public final class CloudLinksClientImpl implements CloudLinksClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of CloudLinksClientImpl. * * @param client the instance of the service client containing this operation class. */ - CloudLinksClientImpl(AVSClientImpl client) { + CloudLinksClientImpl(AvsClientImpl client) { this.service = RestProxy.create(CloudLinksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientCloudLinks to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientCloudLinks to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientCloudLinks") + @ServiceInterface(name = "AvsClientCloudLinks") public interface CloudLinksService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java index 1e2dfc8cb7d47..48277960aa164 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java @@ -55,24 +55,24 @@ public final class ClustersClientImpl implements ClustersClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of ClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ClustersClientImpl(AVSClientImpl client) { + ClustersClientImpl(AvsClientImpl client) { this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientClusters to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientClusters to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientClusters") + @ServiceInterface(name = "AvsClientClusters") public interface ClustersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java index 36c7053e9b278..6f31493e4a943 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java @@ -50,25 +50,25 @@ public final class DatastoresClientImpl implements DatastoresClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of DatastoresClientImpl. * * @param client the instance of the service client containing this operation class. */ - DatastoresClientImpl(AVSClientImpl client) { + DatastoresClientImpl(AvsClientImpl client) { this.service = RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientDatastores to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientDatastores to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientDatastores") + @ServiceInterface(name = "AvsClientDatastores") public interface DatastoresService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java index 7c4d261ae7787..f3119d707d7b4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java @@ -50,25 +50,25 @@ public final class GlobalReachConnectionsClientImpl implements GlobalReachConnec /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of GlobalReachConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - GlobalReachConnectionsClientImpl(AVSClientImpl client) { + GlobalReachConnectionsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(GlobalReachConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientGlobalReachConnections to be used by the proxy service to + * The interface defining all the services for AvsClientGlobalReachConnections to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientGlobalReach") + @ServiceInterface(name = "AvsClientGlobalReach") public interface GlobalReachConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java index e7acbf2a01c08..ef18207c2d2cd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java @@ -45,25 +45,25 @@ public final class HcxEnterpriseSitesClientImpl implements HcxEnterpriseSitesCli /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of HcxEnterpriseSitesClientImpl. * * @param client the instance of the service client containing this operation class. */ - HcxEnterpriseSitesClientImpl(AVSClientImpl client) { + HcxEnterpriseSitesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(HcxEnterpriseSitesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientHcxEnterpriseSites to be used by the proxy service to + * The interface defining all the services for AvsClientHcxEnterpriseSites to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientHcxEnterpri") + @ServiceInterface(name = "AvsClientHcxEnterpri") public interface HcxEnterpriseSitesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java index 9e369d91d0d55..4fb4a26688464 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java @@ -50,25 +50,25 @@ public final class IscsiPathsClientImpl implements IscsiPathsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of IscsiPathsClientImpl. * * @param client the instance of the service client containing this operation class. */ - IscsiPathsClientImpl(AVSClientImpl client) { + IscsiPathsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(IscsiPathsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientIscsiPaths to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientIscsiPaths to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientIscsiPaths") + @ServiceInterface(name = "AvsClientIscsiPaths") public interface IscsiPathsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java index 28f575fd53fde..7492fa79aaf55 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java @@ -40,25 +40,25 @@ public final class LocationsClientImpl implements LocationsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of LocationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LocationsClientImpl(AVSClientImpl client) { + LocationsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientLocations to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientLocations to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientLocations") + @ServiceInterface(name = "AvsClientLocations") public interface LocationsService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java index 01c376a7ad96d..20ce4cd09da44 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java @@ -42,25 +42,25 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AVSClientImpl client) { + OperationsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientOperations to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientOperations to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientOperations") + @ServiceInterface(name = "AvsClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AVS/operations") 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 cfe871ee07067..be81b16a89bfc 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 @@ -53,25 +53,25 @@ public final class PlacementPoliciesClientImpl implements PlacementPoliciesClien /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of PlacementPoliciesClientImpl. * * @param client the instance of the service client containing this operation class. */ - PlacementPoliciesClientImpl(AVSClientImpl client) { + PlacementPoliciesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(PlacementPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientPlacementPolicies to be used by the proxy service to perform + * The interface defining all the services for AvsClientPlacementPolicies to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientPlacementPo") + @ServiceInterface(name = "AvsClientPlacementPo") public interface PlacementPoliciesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies") 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 a7b1adf801b87..cb9e9d9c5087e 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 @@ -55,25 +55,25 @@ public final class PrivateCloudsClientImpl implements PrivateCloudsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of PrivateCloudsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateCloudsClientImpl(AVSClientImpl client) { + PrivateCloudsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(PrivateCloudsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientPrivateClouds to be used by the proxy service to perform + * The interface defining all the services for AvsClientPrivateClouds to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientPrivateClou") + @ServiceInterface(name = "AvsClientPrivateClou") public interface PrivateCloudsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java index c0f3fd659a6ff..3ff6d4c77a314 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java @@ -42,25 +42,25 @@ public final class ScriptCmdletsClientImpl implements ScriptCmdletsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of ScriptCmdletsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ScriptCmdletsClientImpl(AVSClientImpl client) { + ScriptCmdletsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(ScriptCmdletsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientScriptCmdlets to be used by the proxy service to perform + * The interface defining all the services for AvsClientScriptCmdlets to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientScriptCmdle") + @ServiceInterface(name = "AvsClientScriptCmdle") public interface ScriptCmdletsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java index 8ecb8e9d8dcb8..0d96d3f8cd768 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java @@ -53,25 +53,25 @@ public final class ScriptExecutionsClientImpl implements ScriptExecutionsClient /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of ScriptExecutionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ScriptExecutionsClientImpl(AVSClientImpl client) { + ScriptExecutionsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(ScriptExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientScriptExecutions to be used by the proxy service to perform + * The interface defining all the services for AvsClientScriptExecutions to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientScriptExecu") + @ServiceInterface(name = "AvsClientScriptExecu") public interface ScriptExecutionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java index 9c2f499cbfdb5..668ad531a923d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java @@ -42,25 +42,25 @@ public final class ScriptPackagesClientImpl implements ScriptPackagesClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of ScriptPackagesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ScriptPackagesClientImpl(AVSClientImpl client) { + ScriptPackagesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(ScriptPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientScriptPackages to be used by the proxy service to perform + * The interface defining all the services for AvsClientScriptPackages to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientScriptPacka") + @ServiceInterface(name = "AvsClientScriptPacka") public interface ScriptPackagesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages") 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 e22968774af50..d787d8c1525d9 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 @@ -50,25 +50,25 @@ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of VirtualMachinesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualMachinesClientImpl(AVSClientImpl client) { + VirtualMachinesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(VirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientVirtualMachines to be used by the proxy service to perform + * The interface defining all the services for AvsClientVirtualMachines to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientVirtualMach") + @ServiceInterface(name = "AvsClientVirtualMach") public interface VirtualMachinesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java index f87162b155027..9d049507ea421 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java @@ -52,25 +52,25 @@ public final class WorkloadNetworkDhcpConfigurationsClientImpl implements Worklo /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworkDhcpConfigurationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworkDhcpConfigurationsClientImpl(AVSClientImpl client) { + WorkloadNetworkDhcpConfigurationsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworkDhcpConfigurationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworkDhcpConfigurations to be used by the proxy + * The interface defining all the services for AvsClientWorkloadNetworkDhcpConfigurations to be used by the proxy * service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworkDhcpConfigurationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java index 67f5d1f0b820c..f79e90e77ca62 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java @@ -52,25 +52,25 @@ public final class WorkloadNetworkDnsServicesClientImpl implements WorkloadNetwo /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworkDnsServicesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworkDnsServicesClientImpl(AVSClientImpl client) { + WorkloadNetworkDnsServicesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworkDnsServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworkDnsServices to be used by the proxy service + * The interface defining all the services for AvsClientWorkloadNetworkDnsServices to be used by the proxy service * to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworkDnsServicesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java index 4d24f0d637824..8ab76c5d7774f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java @@ -52,25 +52,25 @@ public final class WorkloadNetworkDnsZonesClientImpl implements WorkloadNetworkD /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworkDnsZonesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworkDnsZonesClientImpl(AVSClientImpl client) { + WorkloadNetworkDnsZonesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworkDnsZonesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworkDnsZones to be used by the proxy service to + * The interface defining all the services for AvsClientWorkloadNetworkDnsZones to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworkDnsZonesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java index 2f912dac0fe8e..0616bcaa72ae8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java @@ -42,25 +42,25 @@ public final class WorkloadNetworkGatewaysClientImpl implements WorkloadNetworkG /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworkGatewaysClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworkGatewaysClientImpl(AVSClientImpl client) { + WorkloadNetworkGatewaysClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworkGatewaysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworkGateways to be used by the proxy service to + * The interface defining all the services for AvsClientWorkloadNetworkGateways to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworkGatewaysService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java index 7b7dd26ec24d1..fdaecff68b497 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java @@ -54,25 +54,25 @@ public final class WorkloadNetworkPortMirroringProfilesClientImpl /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworkPortMirroringProfilesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworkPortMirroringProfilesClientImpl(AVSClientImpl client) { + WorkloadNetworkPortMirroringProfilesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworkPortMirroringProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworkPortMirroringProfiles to be used by the proxy + * The interface defining all the services for AvsClientWorkloadNetworkPortMirroringProfiles to be used by the proxy * service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworkPortMirroringProfilesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java index 238e2478d0a34..46cc8f70c039b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java @@ -45,8 +45,8 @@ public Long numberOfPublicIPs() { return this.innerModel().numberOfPublicIPs(); } - public String publicIPBlock() { - return this.innerModel().publicIPBlock(); + public String publicIpBlock() { + return this.innerModel().publicIpBlock(); } public WorkloadNetworkPublicIpProvisioningState provisioningState() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java index 0101e17446a77..706a01fe23135 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java @@ -50,25 +50,25 @@ public final class WorkloadNetworkPublicIpsClientImpl implements WorkloadNetwork /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworkPublicIpsClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworkPublicIpsClientImpl(AVSClientImpl client) { + WorkloadNetworkPublicIpsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworkPublicIpsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworkPublicIps to be used by the proxy service to + * The interface defining all the services for AvsClientWorkloadNetworkPublicIps to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworkPublicIpsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java index dc40de56598d3..d6f9e97590b68 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java @@ -52,25 +52,25 @@ public final class WorkloadNetworkSegmentsClientImpl implements WorkloadNetworkS /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworkSegmentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworkSegmentsClientImpl(AVSClientImpl client) { + WorkloadNetworkSegmentsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworkSegmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworkSegments to be used by the proxy service to + * The interface defining all the services for AvsClientWorkloadNetworkSegments to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworkSegmentsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java index 8339356774d8d..2f1f6c7580e75 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java @@ -42,25 +42,25 @@ public final class WorkloadNetworkVirtualMachinesClientImpl implements WorkloadN /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworkVirtualMachinesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworkVirtualMachinesClientImpl(AVSClientImpl client) { + WorkloadNetworkVirtualMachinesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworkVirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworkVirtualMachines to be used by the proxy + * The interface defining all the services for AvsClientWorkloadNetworkVirtualMachines to be used by the proxy * service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworkVirtualMachinesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java index c03d45a69658d..54fc7f28ad921 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java @@ -52,25 +52,25 @@ public final class WorkloadNetworkVmGroupsClientImpl implements WorkloadNetworkV /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworkVmGroupsClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworkVmGroupsClientImpl(AVSClientImpl client) { + WorkloadNetworkVmGroupsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworkVmGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworkVmGroups to be used by the proxy service to + * The interface defining all the services for AvsClientWorkloadNetworkVmGroups to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworkVmGroupsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") 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 d57b25920ec7c..2221184d35e95 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 @@ -42,25 +42,25 @@ public final class WorkloadNetworksClientImpl implements WorkloadNetworksClient /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworksClientImpl(AVSClientImpl client) { + WorkloadNetworksClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworks to be used by the proxy service to perform + * The interface defining all the services for AvsClientWorkloadNetworks to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworksService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java index a85485b4fb48f..13b6a50c67f19 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java @@ -55,11 +55,11 @@ public interface WorkloadNetworkPublicIp { Long numberOfPublicIPs(); /** - * Gets the publicIPBlock property: CIDR Block of the Public IP Block. + * Gets the publicIpBlock property: CIDR Block of the Public IP Block. * - * @return the publicIPBlock value. + * @return the publicIpBlock value. */ - String publicIPBlock(); + String publicIpBlock(); /** * Gets the provisioningState property: The provisioning state. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json index 2bdaba5e6ee60..070476c77b397 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json @@ -224,12 +224,12 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIPProperties", + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner", + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true 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 index 5f0e3c4a9ead2..e9e989ac76197 100644 --- 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 @@ -5,25 +5,25 @@ package com.azure.resourcemanager.avs.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIPProperties; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties; import org.junit.jupiter.api.Assertions; -public final class WorkloadNetworkPublicIPPropertiesTests { +public final class WorkloadNetworkPublicIpPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkPublicIPProperties model = BinaryData.fromString( + WorkloadNetworkPublicIpProperties model = BinaryData.fromString( "{\"displayName\":\"qwcsdbnwdcfhuc\",\"numberOfPublicIPs\":3846405596035643939,\"publicIPBlock\":\"vglsbjjca\",\"provisioningState\":\"Building\"}") - .toObject(WorkloadNetworkPublicIPProperties.class); + .toObject(WorkloadNetworkPublicIpProperties.class); Assertions.assertEquals("qwcsdbnwdcfhuc", model.displayName()); Assertions.assertEquals(3846405596035643939L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIPProperties model - = new WorkloadNetworkPublicIPProperties().withDisplayName("qwcsdbnwdcfhuc") + WorkloadNetworkPublicIpProperties model + = new WorkloadNetworkPublicIpProperties().withDisplayName("qwcsdbnwdcfhuc") .withNumberOfPublicIPs(3846405596035643939L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIPProperties.class); + model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); Assertions.assertEquals("qwcsdbnwdcfhuc", model.displayName()); Assertions.assertEquals(3846405596035643939L, model.numberOfPublicIPs()); } diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml index aa86864d3dd48..97862e92b038a 100644 --- a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/vmware/Microsoft.AVS -commit: 3b5fb15f20638c38d14e0dc1e712171422e2fdbf +commit: aee5dd18737efc2993c40fda54721f8ef690bb68 repo: Azure/azure-rest-api-specs additionalDirectories: From 2256b1a4f259e5d04df2048ea7d6de8a779c404b Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 5 Jun 2024 11:24:51 +0800 Subject: [PATCH 07/17] regen --- .../azure-resourcemanager-avs/CHANGELOG.md | 195 +++++++++--------- .../tsp-location.yaml | 2 +- 2 files changed, 94 insertions(+), 103 deletions(-) diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index ba8c0fa3b199a..079a5bfec0018 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.1 (2024-06-04) +## 1.2.0 (2024-06-05) - Azure Resource Manager Avs client library for Java. This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). @@ -78,100 +78,100 @@ #### `models.WorkloadNetworks` was modified -* `listDnsServices(java.lang.String,java.lang.String)` was removed -* `getDnsZoneById(java.lang.String)` was removed -* `listDhcp(java.lang.String,java.lang.String)` was removed -* `getPortMirroringWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getPublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deleteVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deleteSegment(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteDnsServiceById(java.lang.String)` was removed -* `getDnsServiceById(java.lang.String)` was removed -* `listSegments(java.lang.String,java.lang.String)` was removed -* `deleteDnsZoneById(java.lang.String)` was removed -* `listVirtualMachines(java.lang.String,java.lang.String)` was removed -* `getVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed -* `list(java.lang.String,java.lang.String)` was removed -* `getWithResponse(java.lang.String,java.lang.String,models.WorkloadNetworkName,com.azure.core.util.Context)` was removed -* `definePortMirroring(java.lang.String)` was removed -* `getPortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `listPortMirroring(java.lang.String,java.lang.String)` was removed -* `getDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getDnsZoneWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `listVirtualMachines(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getGateway(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deletePortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deleteSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `defineVMGroup(java.lang.String)` was removed -* `getSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed * `deleteDnsService(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deletePublicIpById(java.lang.String)` was removed -* `deletePortMirroringById(java.lang.String)` was removed -* `getVirtualMachineWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getPublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getSegment(java.lang.String,java.lang.String,java.lang.String)` was removed * `getVMGroupById(java.lang.String)` was removed -* `listDnsServices(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listDhcp(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getGateway(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getPortMirroringById(java.lang.String)` was removed +* `deleteDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getSegmentById(java.lang.String)` was removed * `deletePublicIp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getSegment(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getVMGroupWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDhcpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listPublicIPs(java.lang.String,java.lang.String)` was removed +* `deletePublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed * `getGatewayWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `defineDnsService(java.lang.String)` was removed -* `listPublicIPs(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getPublicIpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed * `deleteDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deletePublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsZoneByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsZoneById(java.lang.String)` was removed +* `deleteSegment(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsServiceById(java.lang.String)` was removed * `getPublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteVMGroupById(java.lang.String)` was removed -* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsServiceWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsZoneByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed * `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getPortMirroringWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listSegments(java.lang.String,java.lang.String)` was removed +* `listVMGroups(java.lang.String,java.lang.String)` was removed +* `get(java.lang.String,java.lang.String,models.WorkloadNetworkName)` was removed +* `getDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `definePublicIp(java.lang.String)` was removed * `deleteDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getPublicIpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deleteDnsZoneByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getPublicIpById(java.lang.String)` was removed -* `listGateways(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsZoneWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed * `getVirtualMachine(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getPortMirroringById(java.lang.String)` was removed -* `listDnsZones(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getSegmentWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getPortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deletePortMirroringById(java.lang.String)` was removed +* `deletePortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deletePublicIpById(java.lang.String)` was removed +* `definePortMirroring(java.lang.String)` was removed +* `deleteVMGroupById(java.lang.String)` was removed +* `listDhcp(java.lang.String,java.lang.String)` was removed +* `deleteDnsServiceById(java.lang.String)` was removed * `listVMGroups(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `defineDhcp(java.lang.String)` was removed +* `deleteSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsZoneById(java.lang.String)` was removed * `getDhcpById(java.lang.String)` was removed -* `listDnsZones(java.lang.String,java.lang.String)` was removed * `listGateways(java.lang.String,java.lang.String)` was removed -* `listSegments(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listVMGroups(java.lang.String,java.lang.String)` was removed +* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `listDnsZones(java.lang.String,java.lang.String)` was removed +* `defineSegments(java.lang.String)` was removed +* `getDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `defineVMGroup(java.lang.String)` was removed +* `listPortMirroring(java.lang.String,java.lang.String)` was removed +* `listPublicIPs(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listSegments(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed * `defineDnsZone(java.lang.String)` was removed -* `get(java.lang.String,java.lang.String,models.WorkloadNetworkName)` was removed +* `getPublicIpById(java.lang.String)` was removed +* `listDnsServices(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listPortMirroring(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `getPortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getVMGroupWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDhcpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listDnsZones(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsServiceWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deleteSegment(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deletePublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getVirtualMachineWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deleteDhcpById(java.lang.String)` was removed -* `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed +* `defineDnsService(java.lang.String)` was removed +* `listDhcp(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deleteSegmentById(java.lang.String)` was removed -* `listPublicIPs(java.lang.String,java.lang.String)` was removed -* `deletePublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed -* `defineSegments(java.lang.String)` was removed -* `definePublicIp(java.lang.String)` was removed -* `listPortMirroring(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getSegmentById(java.lang.String)` was removed +* `getWithResponse(java.lang.String,java.lang.String,models.WorkloadNetworkName,com.azure.core.util.Context)` was removed +* `listGateways(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `defineDhcp(java.lang.String)` was removed +* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listVirtualMachines(java.lang.String,java.lang.String)` was removed +* `list(java.lang.String,java.lang.String)` was removed +* `getSegmentWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listDnsServices(java.lang.String,java.lang.String)` was removed #### `models.Operation` was modified -* `java.lang.String origin()` -> `models.Origin origin()` * `properties()` was removed +* `java.lang.String origin()` -> `models.Origin origin()` #### `models.WorkloadNetworkDnsZone` was modified @@ -181,10 +181,6 @@ * `withName(java.lang.String)` was removed -#### `AvsManager` was modified - -* `fluent.AvsClient serviceClient()` -> `fluent.AVSClient serviceClient()` - #### `models.WorkloadNetworkDnsZone$Definition` was modified * `withDnsServices(java.lang.Long)` was removed @@ -194,18 +190,14 @@ * `withHosts(java.util.List)` was removed * `withClusterSize(java.lang.Integer)` was removed -#### `models.WorkloadNetworkPublicIp` was modified - -* `publicIpBlock()` was removed - #### `models.Addon$Update` was modified * `withProperties(models.AddonProperties)` was removed #### `models.WorkloadNetworkDhcpServer` was modified -* `java.lang.Long leaseTime()` -> `java.lang.Integer leaseTime()` * `withLeaseTime(java.lang.Long)` was removed +* `java.lang.Long leaseTime()` -> `java.lang.Integer leaseTime()` ### Features Added @@ -369,9 +361,9 @@ #### `models.WorkloadNetworks` was modified * `get(java.lang.String,java.lang.String)` was added +* `getWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added * `listByPrivateCloud(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added * `listByPrivateCloud(java.lang.String,java.lang.String)` was added -* `getWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added #### `models.Operation` was modified @@ -404,8 +396,8 @@ #### `models.ScriptPackage` was modified -* `provisioningState()` was added * `systemData()` was added +* `provisioningState()` was added #### `models.Addon` was modified @@ -413,8 +405,8 @@ #### `models.Datastore` was modified -* `systemData()` was added * `elasticSanVolume()` was added +* `systemData()` was added #### `models.WorkloadNetworkSegment` was modified @@ -440,16 +432,16 @@ #### `AvsManager` was modified -* `workloadNetworkPortMirroringProfiles()` was added -* `workloadNetworkVmGroups()` was added -* `workloadNetworkPublicIps()` was added -* `workloadNetworkDnsServices()` was added -* `workloadNetworkDnsZones()` was added * `workloadNetworkVirtualMachines()` was added +* `workloadNetworkDnsServices()` was added * `iscsiPaths()` was added -* `workloadNetworkGateways()` was added * `workloadNetworkDhcpConfigurations()` was added +* `workloadNetworkGateways()` was added +* `workloadNetworkVmGroups()` was added * `workloadNetworkSegments()` was added +* `workloadNetworkPortMirroringProfiles()` was added +* `workloadNetworkDnsZones()` was added +* `workloadNetworkPublicIps()` was added #### `models.AddonProperties` was modified @@ -462,8 +454,8 @@ #### `models.WorkloadNetwork` was modified -* `systemData()` was added * `provisioningState()` was added +* `systemData()` was added #### `models.WorkloadNetworkDnsZone$Definition` was modified @@ -473,10 +465,10 @@ * `clusterSize()` was added * `hosts()` was added -* `withVsanDatastoreName(java.lang.String)` was added -* `provisioningState()` was added * `clusterId()` was added +* `provisioningState()` was added * `vsanDatastoreName()` was added +* `withVsanDatastoreName(java.lang.String)` was added #### `models.VmHostPlacementPolicyProperties` was modified @@ -484,10 +476,10 @@ #### `models.PrivateCloudUpdate` was modified +* `withDnsZoneType(models.DnsZoneType)` was added * `sku()` was added -* `withSku(models.Sku)` was added * `dnsZoneType()` was added -* `withDnsZoneType(models.DnsZoneType)` was added +* `withSku(models.Sku)` was added #### `models.ScriptSecureStringExecutionParameter` was modified @@ -503,7 +495,6 @@ #### `models.WorkloadNetworkPublicIp` was modified -* `publicIPBlock()` was added * `systemData()` was added #### `models.PrivateCloud$Definition` was modified @@ -561,14 +552,14 @@ #### `models.Sku` was modified -* `family()` was added -* `withFamily(java.lang.String)` was added -* `tier()` was added -* `withTier(models.SkuTier)` was added +* `capacity()` was added * `size()` was added -* `withSize(java.lang.String)` was added * `withCapacity(java.lang.Integer)` was added -* `capacity()` was added +* `withFamily(java.lang.String)` was added +* `withSize(java.lang.String)` was added +* `family()` was added +* `withTier(models.SkuTier)` was added +* `tier()` was added #### `models.ScriptExecutionParameter` was modified @@ -599,8 +590,8 @@ #### `models.WorkloadNetworkDhcpServer` was modified -* `dhcpType()` was added * `withLeaseTime(java.lang.Integer)` was added +* `dhcpType()` was added ## 1.1.0 (2023-08-22) diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml index 97862e92b038a..0b1540d83feec 100644 --- a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/vmware/Microsoft.AVS -commit: aee5dd18737efc2993c40fda54721f8ef690bb68 +commit: 0d7404225d60d319dc767267fdfab3459a869721 repo: Azure/azure-rest-api-specs additionalDirectories: From 4608cda1f77a39d92bffb464e2d2676302b119e1 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 5 Jun 2024 12:02:34 +0800 Subject: [PATCH 08/17] regen --- .../azure-resourcemanager-avs/CHANGELOG.md | 192 +++++++++--------- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 10 +- .../avs/fluent/WorkloadNetworksClient.java | 5 +- .../WorkloadNetworksClientImpl.java | 43 ++-- .../implementation/WorkloadNetworksImpl.java | 10 +- .../avs/models/WorkloadNetworks.java | 5 +- ....java => WorkloadNetworksListSamples.java} | 6 +- ...ava => WorkloadNetworksListMockTests.java} | 8 +- .../tsp-location.yaml | 2 +- 9 files changed, 135 insertions(+), 146 deletions(-) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksListByPrivateCloudSamples.java => WorkloadNetworksListSamples.java} (71%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworksListByPrivateCloudMockTests.java => WorkloadNetworksListMockTests.java} (82%) diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index 079a5bfec0018..6bbf989c97100 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0 (2024-06-05) +## 1.0.0-beta.1 (2024-06-05) - Azure Resource Manager Avs client library for Java. This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). @@ -78,100 +78,98 @@ #### `models.WorkloadNetworks` was modified -* `getDnsZoneWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listVirtualMachines(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteDnsService(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listDnsZones(java.lang.String,java.lang.String)` was removed +* `getDnsZoneById(java.lang.String)` was removed +* `listDnsServices(java.lang.String,java.lang.String)` was removed +* `getPortMirroringWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `getPublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed * `deleteVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getSegment(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getVMGroupById(java.lang.String)` was removed +* `deleteSegment(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsServiceById(java.lang.String)` was removed +* `getDnsServiceById(java.lang.String)` was removed +* `listVirtualMachines(java.lang.String,java.lang.String)` was removed +* `deleteDnsZoneById(java.lang.String)` was removed +* `listVMGroups(java.lang.String,java.lang.String)` was removed +* `getVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getWithResponse(java.lang.String,java.lang.String,models.WorkloadNetworkName,com.azure.core.util.Context)` was removed +* `definePortMirroring(java.lang.String)` was removed +* `getPortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `listDhcp(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listPublicIPs(java.lang.String,java.lang.String)` was removed +* `getDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listVMGroups(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `getGateway(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getPortMirroringById(java.lang.String)` was removed -* `deleteDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getSegmentById(java.lang.String)` was removed +* `deletePortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `defineVMGroup(java.lang.String)` was removed +* `getSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsService(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deletePublicIpById(java.lang.String)` was removed +* `deletePortMirroringById(java.lang.String)` was removed +* `listDhcp(java.lang.String,java.lang.String)` was removed +* `getVirtualMachineWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getVMGroupById(java.lang.String)` was removed +* `listDnsZones(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listDnsServices(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deletePublicIp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listPublicIPs(java.lang.String,java.lang.String)` was removed -* `deletePublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getSegment(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getVMGroupWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDhcpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `getGatewayWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `defineDnsService(java.lang.String)` was removed +* `listSegments(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getPublicIpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed * `deleteDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteDnsZoneById(java.lang.String)` was removed -* `deleteSegment(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsServiceById(java.lang.String)` was removed -* `getPublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deletePublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed * `getDnsZoneByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getPublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deleteVMGroupById(java.lang.String)` was removed +* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsServiceWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getPortMirroringWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listSegments(java.lang.String,java.lang.String)` was removed -* `listVMGroups(java.lang.String,java.lang.String)` was removed -* `get(java.lang.String,java.lang.String,models.WorkloadNetworkName)` was removed -* `getDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed -* `definePublicIp(java.lang.String)` was removed -* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getPublicIpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed * `deleteDnsZoneByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed +* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getPublicIpById(java.lang.String)` was removed +* `listPortMirroring(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDnsZoneWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `getVirtualMachine(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getPortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deletePortMirroringById(java.lang.String)` was removed -* `deletePortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deletePublicIpById(java.lang.String)` was removed -* `definePortMirroring(java.lang.String)` was removed -* `deleteVMGroupById(java.lang.String)` was removed -* `listDhcp(java.lang.String,java.lang.String)` was removed -* `deleteDnsServiceById(java.lang.String)` was removed -* `listVMGroups(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsZoneById(java.lang.String)` was removed +* `getPortMirroringById(java.lang.String)` was removed +* `listGateways(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed +* `getSegmentWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `defineDhcp(java.lang.String)` was removed * `getDhcpById(java.lang.String)` was removed * `listGateways(java.lang.String,java.lang.String)` was removed -* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `listDnsZones(java.lang.String,java.lang.String)` was removed -* `defineSegments(java.lang.String)` was removed -* `getDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `defineVMGroup(java.lang.String)` was removed * `listPortMirroring(java.lang.String,java.lang.String)` was removed -* `listPublicIPs(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listSegments(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed +* `listVirtualMachines(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed +* `getDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed * `defineDnsZone(java.lang.String)` was removed -* `getPublicIpById(java.lang.String)` was removed -* `listDnsServices(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listPortMirroring(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `get(java.lang.String,java.lang.String,models.WorkloadNetworkName)` was removed * `getPortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getVMGroupWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDhcpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listDnsZones(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsServiceWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deleteSegment(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deletePublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getVirtualMachineWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `deleteDhcpById(java.lang.String)` was removed -* `defineDnsService(java.lang.String)` was removed -* `listDhcp(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed * `deleteSegmentById(java.lang.String)` was removed -* `getWithResponse(java.lang.String,java.lang.String,models.WorkloadNetworkName,com.azure.core.util.Context)` was removed -* `listGateways(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `defineDhcp(java.lang.String)` was removed -* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listVirtualMachines(java.lang.String,java.lang.String)` was removed -* `list(java.lang.String,java.lang.String)` was removed -* `getSegmentWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed -* `listDnsServices(java.lang.String,java.lang.String)` was removed +* `listSegments(java.lang.String,java.lang.String)` was removed +* `deletePublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed +* `defineSegments(java.lang.String)` was removed +* `definePublicIp(java.lang.String)` was removed +* `listPublicIPs(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `getSegmentById(java.lang.String)` was removed #### `models.Operation` was modified -* `properties()` was removed * `java.lang.String origin()` -> `models.Origin origin()` +* `properties()` was removed #### `models.WorkloadNetworkDnsZone` was modified @@ -196,8 +194,8 @@ #### `models.WorkloadNetworkDhcpServer` was modified -* `withLeaseTime(java.lang.Long)` was removed * `java.lang.Long leaseTime()` -> `java.lang.Integer leaseTime()` +* `withLeaseTime(java.lang.Long)` was removed ### Features Added @@ -362,8 +360,6 @@ * `get(java.lang.String,java.lang.String)` was added * `getWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added -* `listByPrivateCloud(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added -* `listByPrivateCloud(java.lang.String,java.lang.String)` was added #### `models.Operation` was modified @@ -383,8 +379,8 @@ #### `models.VirtualMachine` was modified -* `systemData()` was added * `provisioningState()` was added +* `systemData()` was added #### `models.WorkloadNetworkDnsZone` was modified @@ -396,8 +392,8 @@ #### `models.ScriptPackage` was modified -* `systemData()` was added * `provisioningState()` was added +* `systemData()` was added #### `models.Addon` was modified @@ -433,15 +429,15 @@ #### `AvsManager` was modified * `workloadNetworkVirtualMachines()` was added -* `workloadNetworkDnsServices()` was added +* `workloadNetworkSegments()` was added * `iscsiPaths()` was added -* `workloadNetworkDhcpConfigurations()` was added * `workloadNetworkGateways()` was added -* `workloadNetworkVmGroups()` was added -* `workloadNetworkSegments()` was added * `workloadNetworkPortMirroringProfiles()` was added -* `workloadNetworkDnsZones()` was added +* `workloadNetworkDhcpConfigurations()` was added +* `workloadNetworkDnsServices()` was added * `workloadNetworkPublicIps()` was added +* `workloadNetworkDnsZones()` was added +* `workloadNetworkVmGroups()` was added #### `models.AddonProperties` was modified @@ -449,8 +445,8 @@ #### `models.CloudLink` was modified -* `provisioningState()` was added * `systemData()` was added +* `provisioningState()` was added #### `models.WorkloadNetwork` was modified @@ -463,11 +459,11 @@ #### `models.ManagementCluster` was modified -* `clusterSize()` was added -* `hosts()` was added -* `clusterId()` was added * `provisioningState()` was added +* `clusterId()` was added +* `clusterSize()` was added * `vsanDatastoreName()` was added +* `hosts()` was added * `withVsanDatastoreName(java.lang.String)` was added #### `models.VmHostPlacementPolicyProperties` was modified @@ -476,9 +472,9 @@ #### `models.PrivateCloudUpdate` was modified -* `withDnsZoneType(models.DnsZoneType)` was added -* `sku()` was added * `dnsZoneType()` was added +* `sku()` was added +* `withDnsZoneType(models.DnsZoneType)` was added * `withSku(models.Sku)` was added #### `models.ScriptSecureStringExecutionParameter` was modified @@ -499,8 +495,8 @@ #### `models.PrivateCloud$Definition` was modified -* `withVirtualNetworkId(java.lang.String)` was added * `withDnsZoneType(models.DnsZoneType)` was added +* `withVirtualNetworkId(java.lang.String)` was added #### `models.WorkloadNetworkVMGroup` was modified @@ -524,9 +520,9 @@ #### `models.Endpoints` was modified -* `hcxCloudManagerIp()` was added * `nsxtManagerIp()` was added * `vcenterIp()` was added +* `hcxCloudManagerIp()` was added #### `models.PlacementPolicyProperties` was modified @@ -552,14 +548,14 @@ #### `models.Sku` was modified -* `capacity()` was added -* `size()` was added -* `withCapacity(java.lang.Integer)` was added +* `tier()` was added +* `withTier(models.SkuTier)` was added * `withFamily(java.lang.String)` was added +* `withCapacity(java.lang.Integer)` was added * `withSize(java.lang.String)` was added +* `capacity()` was added * `family()` was added -* `withTier(models.SkuTier)` was added -* `tier()` was added +* `size()` was added #### `models.ScriptExecutionParameter` was modified @@ -572,9 +568,9 @@ #### `models.PrivateCloud` was modified -* `systemData()` was added -* `dnsZoneType()` was added * `virtualNetworkId()` was added +* `dnsZoneType()` was added +* `systemData()` was added #### `models.WorkloadNetworkDnsService` was modified @@ -590,8 +586,8 @@ #### `models.WorkloadNetworkDhcpServer` was modified -* `withLeaseTime(java.lang.Integer)` was added * `dhcpType()` was added +* `withLeaseTime(java.lang.Integer)` was added ## 1.1.0 (2023-08-22) diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index de911d669d098..911d479bdc63e 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -180,7 +180,7 @@ ## WorkloadNetworks - [Get](#workloadnetworks_get) -- [ListByPrivateCloud](#workloadnetworks_listbyprivatecloud) +- [List](#workloadnetworks_list) ### Addons_CreateOrUpdate ```java @@ -2625,13 +2625,13 @@ public final class WorkloadNetworksGetSamples { } ``` -### WorkloadNetworks_ListByPrivateCloud +### WorkloadNetworks_List ```java /** - * Samples for WorkloadNetworks ListByPrivateCloud. + * Samples for WorkloadNetworks List. */ -public final class WorkloadNetworksListByPrivateCloudSamples { +public final class WorkloadNetworksListSamples { /* * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_List.json */ @@ -2641,7 +2641,7 @@ public final class WorkloadNetworksListByPrivateCloudSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` 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 a5b26aa3cf309..cbdb0eb6fbe97 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 @@ -53,7 +53,7 @@ public interface WorkloadNetworksClient { * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName); + PagedIterable list(String resourceGroupName, String privateCloudName); /** * List WorkloadNetwork resources by PrivateCloud. @@ -67,6 +67,5 @@ public interface WorkloadNetworksClient { * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, - Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); } 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 2221184d35e95..f297a888198f5 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 @@ -76,7 +76,7 @@ Mono> get(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByPrivateCloud(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -86,7 +86,7 @@ Mono> listByPrivateCloud(@HostParam("endpoin @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByPrivateCloudNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } @@ -223,7 +223,7 @@ public WorkloadNetworkInner get(String resourceGroupName, String privateCloudNam * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateCloudSinglePageAsync(String resourceGroupName, + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -243,7 +243,7 @@ private Mono> listByPrivateCloudSinglePageAs } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByPrivateCloud(this.client.getEndpoint(), this.client.getApiVersion(), + .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)) @@ -263,7 +263,7 @@ private Mono> listByPrivateCloudSinglePageAs * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateCloudSinglePageAsync(String resourceGroupName, + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -284,7 +284,7 @@ private Mono> listByPrivateCloudSinglePageAs final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByPrivateCloud(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + .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)); @@ -301,9 +301,9 @@ private Mono> listByPrivateCloudSinglePageAs * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByPrivateCloudAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>(() -> listByPrivateCloudSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listByPrivateCloudNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -318,10 +318,10 @@ private PagedFlux listByPrivateCloudAsync(String resourceG * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByPrivateCloudAsync(String resourceGroupName, String privateCloudName, + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>(() -> listByPrivateCloudSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listByPrivateCloudNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** @@ -335,8 +335,8 @@ private PagedFlux listByPrivateCloudAsync(String resourceG * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listByPrivateCloudAsync(resourceGroupName, privateCloudName)); + public PagedIterable list(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); } /** @@ -351,9 +351,9 @@ public PagedIterable listByPrivateCloud(String resourceGro * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, + public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listByPrivateCloudAsync(resourceGroupName, privateCloudName, context)); + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); } /** @@ -367,7 +367,7 @@ public PagedIterable listByPrivateCloud(String resourceGro * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateCloudNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -376,9 +376,7 @@ private Mono> listByPrivateCloudNextSinglePa new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByPrivateCloudNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -396,8 +394,7 @@ private Mono> listByPrivateCloudNextSinglePa * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateCloudNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -407,7 +404,7 @@ private Mono> listByPrivateCloudNextSinglePa } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByPrivateCloudNext(nextLink, this.client.getEndpoint(), accept, 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/WorkloadNetworksImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksImpl.java index b2e11b445e88e..00884d2f61b6e 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 @@ -48,16 +48,14 @@ public WorkloadNetwork get(String resourceGroupName, String privateCloudName) { } } - public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName) { - PagedIterable inner - = this.serviceClient().listByPrivateCloud(resourceGroupName, privateCloudName); + public PagedIterable list(String resourceGroupName, String privateCloudName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); } - public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, - Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { PagedIterable inner - = this.serviceClient().listByPrivateCloud(resourceGroupName, privateCloudName, context); + = this.serviceClient().list(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java index fe045fe294768..6114d49bacd35 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java @@ -47,7 +47,7 @@ public interface WorkloadNetworks { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName); + PagedIterable list(String resourceGroupName, String privateCloudName); /** * List WorkloadNetwork resources by PrivateCloud. @@ -60,6 +60,5 @@ public interface WorkloadNetworks { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, - Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java similarity index 71% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java index bf22b37062a3a..8c0dd4683c324 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworks ListByPrivateCloud. + * Samples for WorkloadNetworks List. */ -public final class WorkloadNetworksListByPrivateCloudSamples { +public final class WorkloadNetworksListSamples { /* * x-ms-original-file: specification/vmware/Microsoft.AVS/examples/2023-09-01/WorkloadNetworks_List.json */ @@ -17,6 +17,6 @@ public final class WorkloadNetworksListByPrivateCloudSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java similarity index 82% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java index 0a6bd3790cdbc..c6859bf73891e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListByPrivateCloudMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java @@ -17,9 +17,9 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworksListByPrivateCloudMockTests { +public final class WorkloadNetworksListMockTests { @Test - public void testListByPrivateCloud() throws Exception { + public void testList() throws Exception { String responseStr = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"yjdfqwmky\",\"name\":\"qufdvruzslzojh\",\"type\":\"ctfnmdxotng\"}]}"; @@ -30,8 +30,8 @@ public void testListByPrivateCloud() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworks() - .listByPrivateCloud("xfuojrn", "iflrzpasccbiu", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().list("xfuojrn", "iflrzpasccbiu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml index 0b1540d83feec..41093bc2e4833 100644 --- a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/vmware/Microsoft.AVS -commit: 0d7404225d60d319dc767267fdfab3459a869721 +commit: 3f33367d2e6ed2a236d85c2a43c1c151c325f232 repo: Azure/azure-rest-api-specs additionalDirectories: From e8b4ca4a851671ad102339ee721eecab8373c6e6 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Thu, 20 Jun 2024 16:57:06 +0800 Subject: [PATCH 09/17] regen --- .../azure-resourcemanager-avs/CHANGELOG.md | 2 +- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 4 +- sdk/avs/azure-resourcemanager-avs/pom.xml | 5 + .../resourcemanager/avs/fluent/AvsClient.java | 2 +- ...rkloadNetworkDhcpConfigurationsClient.java | 9 +- .../WorkloadNetworkDnsServicesClient.java | 9 +- .../fluent/WorkloadNetworkDnsZonesClient.java | 9 +- ...oadNetworkPortMirroringProfilesClient.java | 9 +- .../fluent/WorkloadNetworkSegmentsClient.java | 9 +- .../fluent/WorkloadNetworkVmGroupsClient.java | 9 +- .../avs/fluent/models/AddonInner.java | 97 +- .../fluent/models/AdminCredentialsInner.java | 53 +- .../avs/fluent/models/CloudLinkInner.java | 97 +- .../fluent/models/CloudLinkProperties.java | 52 +- .../avs/fluent/models/ClusterInner.java | 101 +- .../avs/fluent/models/ClusterProperties.java | 61 +- .../models/ClusterUpdateProperties.java | 50 +- .../fluent/models/ClusterZoneListInner.java | 46 +- .../avs/fluent/models/DatastoreInner.java | 97 +- .../fluent/models/DatastoreProperties.java | 60 +- .../ExpressRouteAuthorizationInner.java | 99 +- .../ExpressRouteAuthorizationProperties.java | 57 +- .../models/GlobalReachConnectionInner.java | 98 +- .../GlobalReachConnectionProperties.java | 65 +- .../fluent/models/HcxEnterpriseSiteInner.java | 97 +- .../models/HcxEnterpriseSiteProperties.java | 52 +- .../avs/fluent/models/IscsiPathInner.java | 97 +- .../fluent/models/IscsiPathProperties.java | 50 +- .../avs/fluent/models/OperationInner.java | 58 +- .../fluent/models/PlacementPolicyInner.java | 97 +- .../PlacementPolicyUpdateProperties.java | 69 +- .../avs/fluent/models/PrivateCloudInner.java | 112 ++- .../fluent/models/PrivateCloudProperties.java | 129 ++- .../models/PrivateCloudUpdateProperties.java | 74 +- .../avs/fluent/models/QuotaInner.java | 50 +- .../avs/fluent/models/ScriptCmdletInner.java | 97 +- .../fluent/models/ScriptCmdletProperties.java | 58 +- .../fluent/models/ScriptExecutionInner.java | 97 +- .../models/ScriptExecutionProperties.java | 112 ++- .../avs/fluent/models/ScriptPackageInner.java | 97 +- .../models/ScriptPackageProperties.java | 57 +- .../avs/fluent/models/TrialInner.java | 47 +- .../fluent/models/VirtualMachineInner.java | 97 +- .../models/VirtualMachineProperties.java | 58 +- .../models/WorkloadNetworkDhcpInner.java | 97 +- .../WorkloadNetworkDnsServiceInner.java | 99 +- .../WorkloadNetworkDnsServiceProperties.java | 77 +- .../models/WorkloadNetworkDnsZoneInner.java | 102 +- .../WorkloadNetworkDnsZoneProperties.java | 78 +- .../models/WorkloadNetworkGatewayInner.java | 98 +- .../WorkloadNetworkGatewayProperties.java | 53 +- .../fluent/models/WorkloadNetworkInner.java | 97 +- .../WorkloadNetworkPortMirroringInner.java | 99 +- ...orkloadNetworkPortMirroringProperties.java | 73 +- .../models/WorkloadNetworkProperties.java | 45 +- .../models/WorkloadNetworkPublicIpInner.java | 98 +- .../WorkloadNetworkPublicIpProperties.java | 58 +- .../models/WorkloadNetworkSegmentInner.java | 98 +- .../WorkloadNetworkSegmentProperties.java | 71 +- .../models/WorkloadNetworkVMGroupInner.java | 98 +- .../WorkloadNetworkVMGroupProperties.java | 63 +- .../WorkloadNetworkVirtualMachineInner.java | 99 +- ...rkloadNetworkVirtualMachineProperties.java | 55 +- .../avs/implementation/AddonsClientImpl.java | 6 +- .../AuthorizationsClientImpl.java | 6 +- .../avs/implementation/AvsClientBuilder.java | 4 +- .../avs/implementation/AvsClientImpl.java | 6 +- .../implementation/CloudLinksClientImpl.java | 6 +- .../implementation/ClustersClientImpl.java | 6 +- .../implementation/DatastoresClientImpl.java | 6 +- .../GlobalReachConnectionsClientImpl.java | 6 +- .../HcxEnterpriseSitesClientImpl.java | 9 +- .../implementation/OperationsClientImpl.java | 6 +- .../PlacementPoliciesClientImpl.java | 9 +- .../PrivateCloudsClientImpl.java | 10 +- .../ScriptCmdletsClientImpl.java | 6 +- .../ScriptExecutionsClientImpl.java | 9 +- .../ScriptPackagesClientImpl.java | 6 +- .../VirtualMachinesClientImpl.java | 9 +- ...adNetworkDhcpConfigurationsClientImpl.java | 29 +- .../WorkloadNetworkDhcpImpl.java | 21 +- .../WorkloadNetworkDnsServiceImpl.java | 66 +- .../WorkloadNetworkDnsServicesClientImpl.java | 32 +- .../WorkloadNetworkDnsZoneImpl.java | 70 +- .../WorkloadNetworkDnsZonesClientImpl.java | 29 +- .../WorkloadNetworkGatewaysClientImpl.java | 6 +- .../WorkloadNetworkPortMirroringImpl.java | 58 +- ...etworkPortMirroringProfilesClientImpl.java | 32 +- .../WorkloadNetworkPublicIpsClientImpl.java | 6 +- .../WorkloadNetworkSegmentImpl.java | 48 +- .../WorkloadNetworkSegmentsClientImpl.java | 31 +- .../WorkloadNetworkVMGroupImpl.java | 39 +- ...kloadNetworkVirtualMachinesClientImpl.java | 9 +- .../WorkloadNetworkVmGroupsClientImpl.java | 29 +- .../WorkloadNetworksClientImpl.java | 9 +- .../avs/implementation/models/AddonList.java | 112 +++ .../implementation/models/CloudLinkList.java | 112 +++ .../implementation/models/ClusterList.java | 112 +++ .../implementation/models/DatastoreList.java | 112 +++ .../models/ExpressRouteAuthorizationList.java | 115 +++ .../models/GlobalReachConnectionList.java | 114 +++ .../models/HcxEnterpriseSiteList.java | 113 +++ .../models/IscsiPathListResult.java | 51 +- .../models/OperationListResult.java | 113 +++ .../models/PlacementPoliciesList.java | 113 +++ .../models/PrivateCloudList.java | 112 +++ .../models/ScriptCmdletsList.java | 112 +++ .../models/ScriptExecutionsList.java | 113 +++ .../models/ScriptPackagesList.java | 112 +++ .../models/VirtualMachinesList.java | 113 +++ .../models/WorkloadNetworkDhcpList.java | 113 +++ .../WorkloadNetworkDnsServicesList.java | 115 +++ .../models/WorkloadNetworkDnsZonesList.java | 114 +++ .../models/WorkloadNetworkGatewayList.java | 114 +++ .../models/WorkloadNetworkList.java | 113 +++ .../WorkloadNetworkPortMirroringList.java | 115 +++ .../models/WorkloadNetworkPublicIPsList.java | 114 +++ .../models/WorkloadNetworkSegmentsList.java | 114 +++ .../models/WorkloadNetworkVMGroupsList.java | 114 +++ .../WorkloadNetworkVirtualMachinesList.java | 115 +++ .../avs/models/ActionType.java | 2 - .../resourcemanager/avs/models/Addon.java | 14 +- .../avs/models/AddonArcProperties.java | 74 +- .../avs/models/AddonHcxProperties.java | 75 +- .../avs/models/AddonProperties.java | 103 +- .../avs/models/AddonProvisioningState.java | 2 - .../avs/models/AddonSrmProperties.java | 74 +- .../resourcemanager/avs/models/AddonType.java | 2 - .../avs/models/AddonVrProperties.java | 71 +- .../avs/models/AffinityStrength.java | 2 - .../avs/models/AffinityType.java | 2 - .../avs/models/AvailabilityProperties.java | 53 +- .../avs/models/AvailabilityStrategy.java | 2 - .../avs/models/AzureHybridBenefitType.java | 2 - .../resourcemanager/avs/models/Circuit.java | 53 +- .../models/CloudLinkProvisioningState.java | 2 - .../avs/models/CloudLinkStatus.java | 2 - .../avs/models/ClusterProvisioningState.java | 2 - .../avs/models/ClusterUpdate.java | 49 +- .../avs/models/ClusterZone.java | 48 +- .../avs/models/ClustersUpdateHeaders.java | 3 - .../models/DatastoreProvisioningState.java | 2 - .../avs/models/DatastoreStatus.java | 2 - .../avs/models/DhcpTypeEnum.java | 2 - .../avs/models/DiskPoolVolume.java | 57 +- .../avs/models/DnsServiceLogLevelEnum.java | 2 - .../avs/models/DnsServiceStatusEnum.java | 2 - .../avs/models/DnsZoneType.java | 2 - .../avs/models/ElasticSanVolume.java | 46 +- .../avs/models/Encryption.java | 49 +- .../avs/models/EncryptionKeyStatus.java | 2 - .../models/EncryptionKeyVaultProperties.java | 64 +- .../avs/models/EncryptionState.java | 2 - .../avs/models/EncryptionVersionType.java | 2 - .../resourcemanager/avs/models/Endpoints.java | 59 +- ...ssRouteAuthorizationProvisioningState.java | 2 - ...lobalReachConnectionProvisioningState.java | 2 - .../models/GlobalReachConnectionStatus.java | 2 - .../HcxEnterpriseSiteProvisioningState.java | 2 - .../avs/models/HcxEnterpriseSiteStatus.java | 2 - .../avs/models/IdentitySource.java | 81 +- .../avs/models/InternetEnum.java | 2 - .../models/IscsiPathProvisioningState.java | 2 - .../avs/models/ManagementCluster.java | 61 +- .../avs/models/MountOptionEnum.java | 2 - .../avs/models/NetAppVolume.java | 46 +- .../models/NsxPublicIpQuotaRaisedEnum.java | 2 - .../avs/models/OperationDisplay.java | 57 +- .../avs/models/OptionalParamEnum.java | 2 - .../resourcemanager/avs/models/Origin.java | 2 - .../PSCredentialExecutionParameter.java | 66 +- .../PlacementPoliciesUpdateHeaders.java | 3 - .../avs/models/PlacementPolicyProperties.java | 109 +- .../PlacementPolicyProvisioningState.java | 2 - .../avs/models/PlacementPolicyState.java | 2 - .../avs/models/PlacementPolicyType.java | 2 - .../avs/models/PlacementPolicyUpdate.java | 46 +- .../models/PortMirroringDirectionEnum.java | 2 - .../avs/models/PortMirroringStatusEnum.java | 2 - .../avs/models/PrivateCloudIdentity.java | 82 +- .../models/PrivateCloudProvisioningState.java | 2 - .../avs/models/PrivateCloudUpdate.java | 60 +- .../models/PrivateCloudsUpdateHeaders.java | 3 - .../avs/models/QuotaEnabled.java | 2 - .../avs/models/ResourceIdentityType.java | 4 +- .../avs/models/ScriptCmdletAudience.java | 2 - .../models/ScriptCmdletProvisioningState.java | 2 - .../avs/models/ScriptExecutionParameter.java | 95 +- .../models/ScriptExecutionParameterType.java | 2 - .../ScriptExecutionProvisioningState.java | 2 - .../avs/models/ScriptOutputStreamType.java | 2 - .../ScriptPackageProvisioningState.java | 2 - .../avs/models/ScriptParameter.java | 57 +- .../avs/models/ScriptParameterTypes.java | 2 - .../ScriptSecureStringExecutionParameter.java | 62 +- .../ScriptStringExecutionParameter.java | 62 +- .../avs/models/SegmentStatusEnum.java | 2 - .../azure/resourcemanager/avs/models/Sku.java | 70 +- .../resourcemanager/avs/models/SkuTier.java | 8 +- .../resourcemanager/avs/models/SslEnum.java | 2 - .../avs/models/TrialStatus.java | 2 - .../avs/models/VMGroupStatusEnum.java | 2 - .../avs/models/VMTypeEnum.java | 2 - .../VirtualMachineProvisioningState.java | 2 - .../VirtualMachineRestrictMovement.java | 48 +- .../VirtualMachineRestrictMovementState.java | 2 - .../avs/models/VisibilityParameterEnum.java | 2 - .../VmHostPlacementPolicyProperties.java | 107 +- .../models/VmPlacementPolicyProperties.java | 87 +- .../avs/models/WorkloadNetworkDhcp.java | 4 +- .../avs/models/WorkloadNetworkDhcpEntity.java | 124 ++- .../WorkloadNetworkDhcpProvisioningState.java | 2 - .../avs/models/WorkloadNetworkDhcpRelay.java | 100 +- .../avs/models/WorkloadNetworkDhcpServer.java | 109 +- ...oadNetworkDnsServiceProvisioningState.java | 2 - .../avs/models/WorkloadNetworkDnsZone.java | 6 +- ...rkloadNetworkDnsZoneProvisioningState.java | 2 - ...NetworkPortMirroringProvisioningState.java | 2 - .../WorkloadNetworkProvisioningState.java | 2 - ...kloadNetworkPublicIpProvisioningState.java | 2 - .../models/WorkloadNetworkSegmentPortVif.java | 46 +- ...rkloadNetworkSegmentProvisioningState.java | 2 - .../models/WorkloadNetworkSegmentSubnet.java | 50 +- ...rkloadNetworkVMGroupProvisioningState.java | 2 - .../reflect-config.json | 927 +----------------- ...etworkDhcpConfigurationsCreateSamples.java | 2 +- ...etworkDhcpConfigurationsUpdateSamples.java | 2 +- .../generated/AddonArcPropertiesTests.java | 8 +- .../generated/AddonHcxPropertiesTests.java | 12 +- .../avs/generated/AddonInnerTests.java | 2 +- .../avs/generated/AddonListTests.java | 19 + .../avs/generated/AddonPropertiesTests.java | 2 +- .../avs/generated/AddonVrPropertiesTests.java | 8 +- .../AddonsCreateOrUpdateMockTests.java | 6 +- .../avs/generated/AddonsDeleteMockTests.java | 2 +- .../AddonsGetWithResponseMockTests.java | 4 +- .../avs/generated/AddonsListMockTests.java | 4 +- .../AuthorizationsDeleteMockTests.java | 2 +- .../avs/generated/CloudLinkInnerTests.java | 8 +- .../avs/generated/CloudLinkListTests.java | 20 + .../generated/CloudLinkPropertiesTests.java | 8 +- .../CloudLinksCreateOrUpdateMockTests.java | 10 +- .../generated/CloudLinksDeleteMockTests.java | 2 +- .../CloudLinksGetWithResponseMockTests.java | 6 +- .../generated/CloudLinksListMockTests.java | 6 +- .../avs/generated/ClusterListTests.java | 28 + .../ClustersCreateOrUpdateMockTests.java | 36 +- .../generated/ClustersDeleteMockTests.java | 2 +- .../ClustersGetWithResponseMockTests.java | 18 +- .../avs/generated/ClustersListMockTests.java | 18 +- ...lustersListZonesWithResponseMockTests.java | 4 +- .../avs/generated/DatastoreListTests.java | 25 + .../DatastoresCreateOrUpdateMockTests.java | 23 +- .../generated/DatastoresDeleteMockTests.java | 3 +- .../DatastoresGetWithResponseMockTests.java | 13 +- .../generated/DatastoresListMockTests.java | 14 +- ...GlobalReachConnectionsDeleteMockTests.java | 2 +- ...priseSitesDeleteWithResponseMockTests.java | 2 +- .../avs/generated/IscsiPathInnerTests.java | 8 +- .../generated/IscsiPathListResultTests.java | 6 +- .../generated/IscsiPathPropertiesTests.java | 8 +- .../IscsiPathsCreateOrUpdateMockTests.java | 6 +- .../generated/IscsiPathsDeleteMockTests.java | 2 +- .../IscsiPathsGetWithResponseMockTests.java | 6 +- ...IscsiPathsListByPrivateCloudMockTests.java | 6 +- ...uotaAvailabilityWithResponseMockTests.java | 5 +- ...rialAvailabilityWithResponseMockTests.java | 12 +- .../generated/OperationListResultTests.java | 25 + .../generated/OperationsListMockTests.java | 10 +- ...cementPoliciesCreateOrUpdateMockTests.java | 10 +- .../PlacementPoliciesDeleteMockTests.java | 3 +- ...ementPoliciesGetWithResponseMockTests.java | 7 +- .../PlacementPoliciesListMockTests.java | 10 +- .../generated/PlacementPoliciesListTests.java | 22 + .../generated/PlacementPolicyInnerTests.java | 12 +- .../PlacementPolicyPropertiesTests.java | 12 +- .../PlacementPolicyUpdatePropertiesTests.java | 26 +- .../generated/PlacementPolicyUpdateTests.java | 20 +- .../generated/PrivateCloudIdentityTests.java | 2 +- .../PrivateCloudsDeleteMockTests.java | 2 +- .../avs/generated/ScriptCmdletInnerTests.java | 2 +- .../ScriptCmdletPropertiesTests.java | 2 +- ...ScriptCmdletsGetWithResponseMockTests.java | 5 +- .../generated/ScriptCmdletsListMockTests.java | 4 +- .../avs/generated/ScriptCmdletsListTests.java | 19 + .../generated/ScriptExecutionInnerTests.java | 52 +- .../ScriptExecutionParameterTests.java | 8 +- .../ScriptExecutionPropertiesTests.java | 53 +- ...riptExecutionsCreateOrUpdateMockTests.java | 41 +- .../ScriptExecutionsDeleteMockTests.java | 2 +- ...GetExecutionLogsWithResponseMockTests.java | 21 +- ...iptExecutionsGetWithResponseMockTests.java | 18 +- .../ScriptExecutionsListMockTests.java | 18 +- .../generated/ScriptExecutionsListTests.java | 26 + .../generated/ScriptPackageInnerTests.java | 2 +- .../ScriptPackagePropertiesTests.java | 2 +- ...criptPackagesGetWithResponseMockTests.java | 4 +- .../ScriptPackagesListMockTests.java | 4 +- .../generated/ScriptPackagesListTests.java | 19 + .../avs/generated/ScriptParameterTests.java | 4 +- ...ptSecureStringExecutionParameterTests.java | 16 +- .../ScriptStringExecutionParameterTests.java | 12 +- .../generated/VirtualMachineInnerTests.java | 2 +- .../VirtualMachinePropertiesTests.java | 2 +- .../VirtualMachineRestrictMovementTests.java | 8 +- ...rtualMachinesGetWithResponseMockTests.java | 4 +- .../VirtualMachinesListMockTests.java | 6 +- .../generated/VirtualMachinesListTests.java | 19 + .../VmHostPlacementPolicyPropertiesTests.java | 26 +- .../VmPlacementPolicyPropertiesTests.java | 20 +- ...workDhcpConfigurationsCreateMockTests.java | 13 +- ...workDhcpConfigurationsDeleteMockTests.java | 2 +- ...onfigurationsGetWithResponseMockTests.java | 8 +- ...rationsListByWorkloadNetworkMockTests.java | 8 +- .../WorkloadNetworkDhcpEntityTests.java | 12 +- .../WorkloadNetworkDhcpInnerTests.java | 12 +- .../WorkloadNetworkDhcpListTests.java | 21 + .../WorkloadNetworkDhcpRelayTests.java | 20 +- .../WorkloadNetworkDhcpServerTests.java | 26 +- .../WorkloadNetworkDnsServiceInnerTests.java | 38 +- ...kloadNetworkDnsServicePropertiesTests.java | 38 +- ...loadNetworkDnsServicesCreateMockTests.java | 30 +- ...loadNetworkDnsServicesDeleteMockTests.java | 3 +- ...rkDnsServicesGetWithResponseMockTests.java | 16 +- ...ervicesListByWorkloadNetworkMockTests.java | 16 +- .../WorkloadNetworkDnsServicesListTests.java | 26 + .../WorkloadNetworkDnsZoneInnerTests.java | 38 +- ...WorkloadNetworkDnsZonePropertiesTests.java | 38 +- ...orkloadNetworkDnsZonesCreateMockTests.java | 30 +- ...orkloadNetworkDnsZonesDeleteMockTests.java | 2 +- ...tworkDnsZonesGetWithResponseMockTests.java | 16 +- ...nsZonesListByWorkloadNetworkMockTests.java | 18 +- .../WorkloadNetworkDnsZonesListTests.java | 25 + .../WorkloadNetworkGatewayInnerTests.java | 4 +- .../WorkloadNetworkGatewayListTests.java | 20 + ...WorkloadNetworkGatewayPropertiesTests.java | 4 +- ...tworkGatewaysGetWithResponseMockTests.java | 6 +- ...atewaysListByWorkloadNetworkMockTests.java | 6 +- .../generated/WorkloadNetworkListTests.java | 19 + ...orkloadNetworkPortMirroringInnerTests.java | 32 +- ...WorkloadNetworkPortMirroringListTests.java | 25 + ...kPortMirroringProfilesCreateMockTests.java | 24 +- ...kPortMirroringProfilesDeleteMockTests.java | 2 +- ...oringProfilesGetWithResponseMockTests.java | 14 +- ...rofilesListByWorkloadNetworkMockTests.java | 12 +- ...adNetworkPortMirroringPropertiesTests.java | 32 +- .../WorkloadNetworkPublicIPsListTests.java | 21 + .../WorkloadNetworkPublicIpInnerTests.java | 12 +- ...orkloadNetworkPublicIpPropertiesTests.java | 13 +- ...rkloadNetworkPublicIpsCreateMockTests.java | 14 +- ...rkloadNetworkPublicIpsDeleteMockTests.java | 2 +- ...workPublicIpsGetWithResponseMockTests.java | 8 +- ...blicIpsListByWorkloadNetworkMockTests.java | 8 +- ...orkloadNetworkSegmentsCreateMockTests.java | 27 +- ...NetworkSegmentsDeleteSegmentMockTests.java | 3 +- ...tworkSegmentsGetWithResponseMockTests.java | 14 +- ...egmentsListByWorkloadNetworkMockTests.java | 14 +- .../WorkloadNetworkSegmentsListTests.java | 24 + .../WorkloadNetworkVMGroupInnerTests.java | 20 +- ...WorkloadNetworkVMGroupPropertiesTests.java | 20 +- .../WorkloadNetworkVMGroupsListTests.java | 22 + ...rkloadNetworkVirtualMachineInnerTests.java | 4 +- ...dNetworkVirtualMachinePropertiesTests.java | 4 +- ...rtualMachinesGetWithResponseMockTests.java | 6 +- ...achinesListByWorkloadNetworkMockTests.java | 6 +- ...rkloadNetworkVirtualMachinesListTests.java | 20 + ...orkloadNetworkVmGroupsCreateMockTests.java | 18 +- ...orkloadNetworkVmGroupsDeleteMockTests.java | 2 +- ...tworkVmGroupsGetWithResponseMockTests.java | 10 +- ...mGroupsListByWorkloadNetworkMockTests.java | 10 +- ...kloadNetworksGetWithResponseMockTests.java | 4 +- .../WorkloadNetworksListMockTests.java | 4 +- .../tsp-location.yaml | 2 +- 373 files changed, 10269 insertions(+), 2910 deletions(-) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListResultTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index 6bbf989c97100..cb13956a9313a 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.1 (2024-06-05) +## 1.0.0-beta.1 (2024-06-20) - Azure Resource Manager Avs client library for Java. This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index 911d479bdc63e..04c5cb4f9204d 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -1693,7 +1693,7 @@ public final class WorkloadNetworkDhcpConfigurationsCreateSamples { .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") .withRevision(1L) .withServerAddress("40.1.5.1/24") - .withLeaseTime(86400)) + .withLeaseTime(86400L)) .create(); } } @@ -1789,7 +1789,7 @@ public final class WorkloadNetworkDhcpConfigurationsUpdateSamples { .getValue(); resource.update() .withProperties( - new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400)) + new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400L)) .apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml index 5c7bb8f22fde6..570006186f3ce 100644 --- a/sdk/avs/azure-resourcemanager-avs/pom.xml +++ b/sdk/avs/azure-resourcemanager-avs/pom.xml @@ -48,6 +48,11 @@ Code generated by Microsoft (R) TypeSpec Code Generator. true + + com.azure + azure-json + 1.1.0 + com.azure azure-core 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 4eec7e4188bec..6a5eb3ac48ac6 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 @@ -26,7 +26,7 @@ public interface AvsClient { String getApiVersion(); /** - * Gets The ID of the target subscription. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java index 725e3be3dc4ca..99fa5a041e738 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; /** * An instance of this class provides access to all the operations defined in WorkloadNetworkDhcpConfigurationsClient. @@ -156,7 +155,7 @@ WorkloadNetworkDhcpInner create(String resourceGroupName, String privateCloudNam */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginUpdate(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp); + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Update a WorkloadNetworkDhcp. @@ -173,7 +172,7 @@ SyncPoller, WorkloadNetworkDhcpInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginUpdate(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context); + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Update a WorkloadNetworkDhcp. @@ -189,7 +188,7 @@ SyncPoller, WorkloadNetworkDhcpInner> begin */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpUpdate workloadNetworkDhcp); + WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Update a WorkloadNetworkDhcp. @@ -206,7 +205,7 @@ WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudNam */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context); + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Delete a WorkloadNetworkDhcp. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java index a6c469b03d525..b5afcf8c91a10 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; /** * An instance of this class provides access to all the operations defined in WorkloadNetworkDnsServicesClient. @@ -162,7 +161,7 @@ WorkloadNetworkDnsServiceInner create(String resourceGroupName, String privateCl @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService); + WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** * Update a WorkloadNetworkDnsService. @@ -180,7 +179,7 @@ SyncPoller, WorkloadNetworkDnsService @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context); + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** * Update a WorkloadNetworkDnsService. @@ -196,7 +195,7 @@ SyncPoller, WorkloadNetworkDnsService */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService); + WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** * Update a WorkloadNetworkDnsService. @@ -213,7 +212,7 @@ WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCl */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context); + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** * Delete a WorkloadNetworkDnsService. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java index 329de69fdf1b3..87e95339b1f08 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; /** * An instance of this class provides access to all the operations defined in WorkloadNetworkDnsZonesClient. @@ -159,7 +158,7 @@ WorkloadNetworkDnsZoneInner create(String resourceGroupName, String privateCloud @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone); + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** * Update a WorkloadNetworkDnsZone. @@ -177,7 +176,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context); + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** * Update a WorkloadNetworkDnsZone. @@ -193,7 +192,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone); + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** * Update a WorkloadNetworkDnsZone. @@ -210,7 +209,7 @@ WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloud */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context); + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** * Delete a WorkloadNetworkDnsZone. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java index 01c94b95ac07d..8c5b4b23936a5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; /** * An instance of this class provides access to all the operations defined in @@ -163,7 +162,7 @@ WorkloadNetworkPortMirroringInner create(String resourceGroupName, String privat @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring); + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Update a WorkloadNetworkPortMirroring. @@ -181,7 +180,7 @@ SyncPoller, WorkloadNetworkPortMir @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context); + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Update a WorkloadNetworkPortMirroring. @@ -197,7 +196,7 @@ SyncPoller, WorkloadNetworkPortMir */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring); + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Update a WorkloadNetworkPortMirroring. @@ -214,7 +213,7 @@ WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privat */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context); + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Delete a WorkloadNetworkPortMirroring. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java index 4fa8508ff90e3..887874095d430 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; /** * An instance of this class provides access to all the operations defined in WorkloadNetworkSegmentsClient. @@ -158,7 +157,7 @@ WorkloadNetworkSegmentInner create(String resourceGroupName, String privateCloud */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties); + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties); /** * Update a WorkloadNetworkSegment. @@ -175,7 +174,7 @@ SyncPoller, WorkloadNetworkSegmentInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties, + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, Context context); /** @@ -192,7 +191,7 @@ SyncPoller, WorkloadNetworkSegmentInner> */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentUpdate properties); + WorkloadNetworkSegmentInner properties); /** * Update a WorkloadNetworkSegment. @@ -209,7 +208,7 @@ WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloud */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentUpdate properties, Context context); + WorkloadNetworkSegmentInner properties, Context context); /** * Delete a WorkloadNetworkSegment. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java index d1681eef28bcd..12291d715eb46 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; /** * An instance of this class provides access to all the operations defined in WorkloadNetworkVmGroupsClient. @@ -158,7 +157,7 @@ WorkloadNetworkVMGroupInner create(String resourceGroupName, String privateCloud @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup); + WorkloadNetworkVMGroupInner workloadNetworkVMGroup); /** * Update a WorkloadNetworkVMGroup. @@ -176,7 +175,7 @@ SyncPoller, WorkloadNetworkVMGroupInner> @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context); + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); /** * Update a WorkloadNetworkVMGroup. @@ -192,7 +191,7 @@ SyncPoller, WorkloadNetworkVMGroupInner> */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup); + WorkloadNetworkVMGroupInner workloadNetworkVMGroup); /** * Update a WorkloadNetworkVMGroup. @@ -209,7 +208,7 @@ WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloud */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context); + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); /** * Delete a WorkloadNetworkVMGroup. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java index ea2ee3c0f3064..a75e9e49114fc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java @@ -7,8 +7,11 @@ 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.AddonProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * An addon resource. @@ -18,15 +21,28 @@ public final class AddonInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private AddonProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of AddonInner class. */ @@ -62,6 +78,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Validates the instance. * @@ -72,4 +118,49 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AddonInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AddonInner 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 AddonInner. + */ + public static AddonInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddonInner deserializedAddonInner = new AddonInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedAddonInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAddonInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAddonInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedAddonInner.properties = AddonProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedAddonInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAddonInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java index f8136d1ed10cf..900df918e1150 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Administrative credentials for accessing vCenter and NSX-T. */ @Immutable -public final class AdminCredentialsInner { +public final class AdminCredentialsInner implements JsonSerializable { /* * NSX-T Manager username */ - @JsonProperty(value = "nsxtUsername", access = JsonProperty.Access.WRITE_ONLY) private String nsxtUsername; /* * NSX-T Manager password */ - @JsonProperty(value = "nsxtPassword", access = JsonProperty.Access.WRITE_ONLY) private String nsxtPassword; /* * vCenter admin username */ - @JsonProperty(value = "vcenterUsername", access = JsonProperty.Access.WRITE_ONLY) private String vcenterUsername; /* * vCenter admin password */ - @JsonProperty(value = "vcenterPassword", access = JsonProperty.Access.WRITE_ONLY) private String vcenterPassword; /** @@ -85,4 +85,45 @@ public String vcenterPassword() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AdminCredentialsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AdminCredentialsInner 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 AdminCredentialsInner. + */ + public static AdminCredentialsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AdminCredentialsInner deserializedAdminCredentialsInner = new AdminCredentialsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nsxtUsername".equals(fieldName)) { + deserializedAdminCredentialsInner.nsxtUsername = reader.getString(); + } else if ("nsxtPassword".equals(fieldName)) { + deserializedAdminCredentialsInner.nsxtPassword = reader.getString(); + } else if ("vcenterUsername".equals(fieldName)) { + deserializedAdminCredentialsInner.vcenterUsername = reader.getString(); + } else if ("vcenterPassword".equals(fieldName)) { + deserializedAdminCredentialsInner.vcenterPassword = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAdminCredentialsInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java index 21b28939a759d..691492e5ea6ee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java @@ -7,9 +7,12 @@ 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.CloudLinkProvisioningState; import com.azure.resourcemanager.avs.models.CloudLinkStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * A cloud link resource. @@ -19,15 +22,28 @@ public final class CloudLinkInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private CloudLinkProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of CloudLinkInner class. */ @@ -52,6 +68,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -103,4 +149,49 @@ public void validate() { 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 CloudLinkInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CloudLinkInner 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 CloudLinkInner. + */ + public static CloudLinkInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CloudLinkInner deserializedCloudLinkInner = new CloudLinkInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCloudLinkInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCloudLinkInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCloudLinkInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCloudLinkInner.innerProperties = CloudLinkProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedCloudLinkInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCloudLinkInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java index 55059a5326e7b..b57cce1d3d575 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java @@ -5,31 +5,32 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.CloudLinkProvisioningState; import com.azure.resourcemanager.avs.models.CloudLinkStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties of a cloud link. */ @Fluent -public final class CloudLinkProperties { +public final class CloudLinkProperties implements JsonSerializable { /* * The provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private CloudLinkProvisioningState provisioningState; /* * The state of the cloud link. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private CloudLinkStatus status; /* * Identifier of the other private cloud participating in the link. */ - @JsonProperty(value = "linkedCloud") private String linkedCloud; /** @@ -83,4 +84,45 @@ public CloudLinkProperties withLinkedCloud(String linkedCloud) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("linkedCloud", this.linkedCloud); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CloudLinkProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CloudLinkProperties 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 CloudLinkProperties. + */ + public static CloudLinkProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CloudLinkProperties deserializedCloudLinkProperties = new CloudLinkProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedCloudLinkProperties.provisioningState + = CloudLinkProvisioningState.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedCloudLinkProperties.status = CloudLinkStatus.fromString(reader.getString()); + } else if ("linkedCloud".equals(fieldName)) { + deserializedCloudLinkProperties.linkedCloud = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCloudLinkProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java index f11aa6a6530d8..6bd673b741097 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java @@ -8,9 +8,12 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.avs.models.ClusterProvisioningState; import com.azure.resourcemanager.avs.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -21,21 +24,33 @@ public final class ClusterInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private ClusterProperties innerProperties; /* * The SKU (Stock Keeping Unit) assigned to this resource. */ - @JsonProperty(value = "sku", required = true) private Sku sku; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of ClusterInner class. */ @@ -80,6 +95,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the clusterSize property: The cluster size. * @@ -185,4 +230,52 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ClusterInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterInner 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 ClusterInner. + */ + public static ClusterInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterInner deserializedClusterInner = new ClusterInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedClusterInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedClusterInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedClusterInner.type = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedClusterInner.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedClusterInner.innerProperties = ClusterProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedClusterInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java index 5ad678724dfb4..8131d8adcc2b1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java @@ -5,43 +5,42 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.ClusterProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties of a cluster. */ @Fluent -public final class ClusterProperties { +public final class ClusterProperties implements JsonSerializable { /* * The cluster size */ - @JsonProperty(value = "clusterSize") private Integer clusterSize; /* * The state of the cluster provisioning */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ClusterProvisioningState provisioningState; /* * The identity */ - @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) private Integer clusterId; /* * The hosts */ - @JsonProperty(value = "hosts") private List hosts; /* * Name of the vsan datastore associated with the cluster */ - @JsonProperty(value = "vsanDatastoreName") private String vsanDatastoreName; /** @@ -135,4 +134,52 @@ public ClusterProperties withVsanDatastoreName(String vsanDatastoreName) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("clusterSize", this.clusterSize); + jsonWriter.writeArrayField("hosts", this.hosts, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("vsanDatastoreName", this.vsanDatastoreName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterProperties 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 ClusterProperties. + */ + public static ClusterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterProperties deserializedClusterProperties = new ClusterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterSize".equals(fieldName)) { + deserializedClusterProperties.clusterSize = reader.getNullable(JsonReader::getInt); + } else if ("provisioningState".equals(fieldName)) { + deserializedClusterProperties.provisioningState + = ClusterProvisioningState.fromString(reader.getString()); + } else if ("clusterId".equals(fieldName)) { + deserializedClusterProperties.clusterId = reader.getNullable(JsonReader::getInt); + } else if ("hosts".equals(fieldName)) { + List hosts = reader.readArray(reader1 -> reader1.getString()); + deserializedClusterProperties.hosts = hosts; + } else if ("vsanDatastoreName".equals(fieldName)) { + deserializedClusterProperties.vsanDatastoreName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java index 572da8ad9322d..00e55c4b76892 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 properties of a cluster that may be updated. */ @Fluent -public final class ClusterUpdateProperties { +public final class ClusterUpdateProperties implements JsonSerializable { /* * The cluster size */ - @JsonProperty(value = "clusterSize") private Integer clusterSize; /* * The hosts */ - @JsonProperty(value = "hosts") private List hosts; /** @@ -78,4 +80,44 @@ public ClusterUpdateProperties withHosts(List hosts) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("clusterSize", this.clusterSize); + jsonWriter.writeArrayField("hosts", this.hosts, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterUpdateProperties 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 ClusterUpdateProperties. + */ + public static ClusterUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterUpdateProperties deserializedClusterUpdateProperties = new ClusterUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterSize".equals(fieldName)) { + deserializedClusterUpdateProperties.clusterSize = reader.getNullable(JsonReader::getInt); + } else if ("hosts".equals(fieldName)) { + List hosts = reader.readArray(reader1 -> reader1.getString()); + deserializedClusterUpdateProperties.hosts = hosts; + } else { + reader.skipChildren(); + } + } + + return deserializedClusterUpdateProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java index c5bd59ac21010..0177b66e5d7e1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java @@ -5,19 +5,22 @@ 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.ClusterZone; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of all zones and associated hosts for a cluster. */ @Immutable -public final class ClusterZoneListInner { +public final class ClusterZoneListInner implements JsonSerializable { /* * Zone and associated hosts info */ - @JsonProperty(value = "zones") private List zones; /** @@ -45,4 +48,41 @@ public void validate() { zones().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterZoneListInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterZoneListInner 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 ClusterZoneListInner. + */ + public static ClusterZoneListInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterZoneListInner deserializedClusterZoneListInner = new ClusterZoneListInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> ClusterZone.fromJson(reader1)); + deserializedClusterZoneListInner.zones = zones; + } else { + reader.skipChildren(); + } + } + + return deserializedClusterZoneListInner; + }); + } } 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 2e54bfe47af22..4954826a9a398 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 @@ -7,12 +7,15 @@ 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.DatastoreProvisioningState; import com.azure.resourcemanager.avs.models.DatastoreStatus; import com.azure.resourcemanager.avs.models.DiskPoolVolume; import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * A datastore resource. @@ -22,15 +25,28 @@ public final class DatastoreInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private DatastoreProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of DatastoreInner class. */ @@ -55,6 +71,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The state of the datastore provisioning. * @@ -152,4 +198,49 @@ public void validate() { 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 DatastoreInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatastoreInner 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 DatastoreInner. + */ + public static DatastoreInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatastoreInner deserializedDatastoreInner = new DatastoreInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDatastoreInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDatastoreInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDatastoreInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDatastoreInner.innerProperties = DatastoreProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDatastoreInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDatastoreInner; + }); + } } 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 9d70476cb22c5..14aa6103e2c31 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 @@ -5,46 +5,45 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.DatastoreProvisioningState; import com.azure.resourcemanager.avs.models.DatastoreStatus; import com.azure.resourcemanager.avs.models.DiskPoolVolume; import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties of a datastore. */ @Fluent -public final class DatastoreProperties { +public final class DatastoreProperties implements JsonSerializable { /* * The state of the datastore provisioning */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private DatastoreProvisioningState provisioningState; /* * An Azure NetApp Files volume */ - @JsonProperty(value = "netAppVolume") private NetAppVolume netAppVolume; /* * An iSCSI volume */ - @JsonProperty(value = "diskPoolVolume") private DiskPoolVolume diskPoolVolume; /* * An Elastic SAN volume */ - @JsonProperty(value = "elasticSanVolume") private ElasticSanVolume elasticSanVolume; /* * The operational status of the datastore */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private DatastoreStatus status; /** @@ -147,4 +146,51 @@ public void validate() { elasticSanVolume().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("netAppVolume", this.netAppVolume); + jsonWriter.writeJsonField("diskPoolVolume", this.diskPoolVolume); + jsonWriter.writeJsonField("elasticSanVolume", this.elasticSanVolume); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatastoreProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatastoreProperties 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 DatastoreProperties. + */ + public static DatastoreProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatastoreProperties deserializedDatastoreProperties = new DatastoreProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedDatastoreProperties.provisioningState + = DatastoreProvisioningState.fromString(reader.getString()); + } else if ("netAppVolume".equals(fieldName)) { + deserializedDatastoreProperties.netAppVolume = NetAppVolume.fromJson(reader); + } else if ("diskPoolVolume".equals(fieldName)) { + deserializedDatastoreProperties.diskPoolVolume = DiskPoolVolume.fromJson(reader); + } else if ("elasticSanVolume".equals(fieldName)) { + deserializedDatastoreProperties.elasticSanVolume = ElasticSanVolume.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedDatastoreProperties.status = DatastoreStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDatastoreProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java index df115276314d0..caf334f972f5f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java @@ -7,8 +7,11 @@ 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.ExpressRouteAuthorizationProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * ExpressRoute Circuit Authorization. @@ -18,15 +21,28 @@ public final class ExpressRouteAuthorizationInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private ExpressRouteAuthorizationProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of ExpressRouteAuthorizationInner class. */ @@ -51,6 +67,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. * @@ -111,4 +157,51 @@ public void validate() { 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 ExpressRouteAuthorizationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExpressRouteAuthorizationInner 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 ExpressRouteAuthorizationInner. + */ + public static ExpressRouteAuthorizationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExpressRouteAuthorizationInner deserializedExpressRouteAuthorizationInner + = new ExpressRouteAuthorizationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExpressRouteAuthorizationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExpressRouteAuthorizationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExpressRouteAuthorizationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedExpressRouteAuthorizationInner.innerProperties + = ExpressRouteAuthorizationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedExpressRouteAuthorizationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExpressRouteAuthorizationInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java index a533f3df560ed..0264950dcd018 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java @@ -5,36 +5,37 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties of an ExpressRoute Circuit Authorization resource. */ @Fluent -public final class ExpressRouteAuthorizationProperties { +public final class ExpressRouteAuthorizationProperties + implements JsonSerializable { /* * The state of the ExpressRoute Circuit Authorization provisioning */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ExpressRouteAuthorizationProvisioningState provisioningState; /* * The ID of the ExpressRoute Circuit Authorization */ - @JsonProperty(value = "expressRouteAuthorizationId", access = JsonProperty.Access.WRITE_ONLY) private String expressRouteAuthorizationId; /* * The key of the ExpressRoute Circuit Authorization */ - @JsonProperty(value = "expressRouteAuthorizationKey", access = JsonProperty.Access.WRITE_ONLY) private String expressRouteAuthorizationKey; /* * The ID of the ExpressRoute Circuit */ - @JsonProperty(value = "expressRouteId") private String expressRouteId; /** @@ -97,4 +98,48 @@ public ExpressRouteAuthorizationProperties withExpressRouteId(String expressRout */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("expressRouteId", this.expressRouteId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExpressRouteAuthorizationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExpressRouteAuthorizationProperties 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 ExpressRouteAuthorizationProperties. + */ + public static ExpressRouteAuthorizationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExpressRouteAuthorizationProperties deserializedExpressRouteAuthorizationProperties + = new ExpressRouteAuthorizationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedExpressRouteAuthorizationProperties.provisioningState + = ExpressRouteAuthorizationProvisioningState.fromString(reader.getString()); + } else if ("expressRouteAuthorizationId".equals(fieldName)) { + deserializedExpressRouteAuthorizationProperties.expressRouteAuthorizationId = reader.getString(); + } else if ("expressRouteAuthorizationKey".equals(fieldName)) { + deserializedExpressRouteAuthorizationProperties.expressRouteAuthorizationKey = reader.getString(); + } else if ("expressRouteId".equals(fieldName)) { + deserializedExpressRouteAuthorizationProperties.expressRouteId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExpressRouteAuthorizationProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java index bd4f507c60a25..ed222baefee14 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java @@ -7,9 +7,12 @@ 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.GlobalReachConnectionProvisioningState; import com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * A global reach connection resource. @@ -19,15 +22,28 @@ public final class GlobalReachConnectionInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private GlobalReachConnectionProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of GlobalReachConnectionInner class. */ @@ -52,6 +68,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. * @@ -165,4 +211,50 @@ public void validate() { 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 GlobalReachConnectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalReachConnectionInner 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 GlobalReachConnectionInner. + */ + public static GlobalReachConnectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalReachConnectionInner deserializedGlobalReachConnectionInner = new GlobalReachConnectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGlobalReachConnectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGlobalReachConnectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGlobalReachConnectionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedGlobalReachConnectionInner.innerProperties + = GlobalReachConnectionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedGlobalReachConnectionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalReachConnectionInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java index ce3ab7ec2f1dc..3d759a9817d27 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java @@ -5,53 +5,51 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.GlobalReachConnectionProvisioningState; import com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties of a global reach connection. */ @Fluent -public final class GlobalReachConnectionProperties { +public final class GlobalReachConnectionProperties implements JsonSerializable { /* * The state of the ExpressRoute Circuit Authorization provisioning */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private GlobalReachConnectionProvisioningState provisioningState; /* * The network used for global reach carved out from the original network block * provided for the private cloud */ - @JsonProperty(value = "addressPrefix", access = JsonProperty.Access.WRITE_ONLY) private String addressPrefix; /* * Authorization key from the peer express route used for the global reach * connection */ - @JsonProperty(value = "authorizationKey") private String authorizationKey; /* * The connection status of the global reach connection */ - @JsonProperty(value = "circuitConnectionStatus", access = JsonProperty.Access.WRITE_ONLY) private GlobalReachConnectionStatus circuitConnectionStatus; /* * Identifier of the ExpressRoute Circuit to peer with in the global reach * connection */ - @JsonProperty(value = "peerExpressRouteCircuit") private String peerExpressRouteCircuit; /* * The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection */ - @JsonProperty(value = "expressRouteId") private String expressRouteId; /** @@ -161,4 +159,55 @@ public GlobalReachConnectionProperties withExpressRouteId(String expressRouteId) */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("authorizationKey", this.authorizationKey); + jsonWriter.writeStringField("peerExpressRouteCircuit", this.peerExpressRouteCircuit); + jsonWriter.writeStringField("expressRouteId", this.expressRouteId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GlobalReachConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalReachConnectionProperties 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 GlobalReachConnectionProperties. + */ + public static GlobalReachConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalReachConnectionProperties deserializedGlobalReachConnectionProperties + = new GlobalReachConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedGlobalReachConnectionProperties.provisioningState + = GlobalReachConnectionProvisioningState.fromString(reader.getString()); + } else if ("addressPrefix".equals(fieldName)) { + deserializedGlobalReachConnectionProperties.addressPrefix = reader.getString(); + } else if ("authorizationKey".equals(fieldName)) { + deserializedGlobalReachConnectionProperties.authorizationKey = reader.getString(); + } else if ("circuitConnectionStatus".equals(fieldName)) { + deserializedGlobalReachConnectionProperties.circuitConnectionStatus + = GlobalReachConnectionStatus.fromString(reader.getString()); + } else if ("peerExpressRouteCircuit".equals(fieldName)) { + deserializedGlobalReachConnectionProperties.peerExpressRouteCircuit = reader.getString(); + } else if ("expressRouteId".equals(fieldName)) { + deserializedGlobalReachConnectionProperties.expressRouteId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalReachConnectionProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java index d4df2fcecfbf6..b4fbdc678979d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java @@ -7,9 +7,12 @@ 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.HcxEnterpriseSiteProvisioningState; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * An HCX Enterprise Site resource. @@ -19,15 +22,28 @@ public final class HcxEnterpriseSiteInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private HcxEnterpriseSiteProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of HcxEnterpriseSiteInner class. */ @@ -52,6 +68,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -89,4 +135,49 @@ public void validate() { 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 HcxEnterpriseSiteInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HcxEnterpriseSiteInner 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 HcxEnterpriseSiteInner. + */ + public static HcxEnterpriseSiteInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HcxEnterpriseSiteInner deserializedHcxEnterpriseSiteInner = new HcxEnterpriseSiteInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedHcxEnterpriseSiteInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedHcxEnterpriseSiteInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedHcxEnterpriseSiteInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedHcxEnterpriseSiteInner.innerProperties = HcxEnterpriseSiteProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedHcxEnterpriseSiteInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedHcxEnterpriseSiteInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java index 3bb0c1a2a3c2d..94feae234d74e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java @@ -5,31 +5,32 @@ 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.HcxEnterpriseSiteProvisioningState; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties of an HCX Enterprise Site. */ @Immutable -public final class HcxEnterpriseSiteProperties { +public final class HcxEnterpriseSiteProperties implements JsonSerializable { /* * The provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private HcxEnterpriseSiteProvisioningState provisioningState; /* * The activation key */ - @JsonProperty(value = "activationKey", access = JsonProperty.Access.WRITE_ONLY) private String activationKey; /* * The status of the HCX Enterprise Site */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private HcxEnterpriseSiteStatus status; /** @@ -72,4 +73,45 @@ public HcxEnterpriseSiteStatus status() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HcxEnterpriseSiteProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HcxEnterpriseSiteProperties 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 HcxEnterpriseSiteProperties. + */ + public static HcxEnterpriseSiteProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HcxEnterpriseSiteProperties deserializedHcxEnterpriseSiteProperties = new HcxEnterpriseSiteProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedHcxEnterpriseSiteProperties.provisioningState + = HcxEnterpriseSiteProvisioningState.fromString(reader.getString()); + } else if ("activationKey".equals(fieldName)) { + deserializedHcxEnterpriseSiteProperties.activationKey = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedHcxEnterpriseSiteProperties.status + = HcxEnterpriseSiteStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedHcxEnterpriseSiteProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java index a9415c7a0322b..d2cac63467d77 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java @@ -7,8 +7,11 @@ 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.IscsiPathProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * An iSCSI path resource. @@ -18,15 +21,28 @@ public final class IscsiPathInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private IscsiPathProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of IscsiPathInner class. */ @@ -51,6 +67,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The state of the iSCSI path provisioning. * @@ -93,4 +139,49 @@ public void validate() { 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 IscsiPathInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IscsiPathInner 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 IscsiPathInner. + */ + public static IscsiPathInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IscsiPathInner deserializedIscsiPathInner = new IscsiPathInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedIscsiPathInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedIscsiPathInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIscsiPathInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedIscsiPathInner.innerProperties = IscsiPathProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedIscsiPathInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIscsiPathInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java index 9805121d8885f..5f333c4f4f36f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java @@ -6,24 +6,26 @@ 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.IscsiPathProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties of an iSCSI path resource. */ @Fluent -public final class IscsiPathProperties { +public final class IscsiPathProperties implements JsonSerializable { /* * The state of the iSCSI path provisioning */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private IscsiPathProvisioningState provisioningState; /* * CIDR Block for iSCSI path. */ - @JsonProperty(value = "networkBlock", required = true) private String networkBlock; /** @@ -75,4 +77,44 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(IscsiPathProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkBlock", this.networkBlock); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IscsiPathProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IscsiPathProperties 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 IscsiPathProperties. + */ + public static IscsiPathProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IscsiPathProperties deserializedIscsiPathProperties = new IscsiPathProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkBlock".equals(fieldName)) { + deserializedIscsiPathProperties.networkBlock = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedIscsiPathProperties.provisioningState + = IscsiPathProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIscsiPathProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java index 27cf8fe769159..e89aec5bce322 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java @@ -5,47 +5,46 @@ 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.ActionType; import com.azure.resourcemanager.avs.models.OperationDisplay; import com.azure.resourcemanager.avs.models.Origin; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Details of a REST API operation, returned from the Resource Provider Operations API. */ @Immutable -public final class OperationInner { +public final class OperationInner implements JsonSerializable { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure * Resource Manager/control-plane operations. */ - @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; /* * Localized display information for this particular operation. */ - @JsonProperty(value = "display") private OperationDisplay display; /* * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default * value is "user,system" */ - @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) private Origin origin; /* * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ - @JsonProperty(value = "actionType") private ActionType actionType; /** @@ -113,4 +112,49 @@ public void validate() { display().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("display", this.display); + jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInner 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 OperationInner. + */ + public static OperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInner deserializedOperationInner = new OperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationInner.name = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationDisplay.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationInner.origin = Origin.fromString(reader.getString()); + } else if ("actionType".equals(fieldName)) { + deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java index 84d9a97e866e4..5583ff808096c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java @@ -7,8 +7,11 @@ 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.PlacementPolicyProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * A vSphere Distributed Resource Scheduler (DRS) placement policy. @@ -18,15 +21,28 @@ public final class PlacementPolicyInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private PlacementPolicyProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of PlacementPolicyInner class. */ @@ -62,6 +78,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Validates the instance. * @@ -72,4 +118,49 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlacementPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlacementPolicyInner 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 PlacementPolicyInner. + */ + public static PlacementPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlacementPolicyInner deserializedPlacementPolicyInner = new PlacementPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPlacementPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPlacementPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPlacementPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPlacementPolicyInner.properties = PlacementPolicyProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPlacementPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPlacementPolicyInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java index 28a2b7a2c78e8..9e5937d640771 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java @@ -5,45 +5,44 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.AffinityStrength; import com.azure.resourcemanager.avs.models.AzureHybridBenefitType; import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties of a placement policy resource that may be updated. */ @Fluent -public final class PlacementPolicyUpdateProperties { +public final class PlacementPolicyUpdateProperties implements JsonSerializable { /* * Whether the placement policy is enabled or disabled */ - @JsonProperty(value = "state") private PlacementPolicyState state; /* * Virtual machine members list */ - @JsonProperty(value = "vmMembers") private List vmMembers; /* * Host members list */ - @JsonProperty(value = "hostMembers") private List hostMembers; /* * vm-host placement policy affinity strength (should/must) */ - @JsonProperty(value = "affinityStrength") private AffinityStrength affinityStrength; /* * placement policy azure hybrid benefit opt-in type */ - @JsonProperty(value = "azureHybridBenefitType") private AzureHybridBenefitType azureHybridBenefitType; /** @@ -159,4 +158,60 @@ public PlacementPolicyUpdateProperties withAzureHybridBenefitType(AzureHybridBen */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeArrayField("vmMembers", this.vmMembers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("hostMembers", this.hostMembers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("affinityStrength", + this.affinityStrength == null ? null : this.affinityStrength.toString()); + jsonWriter.writeStringField("azureHybridBenefitType", + this.azureHybridBenefitType == null ? null : this.azureHybridBenefitType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlacementPolicyUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlacementPolicyUpdateProperties 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 PlacementPolicyUpdateProperties. + */ + public static PlacementPolicyUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlacementPolicyUpdateProperties deserializedPlacementPolicyUpdateProperties + = new PlacementPolicyUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedPlacementPolicyUpdateProperties.state + = PlacementPolicyState.fromString(reader.getString()); + } else if ("vmMembers".equals(fieldName)) { + List vmMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedPlacementPolicyUpdateProperties.vmMembers = vmMembers; + } else if ("hostMembers".equals(fieldName)) { + List hostMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedPlacementPolicyUpdateProperties.hostMembers = hostMembers; + } else if ("affinityStrength".equals(fieldName)) { + deserializedPlacementPolicyUpdateProperties.affinityStrength + = AffinityStrength.fromString(reader.getString()); + } else if ("azureHybridBenefitType".equals(fieldName)) { + deserializedPlacementPolicyUpdateProperties.azureHybridBenefitType + = AzureHybridBenefitType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPlacementPolicyUpdateProperties; + }); + } } 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 2c929ef1c84ff..86694aaa6813a 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 @@ -8,6 +8,9 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; import com.azure.resourcemanager.avs.models.DnsZoneType; @@ -20,7 +23,7 @@ import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; import com.azure.resourcemanager.avs.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -32,27 +35,38 @@ public final class PrivateCloudInner extends Resource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private PrivateCloudProperties innerProperties; /* * The SKU (Stock Keeping Unit) assigned to this resource. */ - @JsonProperty(value = "sku", required = true) private Sku sku; /* * The managed service identities assigned to this resource. */ - @JsonProperty(value = "identity") private PrivateCloudIdentity identity; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of PrivateCloudInner class. */ @@ -117,6 +131,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -552,4 +596,62 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateCloudInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateCloudInner 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 PrivateCloudInner. + */ + public static PrivateCloudInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateCloudInner deserializedPrivateCloudInner = new PrivateCloudInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateCloudInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateCloudInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateCloudInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPrivateCloudInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPrivateCloudInner.withTags(tags); + } else if ("sku".equals(fieldName)) { + deserializedPrivateCloudInner.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedPrivateCloudInner.innerProperties = PrivateCloudProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedPrivateCloudInner.identity = PrivateCloudIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateCloudInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateCloudInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java index 24e51a75a3961..9de94fbf4a157 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java @@ -6,6 +6,10 @@ 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.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; import com.azure.resourcemanager.avs.models.DnsZoneType; @@ -16,42 +20,37 @@ import com.azure.resourcemanager.avs.models.ManagementCluster; import com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum; import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties of a private cloud resource. */ @Fluent -public final class PrivateCloudProperties { +public final class PrivateCloudProperties implements JsonSerializable { /* * The default cluster used for management */ - @JsonProperty(value = "managementCluster", required = true) private ManagementCluster managementCluster; /* * Connectivity to internet is enabled or disabled */ - @JsonProperty(value = "internet") private InternetEnum internet; /* * vCenter Single Sign On Identity Sources */ - @JsonProperty(value = "identitySources") private List identitySources; /* * Properties describing how the cloud is distributed across availability zones */ - @JsonProperty(value = "availability") private AvailabilityProperties availability; /* * Customer managed key encryption, can be enabled or disabled */ - @JsonProperty(value = "encryption") private Encryption encryption; /* @@ -60,25 +59,21 @@ public final class PrivateCloudProperties { * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to * (A.B.C.D/X). */ - @JsonProperty(value = "extendedNetworkBlocks") private List extendedNetworkBlocks; /* * The provisioning state */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateCloudProvisioningState provisioningState; /* * An ExpressRoute Circuit */ - @JsonProperty(value = "circuit") private Circuit circuit; /* * The endpoints */ - @JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY) private Endpoints endpoints; /* @@ -86,81 +81,68 @@ public final class PrivateCloudProperties { * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where * A,B,C,D are between 0 and 255, and X is between 0 and 22 */ - @JsonProperty(value = "networkBlock", required = true) private String networkBlock; /* * Network used to access vCenter Server and NSX-T Manager */ - @JsonProperty(value = "managementNetwork", access = JsonProperty.Access.WRITE_ONLY) private String managementNetwork; /* * Used for virtual machine cold migration, cloning, and snapshot migration */ - @JsonProperty(value = "provisioningNetwork", access = JsonProperty.Access.WRITE_ONLY) private String provisioningNetwork; /* * Used for live migration of virtual machines */ - @JsonProperty(value = "vmotionNetwork", access = JsonProperty.Access.WRITE_ONLY) private String vmotionNetwork; /* * Optionally, set the vCenter admin password when the private cloud is created */ - @JsonProperty(value = "vcenterPassword") private String vcenterPassword; /* * Optionally, set the NSX-T Manager password when the private cloud is created */ - @JsonProperty(value = "nsxtPassword") private String nsxtPassword; /* * Thumbprint of the vCenter Server SSL certificate */ - @JsonProperty(value = "vcenterCertificateThumbprint", access = JsonProperty.Access.WRITE_ONLY) private String vcenterCertificateThumbprint; /* * Thumbprint of the NSX-T Manager SSL certificate */ - @JsonProperty(value = "nsxtCertificateThumbprint", access = JsonProperty.Access.WRITE_ONLY) private String nsxtCertificateThumbprint; /* * Array of cloud link IDs from other clouds that connect to this one */ - @JsonProperty(value = "externalCloudLinks", access = JsonProperty.Access.WRITE_ONLY) private List externalCloudLinks; /* * A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud */ - @JsonProperty(value = "secondaryCircuit") private Circuit secondaryCircuit; /* * Flag to indicate whether the private cloud has the quota for provisioned NSX * Public IP count raised from 64 to 1024 */ - @JsonProperty(value = "nsxPublicIpQuotaRaised", access = JsonProperty.Access.WRITE_ONLY) private NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised; /* * Azure resource ID of the virtual network */ - @JsonProperty(value = "virtualNetworkId") private String virtualNetworkId; /* * The type of DNS zone to use. */ - @JsonProperty(value = "dnsZoneType") private DnsZoneType dnsZoneType; /** @@ -565,4 +547,103 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("managementCluster", this.managementCluster); + jsonWriter.writeStringField("networkBlock", this.networkBlock); + jsonWriter.writeStringField("internet", this.internet == null ? null : this.internet.toString()); + jsonWriter.writeArrayField("identitySources", this.identitySources, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("availability", this.availability); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeArrayField("extendedNetworkBlocks", this.extendedNetworkBlocks, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("circuit", this.circuit); + jsonWriter.writeStringField("vcenterPassword", this.vcenterPassword); + jsonWriter.writeStringField("nsxtPassword", this.nsxtPassword); + jsonWriter.writeJsonField("secondaryCircuit", this.secondaryCircuit); + jsonWriter.writeStringField("virtualNetworkId", this.virtualNetworkId); + jsonWriter.writeStringField("dnsZoneType", this.dnsZoneType == null ? null : this.dnsZoneType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateCloudProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateCloudProperties 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 PrivateCloudProperties. + */ + public static PrivateCloudProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateCloudProperties deserializedPrivateCloudProperties = new PrivateCloudProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managementCluster".equals(fieldName)) { + deserializedPrivateCloudProperties.managementCluster = ManagementCluster.fromJson(reader); + } else if ("networkBlock".equals(fieldName)) { + deserializedPrivateCloudProperties.networkBlock = reader.getString(); + } else if ("internet".equals(fieldName)) { + deserializedPrivateCloudProperties.internet = InternetEnum.fromString(reader.getString()); + } else if ("identitySources".equals(fieldName)) { + List identitySources + = reader.readArray(reader1 -> IdentitySource.fromJson(reader1)); + deserializedPrivateCloudProperties.identitySources = identitySources; + } else if ("availability".equals(fieldName)) { + deserializedPrivateCloudProperties.availability = AvailabilityProperties.fromJson(reader); + } else if ("encryption".equals(fieldName)) { + deserializedPrivateCloudProperties.encryption = Encryption.fromJson(reader); + } else if ("extendedNetworkBlocks".equals(fieldName)) { + List extendedNetworkBlocks = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateCloudProperties.extendedNetworkBlocks = extendedNetworkBlocks; + } else if ("provisioningState".equals(fieldName)) { + deserializedPrivateCloudProperties.provisioningState + = PrivateCloudProvisioningState.fromString(reader.getString()); + } else if ("circuit".equals(fieldName)) { + deserializedPrivateCloudProperties.circuit = Circuit.fromJson(reader); + } else if ("endpoints".equals(fieldName)) { + deserializedPrivateCloudProperties.endpoints = Endpoints.fromJson(reader); + } else if ("managementNetwork".equals(fieldName)) { + deserializedPrivateCloudProperties.managementNetwork = reader.getString(); + } else if ("provisioningNetwork".equals(fieldName)) { + deserializedPrivateCloudProperties.provisioningNetwork = reader.getString(); + } else if ("vmotionNetwork".equals(fieldName)) { + deserializedPrivateCloudProperties.vmotionNetwork = reader.getString(); + } else if ("vcenterPassword".equals(fieldName)) { + deserializedPrivateCloudProperties.vcenterPassword = reader.getString(); + } else if ("nsxtPassword".equals(fieldName)) { + deserializedPrivateCloudProperties.nsxtPassword = reader.getString(); + } else if ("vcenterCertificateThumbprint".equals(fieldName)) { + deserializedPrivateCloudProperties.vcenterCertificateThumbprint = reader.getString(); + } else if ("nsxtCertificateThumbprint".equals(fieldName)) { + deserializedPrivateCloudProperties.nsxtCertificateThumbprint = reader.getString(); + } else if ("externalCloudLinks".equals(fieldName)) { + List externalCloudLinks = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateCloudProperties.externalCloudLinks = externalCloudLinks; + } else if ("secondaryCircuit".equals(fieldName)) { + deserializedPrivateCloudProperties.secondaryCircuit = Circuit.fromJson(reader); + } else if ("nsxPublicIpQuotaRaised".equals(fieldName)) { + deserializedPrivateCloudProperties.nsxPublicIpQuotaRaised + = NsxPublicIpQuotaRaisedEnum.fromString(reader.getString()); + } else if ("virtualNetworkId".equals(fieldName)) { + deserializedPrivateCloudProperties.virtualNetworkId = reader.getString(); + } else if ("dnsZoneType".equals(fieldName)) { + deserializedPrivateCloudProperties.dnsZoneType = DnsZoneType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateCloudProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java index 75331a19e186c..da1d4d2bbdbeb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java @@ -5,48 +5,47 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.DnsZoneType; import com.azure.resourcemanager.avs.models.Encryption; import com.azure.resourcemanager.avs.models.IdentitySource; import com.azure.resourcemanager.avs.models.InternetEnum; import com.azure.resourcemanager.avs.models.ManagementCluster; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The properties of a private cloud resource that may be updated. */ @Fluent -public final class PrivateCloudUpdateProperties { +public final class PrivateCloudUpdateProperties implements JsonSerializable { /* * The default cluster used for management */ - @JsonProperty(value = "managementCluster") private ManagementCluster managementCluster; /* * Connectivity to internet is enabled or disabled */ - @JsonProperty(value = "internet") private InternetEnum internet; /* * vCenter Single Sign On Identity Sources */ - @JsonProperty(value = "identitySources") private List identitySources; /* * Properties describing how the cloud is distributed across availability zones */ - @JsonProperty(value = "availability") private AvailabilityProperties availability; /* * Customer managed key encryption, can be enabled or disabled */ - @JsonProperty(value = "encryption") private Encryption encryption; /* @@ -55,13 +54,11 @@ public final class PrivateCloudUpdateProperties { * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to * (A.B.C.D/X). */ - @JsonProperty(value = "extendedNetworkBlocks") private List extendedNetworkBlocks; /* * The type of DNS zone to use. */ - @JsonProperty(value = "dnsZoneType") private DnsZoneType dnsZoneType; /** @@ -237,4 +234,63 @@ public void validate() { encryption().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("managementCluster", this.managementCluster); + jsonWriter.writeStringField("internet", this.internet == null ? null : this.internet.toString()); + jsonWriter.writeArrayField("identitySources", this.identitySources, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("availability", this.availability); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeArrayField("extendedNetworkBlocks", this.extendedNetworkBlocks, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("dnsZoneType", this.dnsZoneType == null ? null : this.dnsZoneType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateCloudUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateCloudUpdateProperties 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 PrivateCloudUpdateProperties. + */ + public static PrivateCloudUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateCloudUpdateProperties deserializedPrivateCloudUpdateProperties = new PrivateCloudUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managementCluster".equals(fieldName)) { + deserializedPrivateCloudUpdateProperties.managementCluster = ManagementCluster.fromJson(reader); + } else if ("internet".equals(fieldName)) { + deserializedPrivateCloudUpdateProperties.internet = InternetEnum.fromString(reader.getString()); + } else if ("identitySources".equals(fieldName)) { + List identitySources + = reader.readArray(reader1 -> IdentitySource.fromJson(reader1)); + deserializedPrivateCloudUpdateProperties.identitySources = identitySources; + } else if ("availability".equals(fieldName)) { + deserializedPrivateCloudUpdateProperties.availability = AvailabilityProperties.fromJson(reader); + } else if ("encryption".equals(fieldName)) { + deserializedPrivateCloudUpdateProperties.encryption = Encryption.fromJson(reader); + } else if ("extendedNetworkBlocks".equals(fieldName)) { + List extendedNetworkBlocks = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateCloudUpdateProperties.extendedNetworkBlocks = extendedNetworkBlocks; + } else if ("dnsZoneType".equals(fieldName)) { + deserializedPrivateCloudUpdateProperties.dnsZoneType = DnsZoneType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateCloudUpdateProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java index 0a5dbcbe67542..3cb22332a58a0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java @@ -5,27 +5,27 @@ 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.QuotaEnabled; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** * Subscription quotas. */ @Immutable -public final class QuotaInner { +public final class QuotaInner implements JsonSerializable { /* * Remaining hosts quota by sku type */ - @JsonProperty(value = "hostsRemaining", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map hostsRemaining; /* * Host quota is active for current subscription */ - @JsonProperty(value = "quotaEnabled", access = JsonProperty.Access.WRITE_ONLY) private QuotaEnabled quotaEnabled; /** @@ -59,4 +59,42 @@ public QuotaEnabled quotaEnabled() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QuotaInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QuotaInner 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 QuotaInner. + */ + public static QuotaInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QuotaInner deserializedQuotaInner = new QuotaInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hostsRemaining".equals(fieldName)) { + Map hostsRemaining = reader.readMap(reader1 -> reader1.getInt()); + deserializedQuotaInner.hostsRemaining = hostsRemaining; + } else if ("quotaEnabled".equals(fieldName)) { + deserializedQuotaInner.quotaEnabled = QuotaEnabled.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedQuotaInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java index ded591577ce9a..59f17f2eed70b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java @@ -7,10 +7,13 @@ 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.ScriptCmdletAudience; import com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState; import com.azure.resourcemanager.avs.models.ScriptParameter; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -21,15 +24,28 @@ public final class ScriptCmdletInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private ScriptCmdletProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of ScriptCmdletInner class. */ @@ -54,6 +70,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -110,4 +156,49 @@ public void validate() { 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 ScriptCmdletInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptCmdletInner 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 ScriptCmdletInner. + */ + public static ScriptCmdletInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptCmdletInner deserializedScriptCmdletInner = new ScriptCmdletInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedScriptCmdletInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedScriptCmdletInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScriptCmdletInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScriptCmdletInner.innerProperties = ScriptCmdletProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedScriptCmdletInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptCmdletInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java index f5ffa64bdb371..64f1e523c7f64 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java @@ -5,45 +5,44 @@ 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.ScriptCmdletAudience; import com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState; import com.azure.resourcemanager.avs.models.ScriptParameter; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Properties of a pre-canned script. */ @Immutable -public final class ScriptCmdletProperties { +public final class ScriptCmdletProperties implements JsonSerializable { /* * The provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ScriptCmdletProvisioningState provisioningState; /* * Description of the scripts functionality */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * Recommended time limit for execution */ - @JsonProperty(value = "timeout", access = JsonProperty.Access.WRITE_ONLY) private String timeout; /* * Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers */ - @JsonProperty(value = "audience", access = JsonProperty.Access.WRITE_ONLY) private ScriptCmdletAudience audience; /* * Parameters the script will accept */ - @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) private List parameters; /** @@ -108,4 +107,49 @@ public void validate() { parameters().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptCmdletProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptCmdletProperties 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 ScriptCmdletProperties. + */ + public static ScriptCmdletProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptCmdletProperties deserializedScriptCmdletProperties = new ScriptCmdletProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedScriptCmdletProperties.provisioningState + = ScriptCmdletProvisioningState.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedScriptCmdletProperties.description = reader.getString(); + } else if ("timeout".equals(fieldName)) { + deserializedScriptCmdletProperties.timeout = reader.getString(); + } else if ("audience".equals(fieldName)) { + deserializedScriptCmdletProperties.audience = ScriptCmdletAudience.fromString(reader.getString()); + } else if ("parameters".equals(fieldName)) { + List parameters = reader.readArray(reader1 -> ScriptParameter.fromJson(reader1)); + deserializedScriptCmdletProperties.parameters = parameters; + } else { + reader.skipChildren(); + } + } + + return deserializedScriptCmdletProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java index 198eed3a2d44c..a09b45713f6b6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java @@ -7,9 +7,12 @@ 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.ScriptExecutionParameter; import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; @@ -22,15 +25,28 @@ public final class ScriptExecutionInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private ScriptExecutionProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of ScriptExecutionInner class. */ @@ -55,6 +71,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. * @@ -316,4 +362,49 @@ public void validate() { 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 ScriptExecutionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptExecutionInner 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 ScriptExecutionInner. + */ + public static ScriptExecutionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptExecutionInner deserializedScriptExecutionInner = new ScriptExecutionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedScriptExecutionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedScriptExecutionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScriptExecutionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScriptExecutionInner.innerProperties = ScriptExecutionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedScriptExecutionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptExecutionInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java index a42f199843f78..161f8ead51bdb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java @@ -5,11 +5,15 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; 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.ScriptExecutionParameter; import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; @@ -18,98 +22,82 @@ * Properties of a user-invoked script. */ @Fluent -public final class ScriptExecutionProperties { +public final class ScriptExecutionProperties implements JsonSerializable { /* * A reference to the script cmdlet resource if user is running a AVS script */ - @JsonProperty(value = "scriptCmdletId") private String scriptCmdletId; /* * Parameters the script will accept */ - @JsonProperty(value = "parameters") private List parameters; /* * Parameters that will be hidden/not visible to ARM, such as passwords and * credentials */ - @JsonProperty(value = "hiddenParameters") private List hiddenParameters; /* * Error message if the script was able to run, but if the script itself had * errors or powershell threw an exception */ - @JsonProperty(value = "failureReason") private String failureReason; /* * Time limit for execution */ - @JsonProperty(value = "timeout", required = true) private String timeout; /* * Time to live for the resource. If not provided, will be available for 60 days */ - @JsonProperty(value = "retention") private String retention; /* * Time the script execution was submitted */ - @JsonProperty(value = "submittedAt", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime submittedAt; /* * Time the script execution was started */ - @JsonProperty(value = "startedAt", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime startedAt; /* * Time the script execution was finished */ - @JsonProperty(value = "finishedAt", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime finishedAt; /* * The state of the script execution resource */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ScriptExecutionProvisioningState provisioningState; /* * Standard output stream from the powershell execution */ - @JsonProperty(value = "output") private List output; /* * User-defined dictionary. */ - @JsonProperty(value = "namedOutputs") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map namedOutputs; /* * Standard information out stream from the powershell execution */ - @JsonProperty(value = "information", access = JsonProperty.Access.WRITE_ONLY) private List information; /* * Standard warning out stream from the powershell execution */ - @JsonProperty(value = "warnings", access = JsonProperty.Access.WRITE_ONLY) private List warnings; /* * Standard error output stream from the powershell execution */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private List errors; /** @@ -365,4 +353,90 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("timeout", this.timeout); + jsonWriter.writeStringField("scriptCmdletId", this.scriptCmdletId); + jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("hiddenParameters", this.hiddenParameters, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("failureReason", this.failureReason); + jsonWriter.writeStringField("retention", this.retention); + jsonWriter.writeArrayField("output", this.output, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("namedOutputs", this.namedOutputs, (writer, element) -> writer.writeUntyped(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptExecutionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptExecutionProperties 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 ScriptExecutionProperties. + */ + public static ScriptExecutionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptExecutionProperties deserializedScriptExecutionProperties = new ScriptExecutionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("timeout".equals(fieldName)) { + deserializedScriptExecutionProperties.timeout = reader.getString(); + } else if ("scriptCmdletId".equals(fieldName)) { + deserializedScriptExecutionProperties.scriptCmdletId = reader.getString(); + } else if ("parameters".equals(fieldName)) { + List parameters + = reader.readArray(reader1 -> ScriptExecutionParameter.fromJson(reader1)); + deserializedScriptExecutionProperties.parameters = parameters; + } else if ("hiddenParameters".equals(fieldName)) { + List hiddenParameters + = reader.readArray(reader1 -> ScriptExecutionParameter.fromJson(reader1)); + deserializedScriptExecutionProperties.hiddenParameters = hiddenParameters; + } else if ("failureReason".equals(fieldName)) { + deserializedScriptExecutionProperties.failureReason = reader.getString(); + } else if ("retention".equals(fieldName)) { + deserializedScriptExecutionProperties.retention = reader.getString(); + } else if ("submittedAt".equals(fieldName)) { + deserializedScriptExecutionProperties.submittedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("startedAt".equals(fieldName)) { + deserializedScriptExecutionProperties.startedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("finishedAt".equals(fieldName)) { + deserializedScriptExecutionProperties.finishedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedScriptExecutionProperties.provisioningState + = ScriptExecutionProvisioningState.fromString(reader.getString()); + } else if ("output".equals(fieldName)) { + List output = reader.readArray(reader1 -> reader1.getString()); + deserializedScriptExecutionProperties.output = output; + } else if ("namedOutputs".equals(fieldName)) { + Map namedOutputs = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedScriptExecutionProperties.namedOutputs = namedOutputs; + } else if ("information".equals(fieldName)) { + List information = reader.readArray(reader1 -> reader1.getString()); + deserializedScriptExecutionProperties.information = information; + } else if ("warnings".equals(fieldName)) { + List warnings = reader.readArray(reader1 -> reader1.getString()); + deserializedScriptExecutionProperties.warnings = warnings; + } else if ("errors".equals(fieldName)) { + List errors = reader.readArray(reader1 -> reader1.getString()); + deserializedScriptExecutionProperties.errors = errors; + } else { + reader.skipChildren(); + } + } + + return deserializedScriptExecutionProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java index 4cc0eecab0075..54f8cd2dbac62 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java @@ -7,8 +7,11 @@ 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.ScriptPackageProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Script Package resources available for execution. @@ -18,15 +21,28 @@ public final class ScriptPackageInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private ScriptPackageProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of ScriptPackageInner class. */ @@ -51,6 +67,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -106,4 +152,49 @@ public void validate() { 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 ScriptPackageInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptPackageInner 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 ScriptPackageInner. + */ + public static ScriptPackageInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptPackageInner deserializedScriptPackageInner = new ScriptPackageInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedScriptPackageInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedScriptPackageInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScriptPackageInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScriptPackageInner.innerProperties = ScriptPackageProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedScriptPackageInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptPackageInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java index 105e4c3dc3fd2..2102134fa1d9e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java @@ -5,42 +5,41 @@ 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.ScriptPackageProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of a Script Package subresource. */ @Immutable -public final class ScriptPackageProperties { +public final class ScriptPackageProperties implements JsonSerializable { /* * The provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ScriptPackageProvisioningState provisioningState; /* * User friendly description of the package */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * Module version */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private String version; /* * Company that created and supports the package */ - @JsonProperty(value = "company", access = JsonProperty.Access.WRITE_ONLY) private String company; /* * Link to support by the package vendor */ - @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY) private String uri; /** @@ -101,4 +100,48 @@ public String uri() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptPackageProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptPackageProperties 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 ScriptPackageProperties. + */ + public static ScriptPackageProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptPackageProperties deserializedScriptPackageProperties = new ScriptPackageProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedScriptPackageProperties.provisioningState + = ScriptPackageProvisioningState.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedScriptPackageProperties.description = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedScriptPackageProperties.version = reader.getString(); + } else if ("company".equals(fieldName)) { + deserializedScriptPackageProperties.company = reader.getString(); + } else if ("uri".equals(fieldName)) { + deserializedScriptPackageProperties.uri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptPackageProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java index 9607a384a54ca..82c6e9f8cd527 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java @@ -5,24 +5,26 @@ 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.TrialStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Subscription trial availability. */ @Immutable -public final class TrialInner { +public final class TrialInner implements JsonSerializable { /* * Trial status */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private TrialStatus status; /* * Number of trial hosts available */ - @JsonProperty(value = "availableHosts", access = JsonProperty.Access.WRITE_ONLY) private Integer availableHosts; /** @@ -56,4 +58,41 @@ public Integer availableHosts() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrialInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrialInner 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 TrialInner. + */ + public static TrialInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrialInner deserializedTrialInner = new TrialInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedTrialInner.status = TrialStatus.fromString(reader.getString()); + } else if ("availableHosts".equals(fieldName)) { + deserializedTrialInner.availableHosts = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedTrialInner; + }); + } } 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 c83e75c872caa..541dd0138869b 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 @@ -7,9 +7,12 @@ 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.VirtualMachineProvisioningState; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Virtual Machine. @@ -19,15 +22,28 @@ public final class VirtualMachineInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private VirtualMachineProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of VirtualMachineInner class. */ @@ -52,6 +68,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -107,4 +153,49 @@ public void validate() { 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 VirtualMachineInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineInner 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 VirtualMachineInner. + */ + public static VirtualMachineInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineInner deserializedVirtualMachineInner = new VirtualMachineInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVirtualMachineInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVirtualMachineInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVirtualMachineInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVirtualMachineInner.innerProperties = VirtualMachineProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVirtualMachineInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineInner; + }); + } } 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 bfbdda084033b..9273133818c56 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java @@ -5,43 +5,42 @@ 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.VirtualMachineProvisioningState; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Virtual Machine Properties. */ @Immutable -public final class VirtualMachineProperties { +public final class VirtualMachineProperties implements JsonSerializable { /* * The provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private VirtualMachineProvisioningState provisioningState; /* * Display name of the VM. */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) private String displayName; /* * Virtual machine managed object reference id */ - @JsonProperty(value = "moRefId", access = JsonProperty.Access.WRITE_ONLY) private String moRefId; /* * Path to virtual machine's folder starting from datacenter virtual machine folder */ - @JsonProperty(value = "folderPath", access = JsonProperty.Access.WRITE_ONLY) private String folderPath; /* * Whether VM DRS-driven movement is restricted (enabled) or not (disabled) */ - @JsonProperty(value = "restrictMovement", access = JsonProperty.Access.WRITE_ONLY) private VirtualMachineRestrictMovementState restrictMovement; /** @@ -102,4 +101,49 @@ public VirtualMachineRestrictMovementState restrictMovement() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineProperties 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 VirtualMachineProperties. + */ + public static VirtualMachineProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineProperties deserializedVirtualMachineProperties = new VirtualMachineProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedVirtualMachineProperties.provisioningState + = VirtualMachineProvisioningState.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedVirtualMachineProperties.displayName = reader.getString(); + } else if ("moRefId".equals(fieldName)) { + deserializedVirtualMachineProperties.moRefId = reader.getString(); + } else if ("folderPath".equals(fieldName)) { + deserializedVirtualMachineProperties.folderPath = reader.getString(); + } else if ("restrictMovement".equals(fieldName)) { + deserializedVirtualMachineProperties.restrictMovement + = VirtualMachineRestrictMovementState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java index 052c6d57ad554..306524f570db5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java @@ -7,8 +7,11 @@ 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.WorkloadNetworkDhcpEntity; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * NSX DHCP. @@ -18,15 +21,28 @@ public final class WorkloadNetworkDhcpInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkDhcpEntity properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkDhcpInner class. */ @@ -62,6 +78,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Validates the instance. * @@ -72,4 +118,49 @@ public void validate() { properties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkDhcpInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDhcpInner 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 WorkloadNetworkDhcpInner. + */ + public static WorkloadNetworkDhcpInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDhcpInner deserializedWorkloadNetworkDhcpInner = new WorkloadNetworkDhcpInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkDhcpInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkDhcpInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkDhcpInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkDhcpInner.properties = WorkloadNetworkDhcpEntity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkDhcpInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDhcpInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java index 85e9ec01288ef..29942b1b1293e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java @@ -7,10 +7,13 @@ 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.DnsServiceLogLevelEnum; import com.azure.resourcemanager.avs.models.DnsServiceStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -21,15 +24,28 @@ public final class WorkloadNetworkDnsServiceInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkDnsServiceProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkDnsServiceInner class. */ @@ -54,6 +70,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the displayName property: Display name of the DNS Service. * @@ -220,4 +266,51 @@ public void validate() { 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 WorkloadNetworkDnsServiceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDnsServiceInner 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 WorkloadNetworkDnsServiceInner. + */ + public static WorkloadNetworkDnsServiceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDnsServiceInner deserializedWorkloadNetworkDnsServiceInner + = new WorkloadNetworkDnsServiceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceInner.innerProperties + = WorkloadNetworkDnsServiceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDnsServiceInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java index 28dccf51ed7e4..160ab63b7b651 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java @@ -5,63 +5,60 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import com.azure.resourcemanager.avs.models.DnsServiceStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * NSX DNS Service Properties. */ @Fluent -public final class WorkloadNetworkDnsServiceProperties { +public final class WorkloadNetworkDnsServiceProperties + implements JsonSerializable { /* * Display name of the DNS Service. */ - @JsonProperty(value = "displayName") private String displayName; /* * DNS service IP of the DNS Service. */ - @JsonProperty(value = "dnsServiceIp") private String dnsServiceIp; /* * Default DNS zone of the DNS Service. */ - @JsonProperty(value = "defaultDnsZone") private String defaultDnsZone; /* * FQDN zones of the DNS Service. */ - @JsonProperty(value = "fqdnZones") private List fqdnZones; /* * DNS Service log level. */ - @JsonProperty(value = "logLevel") private DnsServiceLogLevelEnum logLevel; /* * DNS Service status. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private DnsServiceStatusEnum status; /* * The provisioning state */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkDnsServiceProvisioningState provisioningState; /* * NSX revision number. */ - @JsonProperty(value = "revision") private Long revision; /** @@ -215,4 +212,64 @@ public WorkloadNetworkDnsServiceProperties withRevision(Long revision) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("dnsServiceIp", this.dnsServiceIp); + jsonWriter.writeStringField("defaultDnsZone", this.defaultDnsZone); + jsonWriter.writeArrayField("fqdnZones", this.fqdnZones, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("logLevel", this.logLevel == null ? null : this.logLevel.toString()); + jsonWriter.writeNumberField("revision", this.revision); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkDnsServiceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDnsServiceProperties 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 WorkloadNetworkDnsServiceProperties. + */ + public static WorkloadNetworkDnsServiceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDnsServiceProperties deserializedWorkloadNetworkDnsServiceProperties + = new WorkloadNetworkDnsServiceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceProperties.displayName = reader.getString(); + } else if ("dnsServiceIp".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceProperties.dnsServiceIp = reader.getString(); + } else if ("defaultDnsZone".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceProperties.defaultDnsZone = reader.getString(); + } else if ("fqdnZones".equals(fieldName)) { + List fqdnZones = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkloadNetworkDnsServiceProperties.fqdnZones = fqdnZones; + } else if ("logLevel".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceProperties.logLevel + = DnsServiceLogLevelEnum.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceProperties.status + = DnsServiceStatusEnum.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceProperties.provisioningState + = WorkloadNetworkDnsServiceProvisioningState.fromString(reader.getString()); + } else if ("revision".equals(fieldName)) { + deserializedWorkloadNetworkDnsServiceProperties.revision = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDnsServiceProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java index ec9bc3a28e2e4..094e41ecaaa7b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java @@ -7,8 +7,11 @@ 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.WorkloadNetworkDnsZoneProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -19,15 +22,28 @@ public final class WorkloadNetworkDnsZoneInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkDnsZoneProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkDnsZoneInner class. */ @@ -52,6 +68,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the displayName property: Display name of the DNS Zone. * @@ -149,7 +195,7 @@ public WorkloadNetworkDnsZoneInner withSourceIp(String sourceIp) { * * @return the dnsServices value. */ - public Integer dnsServices() { + public Long dnsServices() { return this.innerProperties() == null ? null : this.innerProperties().dnsServices(); } @@ -159,7 +205,7 @@ public Integer dnsServices() { * @param dnsServices the dnsServices value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ - public WorkloadNetworkDnsZoneInner withDnsServices(Integer dnsServices) { + public WorkloadNetworkDnsZoneInner withDnsServices(Long dnsServices) { if (this.innerProperties() == null) { this.innerProperties = new WorkloadNetworkDnsZoneProperties(); } @@ -209,4 +255,50 @@ public void validate() { 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 WorkloadNetworkDnsZoneInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDnsZoneInner 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 WorkloadNetworkDnsZoneInner. + */ + public static WorkloadNetworkDnsZoneInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDnsZoneInner deserializedWorkloadNetworkDnsZoneInner = new WorkloadNetworkDnsZoneInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneInner.innerProperties + = WorkloadNetworkDnsZoneProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDnsZoneInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java index f51f56e0ac87d..17638bf7fe08a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java @@ -5,55 +5,52 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * NSX DNS Zone Properties. */ @Fluent -public final class WorkloadNetworkDnsZoneProperties { +public final class WorkloadNetworkDnsZoneProperties implements JsonSerializable { /* * Display name of the DNS Zone. */ - @JsonProperty(value = "displayName") private String displayName; /* * Domain names of the DNS Zone. */ - @JsonProperty(value = "domain") private List domain; /* * DNS Server IP array of the DNS Zone. */ - @JsonProperty(value = "dnsServerIps") private List dnsServerIps; /* * Source IP of the DNS Zone. */ - @JsonProperty(value = "sourceIp") private String sourceIp; /* * Number of DNS Services using the DNS zone. */ - @JsonProperty(value = "dnsServices") - private Integer dnsServices; + private Long dnsServices; /* * The provisioning state */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkDnsZoneProvisioningState provisioningState; /* * NSX revision number. */ - @JsonProperty(value = "revision") private Long revision; /** @@ -147,7 +144,7 @@ public WorkloadNetworkDnsZoneProperties withSourceIp(String sourceIp) { * * @return the dnsServices value. */ - public Integer dnsServices() { + public Long dnsServices() { return this.dnsServices; } @@ -157,7 +154,7 @@ public Integer dnsServices() { * @param dnsServices the dnsServices value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ - public WorkloadNetworkDnsZoneProperties withDnsServices(Integer dnsServices) { + public WorkloadNetworkDnsZoneProperties withDnsServices(Long dnsServices) { this.dnsServices = dnsServices; return this; } @@ -198,4 +195,61 @@ public WorkloadNetworkDnsZoneProperties withRevision(Long revision) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeArrayField("domain", this.domain, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("dnsServerIps", this.dnsServerIps, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("sourceIp", this.sourceIp); + jsonWriter.writeNumberField("dnsServices", this.dnsServices); + jsonWriter.writeNumberField("revision", this.revision); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkDnsZoneProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDnsZoneProperties 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 WorkloadNetworkDnsZoneProperties. + */ + public static WorkloadNetworkDnsZoneProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDnsZoneProperties deserializedWorkloadNetworkDnsZoneProperties + = new WorkloadNetworkDnsZoneProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneProperties.displayName = reader.getString(); + } else if ("domain".equals(fieldName)) { + List domain = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkloadNetworkDnsZoneProperties.domain = domain; + } else if ("dnsServerIps".equals(fieldName)) { + List dnsServerIps = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkloadNetworkDnsZoneProperties.dnsServerIps = dnsServerIps; + } else if ("sourceIp".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneProperties.sourceIp = reader.getString(); + } else if ("dnsServices".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneProperties.dnsServices = reader.getNullable(JsonReader::getLong); + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneProperties.provisioningState + = WorkloadNetworkDnsZoneProvisioningState.fromString(reader.getString()); + } else if ("revision".equals(fieldName)) { + deserializedWorkloadNetworkDnsZoneProperties.revision = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDnsZoneProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java index 701399d50eb1a..86ed7d2016bb8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java @@ -7,8 +7,11 @@ 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.WorkloadNetworkProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * NSX Gateway. @@ -18,15 +21,28 @@ public final class WorkloadNetworkGatewayInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkGatewayProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkGatewayInner class. */ @@ -51,6 +67,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -88,4 +134,50 @@ public void validate() { 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 WorkloadNetworkGatewayInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkGatewayInner 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 WorkloadNetworkGatewayInner. + */ + public static WorkloadNetworkGatewayInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkGatewayInner deserializedWorkloadNetworkGatewayInner = new WorkloadNetworkGatewayInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkGatewayInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkGatewayInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkGatewayInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkGatewayInner.innerProperties + = WorkloadNetworkGatewayProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkGatewayInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkGatewayInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java index 29c2675dd1ba7..a282c4036e037 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java @@ -5,30 +5,31 @@ 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.WorkloadNetworkProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of a NSX Gateway. */ @Immutable -public final class WorkloadNetworkGatewayProperties { +public final class WorkloadNetworkGatewayProperties implements JsonSerializable { /* * The provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkProvisioningState provisioningState; /* * Display name of the DHCP entity. */ - @JsonProperty(value = "displayName") private String displayName; /* * NSX Gateway Path. */ - @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) private String path; /** @@ -71,4 +72,46 @@ public String path() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkGatewayProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkGatewayProperties 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 WorkloadNetworkGatewayProperties. + */ + public static WorkloadNetworkGatewayProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkGatewayProperties deserializedWorkloadNetworkGatewayProperties + = new WorkloadNetworkGatewayProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkGatewayProperties.provisioningState + = WorkloadNetworkProvisioningState.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkGatewayProperties.displayName = reader.getString(); + } else if ("path".equals(fieldName)) { + deserializedWorkloadNetworkGatewayProperties.path = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkGatewayProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java index b90a08e140201..133d024192e66 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java @@ -7,8 +7,11 @@ 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.WorkloadNetworkProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Workload Network. @@ -18,15 +21,28 @@ public final class WorkloadNetworkInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkInner class. */ @@ -51,6 +67,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -70,4 +116,49 @@ public void validate() { 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 WorkloadNetworkInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkInner 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 WorkloadNetworkInner. + */ + public static WorkloadNetworkInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkInner deserializedWorkloadNetworkInner = new WorkloadNetworkInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkInner.innerProperties = WorkloadNetworkProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java index 7e8edbea8eec4..ec3120a39abe3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java @@ -7,10 +7,13 @@ 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.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.PortMirroringStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * NSX Port Mirroring. @@ -20,15 +23,28 @@ public final class WorkloadNetworkPortMirroringInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkPortMirroringProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkPortMirroringInner class. */ @@ -53,6 +69,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the displayName property: Display name of the port mirroring profile. * @@ -196,4 +242,51 @@ public void validate() { 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 WorkloadNetworkPortMirroringInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkPortMirroringInner 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 WorkloadNetworkPortMirroringInner. + */ + public static WorkloadNetworkPortMirroringInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkPortMirroringInner deserializedWorkloadNetworkPortMirroringInner + = new WorkloadNetworkPortMirroringInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringInner.innerProperties + = WorkloadNetworkPortMirroringProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkPortMirroringInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java index d24693492c75f..2d6ebb2c99c06 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java @@ -5,56 +5,54 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.PortMirroringStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * NSX Port Mirroring Properties. */ @Fluent -public final class WorkloadNetworkPortMirroringProperties { +public final class WorkloadNetworkPortMirroringProperties + implements JsonSerializable { /* * Display name of the port mirroring profile. */ - @JsonProperty(value = "displayName") private String displayName; /* * Direction of port mirroring profile. */ - @JsonProperty(value = "direction") private PortMirroringDirectionEnum direction; /* * Source VM Group. */ - @JsonProperty(value = "source") private String source; /* * Destination VM Group. */ - @JsonProperty(value = "destination") private String destination; /* * Port Mirroring Status. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private PortMirroringStatusEnum status; /* * The provisioning state */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkPortMirroringProvisioningState provisioningState; /* * NSX revision number. */ - @JsonProperty(value = "revision") private Long revision; /** @@ -188,4 +186,61 @@ public WorkloadNetworkPortMirroringProperties withRevision(Long revision) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("direction", this.direction == null ? null : this.direction.toString()); + jsonWriter.writeStringField("source", this.source); + jsonWriter.writeStringField("destination", this.destination); + jsonWriter.writeNumberField("revision", this.revision); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkPortMirroringProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkPortMirroringProperties 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 WorkloadNetworkPortMirroringProperties. + */ + public static WorkloadNetworkPortMirroringProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkPortMirroringProperties deserializedWorkloadNetworkPortMirroringProperties + = new WorkloadNetworkPortMirroringProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringProperties.displayName = reader.getString(); + } else if ("direction".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringProperties.direction + = PortMirroringDirectionEnum.fromString(reader.getString()); + } else if ("source".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringProperties.source = reader.getString(); + } else if ("destination".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringProperties.destination = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringProperties.status + = PortMirroringStatusEnum.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringProperties.provisioningState + = WorkloadNetworkPortMirroringProvisioningState.fromString(reader.getString()); + } else if ("revision".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringProperties.revision + = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkPortMirroringProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java index 75cce1e0e5ee4..d05d7604eaee5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java @@ -5,18 +5,21 @@ 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.WorkloadNetworkProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * The properties of a workload network. */ @Immutable -public final class WorkloadNetworkProperties { +public final class WorkloadNetworkProperties implements JsonSerializable { /* * The provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkProvisioningState provisioningState; /** @@ -41,4 +44,40 @@ public WorkloadNetworkProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkProperties 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 WorkloadNetworkProperties. + */ + public static WorkloadNetworkProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkProperties deserializedWorkloadNetworkProperties = new WorkloadNetworkProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkProperties.provisioningState + = WorkloadNetworkProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java index 807d9b263d184..04a032f5346ed 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java @@ -7,8 +7,11 @@ 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.WorkloadNetworkPublicIpProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * NSX Public IP Block. @@ -18,15 +21,28 @@ public final class WorkloadNetworkPublicIpInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkPublicIpProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkPublicIpInner class. */ @@ -51,6 +67,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the displayName property: Display name of the Public IP Block. * @@ -125,4 +171,50 @@ public void validate() { 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 WorkloadNetworkPublicIpInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkPublicIpInner 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 WorkloadNetworkPublicIpInner. + */ + public static WorkloadNetworkPublicIpInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkPublicIpInner deserializedWorkloadNetworkPublicIpInner = new WorkloadNetworkPublicIpInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkPublicIpInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkPublicIpInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkPublicIpInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkPublicIpInner.innerProperties + = WorkloadNetworkPublicIpProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkPublicIpInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkPublicIpInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java index 29adbe25b6541..eec42161c444c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java @@ -5,36 +5,36 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * NSX Public IP Block Properties. */ @Fluent -public final class WorkloadNetworkPublicIpProperties { +public final class WorkloadNetworkPublicIpProperties implements JsonSerializable { /* * Display name of the Public IP Block. */ - @JsonProperty(value = "displayName") private String displayName; /* * Number of Public IPs requested. */ - @JsonProperty(value = "numberOfPublicIPs") private Long numberOfPublicIPs; /* * CIDR Block of the Public IP Block. */ - @JsonProperty(value = "publicIPBlock", access = JsonProperty.Access.WRITE_ONLY) private String publicIpBlock; /* * The provisioning state */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkPublicIpProvisioningState provisioningState; /** @@ -108,4 +108,50 @@ public WorkloadNetworkPublicIpProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeNumberField("numberOfPublicIPs", this.numberOfPublicIPs); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkPublicIpProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkPublicIpProperties 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 WorkloadNetworkPublicIpProperties. + */ + public static WorkloadNetworkPublicIpProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkPublicIpProperties deserializedWorkloadNetworkPublicIpProperties + = new WorkloadNetworkPublicIpProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkPublicIpProperties.displayName = reader.getString(); + } else if ("numberOfPublicIPs".equals(fieldName)) { + deserializedWorkloadNetworkPublicIpProperties.numberOfPublicIPs + = reader.getNullable(JsonReader::getLong); + } else if ("publicIPBlock".equals(fieldName)) { + deserializedWorkloadNetworkPublicIpProperties.publicIpBlock = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkPublicIpProperties.provisioningState + = WorkloadNetworkPublicIpProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkPublicIpProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java index d4ab9a5e102b4..eb336f74ca5bc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java @@ -7,11 +7,14 @@ 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.SegmentStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -22,15 +25,28 @@ public final class WorkloadNetworkSegmentInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkSegmentProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkSegmentInner class. */ @@ -55,6 +71,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the displayName property: Display name of the segment. * @@ -184,4 +230,50 @@ public void validate() { 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 WorkloadNetworkSegmentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkSegmentInner 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 WorkloadNetworkSegmentInner. + */ + public static WorkloadNetworkSegmentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkSegmentInner deserializedWorkloadNetworkSegmentInner = new WorkloadNetworkSegmentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkSegmentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkSegmentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkSegmentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkSegmentInner.innerProperties + = WorkloadNetworkSegmentProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkSegmentInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkSegmentInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java index 9314e189b6392..869f82bccc88d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java @@ -5,58 +5,55 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.SegmentStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * NSX Segment Properties. */ @Fluent -public final class WorkloadNetworkSegmentProperties { +public final class WorkloadNetworkSegmentProperties implements JsonSerializable { /* * Display name of the segment. */ - @JsonProperty(value = "displayName") private String displayName; /* * Gateway which to connect segment to. */ - @JsonProperty(value = "connectedGateway") private String connectedGateway; /* * Subnet which to connect segment to. */ - @JsonProperty(value = "subnet") private WorkloadNetworkSegmentSubnet subnet; /* * Port Vif which segment is associated with. */ - @JsonProperty(value = "portVif", access = JsonProperty.Access.WRITE_ONLY) private List portVif; /* * Segment status. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private SegmentStatusEnum status; /* * The provisioning state */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkSegmentProvisioningState provisioningState; /* * NSX revision number. */ - @JsonProperty(value = "revision") private Long revision; /** @@ -185,4 +182,60 @@ public void validate() { portVif().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("connectedGateway", this.connectedGateway); + jsonWriter.writeJsonField("subnet", this.subnet); + jsonWriter.writeNumberField("revision", this.revision); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkSegmentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkSegmentProperties 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 WorkloadNetworkSegmentProperties. + */ + public static WorkloadNetworkSegmentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkSegmentProperties deserializedWorkloadNetworkSegmentProperties + = new WorkloadNetworkSegmentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkSegmentProperties.displayName = reader.getString(); + } else if ("connectedGateway".equals(fieldName)) { + deserializedWorkloadNetworkSegmentProperties.connectedGateway = reader.getString(); + } else if ("subnet".equals(fieldName)) { + deserializedWorkloadNetworkSegmentProperties.subnet = WorkloadNetworkSegmentSubnet.fromJson(reader); + } else if ("portVif".equals(fieldName)) { + List portVif + = reader.readArray(reader1 -> WorkloadNetworkSegmentPortVif.fromJson(reader1)); + deserializedWorkloadNetworkSegmentProperties.portVif = portVif; + } else if ("status".equals(fieldName)) { + deserializedWorkloadNetworkSegmentProperties.status + = SegmentStatusEnum.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkSegmentProperties.provisioningState + = WorkloadNetworkSegmentProvisioningState.fromString(reader.getString()); + } else if ("revision".equals(fieldName)) { + deserializedWorkloadNetworkSegmentProperties.revision = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkSegmentProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java index 98aee6a17c677..1dbee8f62ca0c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java @@ -7,9 +7,12 @@ 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.VMGroupStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -20,15 +23,28 @@ public final class WorkloadNetworkVMGroupInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkVMGroupProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkVMGroupInner class. */ @@ -53,6 +69,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the displayName property: Display name of the VM group. * @@ -150,4 +196,50 @@ public void validate() { 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 WorkloadNetworkVMGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkVMGroupInner 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 WorkloadNetworkVMGroupInner. + */ + public static WorkloadNetworkVMGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkVMGroupInner deserializedWorkloadNetworkVMGroupInner = new WorkloadNetworkVMGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupInner.innerProperties + = WorkloadNetworkVMGroupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkVMGroupInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java index 0ab575250bae6..139e140213338 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java @@ -5,44 +5,43 @@ package com.azure.resourcemanager.avs.fluent.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 com.azure.resourcemanager.avs.models.VMGroupStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * NSX VM Group Properties. */ @Fluent -public final class WorkloadNetworkVMGroupProperties { +public final class WorkloadNetworkVMGroupProperties implements JsonSerializable { /* * Display name of the VM group. */ - @JsonProperty(value = "displayName") private String displayName; /* * Virtual machine members of this group. */ - @JsonProperty(value = "members") private List members; /* * VM Group status. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private VMGroupStatusEnum status; /* * The provisioning state */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkVMGroupProvisioningState provisioningState; /* * NSX revision number. */ - @JsonProperty(value = "revision") private Long revision; /** @@ -136,4 +135,54 @@ public WorkloadNetworkVMGroupProperties withRevision(Long revision) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeArrayField("members", this.members, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("revision", this.revision); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkVMGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkVMGroupProperties 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 WorkloadNetworkVMGroupProperties. + */ + public static WorkloadNetworkVMGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkVMGroupProperties deserializedWorkloadNetworkVMGroupProperties + = new WorkloadNetworkVMGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupProperties.displayName = reader.getString(); + } else if ("members".equals(fieldName)) { + List members = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkloadNetworkVMGroupProperties.members = members; + } else if ("status".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupProperties.status + = VMGroupStatusEnum.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupProperties.provisioningState + = WorkloadNetworkVMGroupProvisioningState.fromString(reader.getString()); + } else if ("revision".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupProperties.revision = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkVMGroupProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java index 0898687c8ce89..e0ebbeca78a5d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java @@ -7,9 +7,12 @@ 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.VMTypeEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * NSX Virtual Machine. @@ -19,15 +22,28 @@ public final class WorkloadNetworkVirtualMachineInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties") private WorkloadNetworkVirtualMachineProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of WorkloadNetworkVirtualMachineInner class. */ @@ -52,6 +68,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -89,4 +135,51 @@ public void validate() { 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 WorkloadNetworkVirtualMachineInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkVirtualMachineInner 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 WorkloadNetworkVirtualMachineInner. + */ + public static WorkloadNetworkVirtualMachineInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkVirtualMachineInner deserializedWorkloadNetworkVirtualMachineInner + = new WorkloadNetworkVirtualMachineInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkloadNetworkVirtualMachineInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedWorkloadNetworkVirtualMachineInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedWorkloadNetworkVirtualMachineInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedWorkloadNetworkVirtualMachineInner.innerProperties + = WorkloadNetworkVirtualMachineProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadNetworkVirtualMachineInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkVirtualMachineInner; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java index cd8d6e2b84f90..4bd38e473af8f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java @@ -5,31 +5,33 @@ 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.VMTypeEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * NSX Virtual Machine Properties. */ @Immutable -public final class WorkloadNetworkVirtualMachineProperties { +public final class WorkloadNetworkVirtualMachineProperties + implements JsonSerializable { /* * The provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkProvisioningState provisioningState; /* * Display name of the VM. */ - @JsonProperty(value = "displayName") private String displayName; /* * Virtual machine type. */ - @JsonProperty(value = "vmType", access = JsonProperty.Access.WRITE_ONLY) private VMTypeEnum vmType; /** @@ -72,4 +74,47 @@ public VMTypeEnum vmType() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkVirtualMachineProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkVirtualMachineProperties 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 WorkloadNetworkVirtualMachineProperties. + */ + public static WorkloadNetworkVirtualMachineProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkVirtualMachineProperties deserializedWorkloadNetworkVirtualMachineProperties + = new WorkloadNetworkVirtualMachineProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkVirtualMachineProperties.provisioningState + = WorkloadNetworkProvisioningState.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkVirtualMachineProperties.displayName = reader.getString(); + } else if ("vmType".equals(fieldName)) { + deserializedWorkloadNetworkVirtualMachineProperties.vmType + = VMTypeEnum.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkVirtualMachineProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java index 32d84b3a5db0b..d98200df74cdf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.AddonsClient; import com.azure.resourcemanager.avs.fluent.models.AddonInner; -import com.azure.resourcemanager.avs.implementation.models.AddonListResult; +import com.azure.resourcemanager.avs.implementation.models.AddonList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -73,7 +73,7 @@ public interface AddonsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -113,7 +113,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java index 61348d711891f..7259697452fb8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.AuthorizationsClient; import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; -import com.azure.resourcemanager.avs.implementation.models.ExpressRouteAuthorizationListResult; +import com.azure.resourcemanager.avs.implementation.models.ExpressRouteAuthorizationList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -74,7 +74,7 @@ public interface AuthorizationsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -117,7 +117,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java index 3d5692da4e678..72c78a4af8432 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java @@ -36,12 +36,12 @@ public AvsClientBuilder endpoint(String endpoint) { } /* - * The ID of the target subscription. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets The ID of the target subscription. + * Sets The ID of the target subscription. The value must be an UUID. * * @param subscriptionId the subscriptionId value. * @return the AvsClientBuilder. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index 00f3ebbaf8c8c..cdb74f3dbfc2e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java @@ -93,12 +93,12 @@ public String getApiVersion() { } /** - * The ID of the target subscription. + * The ID of the target subscription. The value must be an UUID. */ private final String subscriptionId; /** - * Gets The ID of the target subscription. + * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ @@ -520,7 +520,7 @@ public IscsiPathsClient getIscsiPaths() { * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. * @param endpoint Server parameter. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ AvsClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java index 63d905c0276f6..ac2f1aa325ddc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.CloudLinksClient; import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; -import com.azure.resourcemanager.avs.implementation.models.CloudLinkListResult; +import com.azure.resourcemanager.avs.implementation.models.CloudLinkList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -74,7 +74,7 @@ public interface CloudLinksService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -115,7 +115,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java index 48277960aa164..65919848dfed5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java @@ -36,7 +36,7 @@ import com.azure.resourcemanager.avs.fluent.ClustersClient; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; -import com.azure.resourcemanager.avs.implementation.models.ClusterListResult; +import com.azure.resourcemanager.avs.implementation.models.ClusterList; import com.azure.resourcemanager.avs.models.ClustersUpdateResponse; import com.azure.resourcemanager.avs.models.ClusterUpdate; import java.nio.ByteBuffer; @@ -78,7 +78,7 @@ public interface ClustersService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -139,7 +139,7 @@ Mono> listZones(@HostParam("endpoint") String end @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java index 6f31493e4a943..038bf652471ac 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.DatastoresClient; import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; -import com.azure.resourcemanager.avs.implementation.models.DatastoreListResult; +import com.azure.resourcemanager.avs.implementation.models.DatastoreList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -74,7 +74,7 @@ public interface DatastoresService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, @@ -115,7 +115,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java index f3119d707d7b4..b2887e4e68ea2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient; import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; -import com.azure.resourcemanager.avs.implementation.models.GlobalReachConnectionListResult; +import com.azure.resourcemanager.avs.implementation.models.GlobalReachConnectionList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -74,7 +74,7 @@ public interface GlobalReachConnectionsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -118,7 +118,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java index ef18207c2d2cd..a81c54343cb32 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient; import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; -import com.azure.resourcemanager.avs.implementation.models.HcxEnterpriseSiteListResult; +import com.azure.resourcemanager.avs.implementation.models.HcxEnterpriseSiteList; import reactor.core.publisher.Mono; /** @@ -69,7 +69,7 @@ public interface HcxEnterpriseSitesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -112,9 +112,8 @@ Mono> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java index 20ce4cd09da44..c48bdb504b5f3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.OperationsClient; import com.azure.resourcemanager.avs.fluent.models.OperationInner; -import com.azure.resourcemanager.avs.implementation.models.PagedOperation; +import com.azure.resourcemanager.avs.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -66,14 +66,14 @@ public interface OperationsService { @Get("/providers/Microsoft.AVS/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @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, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } 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 be81b16a89bfc..7378cba3f89b5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; -import com.azure.resourcemanager.avs.implementation.models.PlacementPolicyListResult; +import com.azure.resourcemanager.avs.implementation.models.PlacementPoliciesList; import com.azure.resourcemanager.avs.models.PlacementPoliciesUpdateResponse; import com.azure.resourcemanager.avs.models.PlacementPolicyUpdate; import java.nio.ByteBuffer; @@ -77,7 +77,7 @@ public interface PlacementPoliciesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, @@ -131,9 +131,8 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** 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 cb9e9d9c5087e..9c492f0897212 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java @@ -36,7 +36,7 @@ import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; -import com.azure.resourcemanager.avs.implementation.models.PrivateCloudListResult; +import com.azure.resourcemanager.avs.implementation.models.PrivateCloudList; import com.azure.resourcemanager.avs.models.PrivateCloudsUpdateResponse; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; import java.nio.ByteBuffer; @@ -79,7 +79,7 @@ public interface PrivateCloudsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("accept") String accept, Context context); @@ -88,7 +88,7 @@ Mono> listByResourceGroup(@HostParam("endpoint" @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("accept") String accept, Context context); @@ -166,7 +166,7 @@ Mono> listAdminCredentials(@HostParam("endpoint" @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( + Mono> listByResourceGroupNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); @@ -174,7 +174,7 @@ Mono> listByResourceGroupNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInSubscriptionNext( + Mono> listInSubscriptionNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java index 3ff6d4c77a314..1b612936bcf0a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient; import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; -import com.azure.resourcemanager.avs.implementation.models.ScriptCmdletListResult; +import com.azure.resourcemanager.avs.implementation.models.ScriptCmdletsList; import reactor.core.publisher.Mono; /** @@ -66,7 +66,7 @@ public interface ScriptCmdletsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @@ -89,7 +89,7 @@ Mono> get(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java index 0d96d3f8cd768..7ebf69bdc28e3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java @@ -34,7 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient; import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import com.azure.resourcemanager.avs.implementation.models.ScriptExecutionListResult; +import com.azure.resourcemanager.avs.implementation.models.ScriptExecutionsList; import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; import java.nio.ByteBuffer; import java.util.List; @@ -77,7 +77,7 @@ public interface ScriptExecutionsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -131,9 +131,8 @@ Mono> getExecutionLogs(@HostParam("endpoint") Str @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java index 668ad531a923d..6f7196cadc8ee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.ScriptPackagesClient; import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; -import com.azure.resourcemanager.avs.implementation.models.ScriptPackageListResult; +import com.azure.resourcemanager.avs.implementation.models.ScriptPackagesList; import reactor.core.publisher.Mono; /** @@ -66,7 +66,7 @@ public interface ScriptPackagesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -87,7 +87,7 @@ Mono> get(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } 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 d787d8c1525d9..e66ab15ab59f0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java @@ -32,7 +32,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.VirtualMachinesClient; import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; -import com.azure.resourcemanager.avs.implementation.models.VirtualMachineListResult; +import com.azure.resourcemanager.avs.implementation.models.VirtualMachinesList; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -74,7 +74,7 @@ public interface VirtualMachinesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, @@ -106,9 +106,8 @@ Mono>> restrictMovement(@HostParam("endpoint") String @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java index 9d049507ea421..c767342e75089 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java @@ -34,8 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDhcpConfigurationsClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpListResult; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -76,7 +75,7 @@ public interface WorkloadNetworkDhcpConfigurationsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, + Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -112,7 +111,7 @@ Mono>> update(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context); + @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") @@ -128,7 +127,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetworkNext( + Mono> listByWorkloadNetworkNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } @@ -684,7 +683,7 @@ public WorkloadNetworkDhcpInner create(String resourceGroupName, String privateC */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -733,7 +732,7 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -780,7 +779,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateAsync( String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + WorkloadNetworkDhcpInner workloadNetworkDhcp) { Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); return this.client.getLroResult(mono, @@ -803,7 +802,7 @@ private PollerFlux, WorkloadNetworkDhcpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { context = this.client.mergeContext(context); Mono>> mono @@ -827,7 +826,7 @@ private PollerFlux, WorkloadNetworkDhcpInne @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginUpdate( String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + WorkloadNetworkDhcpInner workloadNetworkDhcp) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).getSyncPoller(); } @@ -846,7 +845,7 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) .getSyncPoller(); @@ -866,7 +865,7 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + WorkloadNetworkDhcpInner workloadNetworkDhcp) { return beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -886,7 +885,7 @@ private Mono updateAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { return beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -905,7 +904,7 @@ private Mono updateAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + WorkloadNetworkDhcpInner workloadNetworkDhcp) { return updateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); } @@ -924,7 +923,7 @@ public WorkloadNetworkDhcpInner update(String resourceGroupName, String privateC */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { return updateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java index c35d48ac3175a..0284a4d8a00ff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java @@ -9,7 +9,6 @@ import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; public final class WorkloadNetworkDhcpImpl implements WorkloadNetworkDhcp, WorkloadNetworkDhcp.Definition, WorkloadNetworkDhcp.Update { @@ -55,8 +54,6 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String dhcpId; - private WorkloadNetworkDhcpUpdate updateWorkloadNetworkDhcp; - public WorkloadNetworkDhcpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -84,21 +81,20 @@ public WorkloadNetworkDhcp create(Context context) { } public WorkloadNetworkDhcpImpl update() { - this.updateWorkloadNetworkDhcp = new WorkloadNetworkDhcpUpdate(); return this; } public WorkloadNetworkDhcp apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkDhcpConfigurations() - .update(resourceGroupName, privateCloudName, dhcpId, updateWorkloadNetworkDhcp, Context.NONE); + .update(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDhcp apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkDhcpConfigurations() - .update(resourceGroupName, privateCloudName, dhcpId, updateWorkloadNetworkDhcp, context); + .update(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); return this; } @@ -128,16 +124,7 @@ public WorkloadNetworkDhcp refresh(Context context) { } public WorkloadNetworkDhcpImpl withProperties(WorkloadNetworkDhcpEntity properties) { - if (isInCreateMode()) { - this.innerModel().withProperties(properties); - return this; - } else { - this.updateWorkloadNetworkDhcp.withProperties(properties); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; + this.innerModel().withProperties(properties); + return this; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java index 587e9ec5dfc09..3c026426842c0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java @@ -11,7 +11,6 @@ import com.azure.resourcemanager.avs.models.DnsServiceStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; import java.util.Collections; import java.util.List; @@ -92,8 +91,6 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String dnsServiceId; - private WorkloadNetworkDnsServiceUpdate updateWorkloadNetworkDnsService; - public WorkloadNetworkDnsServiceImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -121,21 +118,20 @@ public WorkloadNetworkDnsService create(Context context) { } public WorkloadNetworkDnsServiceImpl update() { - this.updateWorkloadNetworkDnsService = new WorkloadNetworkDnsServiceUpdate(); return this; } public WorkloadNetworkDnsService apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkDnsServices() - .update(resourceGroupName, privateCloudName, dnsServiceId, updateWorkloadNetworkDnsService, Context.NONE); + .update(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsService apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkDnsServices() - .update(resourceGroupName, privateCloudName, dnsServiceId, updateWorkloadNetworkDnsService, context); + .update(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); return this; } @@ -165,66 +161,32 @@ public WorkloadNetworkDnsService refresh(Context context) { } public WorkloadNetworkDnsServiceImpl withDisplayName(String displayName) { - if (isInCreateMode()) { - this.innerModel().withDisplayName(displayName); - return this; - } else { - this.updateWorkloadNetworkDnsService.withDisplayName(displayName); - return this; - } + this.innerModel().withDisplayName(displayName); + return this; } public WorkloadNetworkDnsServiceImpl withDnsServiceIp(String dnsServiceIp) { - if (isInCreateMode()) { - this.innerModel().withDnsServiceIp(dnsServiceIp); - return this; - } else { - this.updateWorkloadNetworkDnsService.withDnsServiceIp(dnsServiceIp); - return this; - } + this.innerModel().withDnsServiceIp(dnsServiceIp); + return this; } public WorkloadNetworkDnsServiceImpl withDefaultDnsZone(String defaultDnsZone) { - if (isInCreateMode()) { - this.innerModel().withDefaultDnsZone(defaultDnsZone); - return this; - } else { - this.updateWorkloadNetworkDnsService.withDefaultDnsZone(defaultDnsZone); - return this; - } + this.innerModel().withDefaultDnsZone(defaultDnsZone); + return this; } public WorkloadNetworkDnsServiceImpl withFqdnZones(List fqdnZones) { - if (isInCreateMode()) { - this.innerModel().withFqdnZones(fqdnZones); - return this; - } else { - this.updateWorkloadNetworkDnsService.withFqdnZones(fqdnZones); - return this; - } + this.innerModel().withFqdnZones(fqdnZones); + return this; } public WorkloadNetworkDnsServiceImpl withLogLevel(DnsServiceLogLevelEnum logLevel) { - if (isInCreateMode()) { - this.innerModel().withLogLevel(logLevel); - return this; - } else { - this.updateWorkloadNetworkDnsService.withLogLevel(logLevel); - return this; - } + this.innerModel().withLogLevel(logLevel); + return this; } public WorkloadNetworkDnsServiceImpl withRevision(Long revision) { - if (isInCreateMode()) { - this.innerModel().withRevision(revision); - return this; - } else { - this.updateWorkloadNetworkDnsService.withRevision(revision); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; + this.innerModel().withRevision(revision); + return this; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java index f79e90e77ca62..d72c26792d2ee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java @@ -34,8 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsServicesClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServiceListResult; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServicesList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -76,9 +75,8 @@ public interface WorkloadNetworkDnsServicesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetwork( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByWorkloadNetwork(@HostParam("endpoint") 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); @@ -113,7 +111,7 @@ Mono>> update(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context); + @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") @@ -129,7 +127,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetworkNext( + Mono> listByWorkloadNetworkNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } @@ -693,7 +691,7 @@ public WorkloadNetworkDnsServiceInner create(String resourceGroupName, String pr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -742,7 +740,7 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -789,7 +787,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> beginUpdateAsync( String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService); return this.client.getLroResult(mono, @@ -813,7 +811,7 @@ private PollerFlux, WorkloadNetworkDn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> beginUpdateAsync( String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context); @@ -837,7 +835,7 @@ private PollerFlux, WorkloadNetworkDn @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) .getSyncPoller(); } @@ -858,7 +856,7 @@ public SyncPoller, WorkloadNetworkDns @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { return this .beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) .getSyncPoller(); @@ -878,7 +876,7 @@ public SyncPoller, WorkloadNetworkDns */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { return beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -898,7 +896,7 @@ private Mono updateAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { return beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -918,7 +916,7 @@ private Mono updateAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { return updateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).block(); } @@ -937,7 +935,7 @@ public WorkloadNetworkDnsServiceInner update(String resourceGroupName, String pr */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { return updateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) .block(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java index 220506b5d1fe1..6775902bc139c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java @@ -9,7 +9,6 @@ import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; import java.util.Collections; import java.util.List; @@ -61,7 +60,7 @@ public String sourceIp() { return this.innerModel().sourceIp(); } - public Integer dnsServices() { + public Long dnsServices() { return this.innerModel().dnsServices(); } @@ -91,8 +90,6 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String dnsZoneId; - private WorkloadNetworkDnsZoneUpdate updateWorkloadNetworkDnsZone; - public WorkloadNetworkDnsZoneImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -120,21 +117,20 @@ public WorkloadNetworkDnsZone create(Context context) { } public WorkloadNetworkDnsZoneImpl update() { - this.updateWorkloadNetworkDnsZone = new WorkloadNetworkDnsZoneUpdate(); return this; } public WorkloadNetworkDnsZone apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkDnsZones() - .update(resourceGroupName, privateCloudName, dnsZoneId, updateWorkloadNetworkDnsZone, Context.NONE); + .update(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsZone apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkDnsZones() - .update(resourceGroupName, privateCloudName, dnsZoneId, updateWorkloadNetworkDnsZone, context); + .update(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); return this; } @@ -164,66 +160,32 @@ public WorkloadNetworkDnsZone refresh(Context context) { } public WorkloadNetworkDnsZoneImpl withDisplayName(String displayName) { - if (isInCreateMode()) { - this.innerModel().withDisplayName(displayName); - return this; - } else { - this.updateWorkloadNetworkDnsZone.withDisplayName(displayName); - return this; - } + this.innerModel().withDisplayName(displayName); + return this; } public WorkloadNetworkDnsZoneImpl withDomain(List domain) { - if (isInCreateMode()) { - this.innerModel().withDomain(domain); - return this; - } else { - this.updateWorkloadNetworkDnsZone.withDomain(domain); - return this; - } + this.innerModel().withDomain(domain); + return this; } public WorkloadNetworkDnsZoneImpl withDnsServerIps(List dnsServerIps) { - if (isInCreateMode()) { - this.innerModel().withDnsServerIps(dnsServerIps); - return this; - } else { - this.updateWorkloadNetworkDnsZone.withDnsServerIps(dnsServerIps); - return this; - } + this.innerModel().withDnsServerIps(dnsServerIps); + return this; } public WorkloadNetworkDnsZoneImpl withSourceIp(String sourceIp) { - if (isInCreateMode()) { - this.innerModel().withSourceIp(sourceIp); - return this; - } else { - this.updateWorkloadNetworkDnsZone.withSourceIp(sourceIp); - return this; - } + this.innerModel().withSourceIp(sourceIp); + return this; } - public WorkloadNetworkDnsZoneImpl withDnsServices(Integer dnsServices) { - if (isInCreateMode()) { - this.innerModel().withDnsServices(dnsServices); - return this; - } else { - this.updateWorkloadNetworkDnsZone.withDnsServices(dnsServices); - return this; - } + public WorkloadNetworkDnsZoneImpl withDnsServices(Long dnsServices) { + this.innerModel().withDnsServices(dnsServices); + return this; } public WorkloadNetworkDnsZoneImpl withRevision(Long revision) { - if (isInCreateMode()) { - this.innerModel().withRevision(revision); - return this; - } else { - this.updateWorkloadNetworkDnsZone.withRevision(revision); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; + this.innerModel().withRevision(revision); + return this; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java index 8ab76c5d7774f..1ef5e948f8415 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java @@ -34,8 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsZonesClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZoneListResult; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZonesList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -76,7 +75,7 @@ public interface WorkloadNetworkDnsZonesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, + Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -112,7 +111,7 @@ Mono>> update(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context); + @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") @@ -128,7 +127,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetworkNext( + Mono> listByWorkloadNetworkNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } @@ -687,7 +686,7 @@ public WorkloadNetworkDnsZoneInner create(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -736,7 +735,7 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -783,7 +782,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateAsync( String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); return this.client.getLroResult(mono, @@ -807,7 +806,7 @@ private PollerFlux, WorkloadNetworkDnsZo @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateAsync( String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context); @@ -831,7 +830,7 @@ private PollerFlux, WorkloadNetworkDnsZo @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) .getSyncPoller(); } @@ -852,7 +851,7 @@ public SyncPoller, WorkloadNetworkDnsZon @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) .getSyncPoller(); } @@ -871,7 +870,7 @@ public SyncPoller, WorkloadNetworkDnsZon */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { return beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -891,7 +890,7 @@ private Mono updateAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { return beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -910,7 +909,7 @@ private Mono updateAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { return updateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); } @@ -929,7 +928,7 @@ public WorkloadNetworkDnsZoneInner update(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { return updateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).block(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java index 0616bcaa72ae8..620cfd6880516 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.WorkloadNetworkGatewaysClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayListResult; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayList; import reactor.core.publisher.Mono; /** @@ -66,7 +66,7 @@ public interface WorkloadNetworkGatewaysService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, + Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -86,7 +86,7 @@ Mono> get(@HostParam("endpoint") String en @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetworkNext( + Mono> listByWorkloadNetworkNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java index 582173de574e7..1777c6b672bf5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java @@ -11,7 +11,6 @@ import com.azure.resourcemanager.avs.models.PortMirroringStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; public final class WorkloadNetworkPortMirroringImpl implements WorkloadNetworkPortMirroring, WorkloadNetworkPortMirroring.Definition, WorkloadNetworkPortMirroring.Update { @@ -81,8 +80,6 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String portMirroringId; - private WorkloadNetworkPortMirroringUpdate updateWorkloadNetworkPortMirroring; - public WorkloadNetworkPortMirroringImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; @@ -111,22 +108,20 @@ public WorkloadNetworkPortMirroring create(Context context) { } public WorkloadNetworkPortMirroringImpl update() { - this.updateWorkloadNetworkPortMirroring = new WorkloadNetworkPortMirroringUpdate(); return this; } public WorkloadNetworkPortMirroring apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkPortMirroringProfiles() - .update(resourceGroupName, privateCloudName, portMirroringId, updateWorkloadNetworkPortMirroring, - Context.NONE); + .update(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPortMirroring apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkPortMirroringProfiles() - .update(resourceGroupName, privateCloudName, portMirroringId, updateWorkloadNetworkPortMirroring, context); + .update(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); return this; } @@ -156,56 +151,27 @@ public WorkloadNetworkPortMirroring refresh(Context context) { } public WorkloadNetworkPortMirroringImpl withDisplayName(String displayName) { - if (isInCreateMode()) { - this.innerModel().withDisplayName(displayName); - return this; - } else { - this.updateWorkloadNetworkPortMirroring.withDisplayName(displayName); - return this; - } + this.innerModel().withDisplayName(displayName); + return this; } public WorkloadNetworkPortMirroringImpl withDirection(PortMirroringDirectionEnum direction) { - if (isInCreateMode()) { - this.innerModel().withDirection(direction); - return this; - } else { - this.updateWorkloadNetworkPortMirroring.withDirection(direction); - return this; - } + this.innerModel().withDirection(direction); + return this; } public WorkloadNetworkPortMirroringImpl withSource(String source) { - if (isInCreateMode()) { - this.innerModel().withSource(source); - return this; - } else { - this.updateWorkloadNetworkPortMirroring.withSource(source); - return this; - } + this.innerModel().withSource(source); + return this; } public WorkloadNetworkPortMirroringImpl withDestination(String destination) { - if (isInCreateMode()) { - this.innerModel().withDestination(destination); - return this; - } else { - this.updateWorkloadNetworkPortMirroring.withDestination(destination); - return this; - } + this.innerModel().withDestination(destination); + return this; } public WorkloadNetworkPortMirroringImpl withRevision(Long revision) { - if (isInCreateMode()) { - this.innerModel().withRevision(revision); - return this; - } else { - this.updateWorkloadNetworkPortMirroring.withRevision(revision); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; + this.innerModel().withRevision(revision); + return this; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java index fdaecff68b497..b81438fcaf526 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java @@ -34,8 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.WorkloadNetworkPortMirroringProfilesClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringListResult; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -78,9 +77,8 @@ public interface WorkloadNetworkPortMirroringProfilesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetwork( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByWorkloadNetwork(@HostParam("endpoint") 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); @@ -117,7 +115,7 @@ Mono>> update(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, + @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); @Headers({ "Content-Type: application/json" }) @@ -135,7 +133,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetworkNext( + Mono> listByWorkloadNetworkNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } @@ -707,7 +705,7 @@ public WorkloadNetworkPortMirroringInner create(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -757,7 +755,7 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -805,7 +803,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> beginUpdateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring); return this.client.getLroResult(mono, @@ -829,7 +827,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> beginUpdateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); @@ -853,7 +851,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) .getSyncPoller(); } @@ -874,7 +872,7 @@ public SyncPoller, WorkloadNetwork @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { return this .beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) @@ -895,7 +893,7 @@ public SyncPoller, WorkloadNetwork */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { return beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -916,7 +914,7 @@ private Mono updateAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { return beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context).last().flatMap(this.client::getLroFinalResultOrError); } @@ -935,7 +933,7 @@ private Mono updateAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { return updateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).block(); } @@ -954,7 +952,7 @@ public WorkloadNetworkPortMirroringInner update(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { return updateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) .block(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java index 706a01fe23135..27db0fd7fe034 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java @@ -33,7 +33,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.WorkloadNetworkPublicIpsClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPListResult; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPsList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -74,7 +74,7 @@ public interface WorkloadNetworkPublicIpsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, + Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -115,7 +115,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetworkNext( + Mono> listByWorkloadNetworkNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java index ee2761c70858e..ac9a8041836bd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; import java.util.Collections; import java.util.List; @@ -89,8 +88,6 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String segmentId; - private WorkloadNetworkSegmentUpdate updateProperties; - public WorkloadNetworkSegmentImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -118,21 +115,20 @@ public WorkloadNetworkSegment create(Context context) { } public WorkloadNetworkSegmentImpl update() { - this.updateProperties = new WorkloadNetworkSegmentUpdate(); return this; } public WorkloadNetworkSegment apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkSegments() - .update(resourceGroupName, privateCloudName, segmentId, updateProperties, Context.NONE); + .update(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkSegment apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkSegments() - .update(resourceGroupName, privateCloudName, segmentId, updateProperties, context); + .update(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); return this; } @@ -162,46 +158,22 @@ public WorkloadNetworkSegment refresh(Context context) { } public WorkloadNetworkSegmentImpl withDisplayName(String displayName) { - if (isInCreateMode()) { - this.innerModel().withDisplayName(displayName); - return this; - } else { - this.updateProperties.withDisplayName(displayName); - return this; - } + this.innerModel().withDisplayName(displayName); + return this; } public WorkloadNetworkSegmentImpl withConnectedGateway(String connectedGateway) { - if (isInCreateMode()) { - this.innerModel().withConnectedGateway(connectedGateway); - return this; - } else { - this.updateProperties.withConnectedGateway(connectedGateway); - return this; - } + this.innerModel().withConnectedGateway(connectedGateway); + return this; } public WorkloadNetworkSegmentImpl withSubnet(WorkloadNetworkSegmentSubnet subnet) { - if (isInCreateMode()) { - this.innerModel().withSubnet(subnet); - return this; - } else { - this.updateProperties.withSubnet(subnet); - return this; - } + this.innerModel().withSubnet(subnet); + return this; } public WorkloadNetworkSegmentImpl withRevision(Long revision) { - if (isInCreateMode()) { - this.innerModel().withRevision(revision); - return this; - } else { - this.updateProperties.withRevision(revision); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; + this.innerModel().withRevision(revision); + return this; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java index d6f9e97590b68..5e02b8d4e722f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java @@ -34,8 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.WorkloadNetworkSegmentsClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentListResult; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentsList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -76,7 +75,7 @@ public interface WorkloadNetworkSegmentsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, + Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -111,8 +110,8 @@ Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkSegmentUpdate properties, Context context); + @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkSegmentInner properties, + Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") @@ -128,7 +127,7 @@ Mono>> deleteSegment(@HostParam("endpoint") String end @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetworkNext( + Mono> listByWorkloadNetworkNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } @@ -687,7 +686,7 @@ public WorkloadNetworkSegmentInner create(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentUpdate properties) { + String segmentId, WorkloadNetworkSegmentInner properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -735,7 +734,7 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentUpdate properties, Context context) { + String segmentId, WorkloadNetworkSegmentInner properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -780,7 +779,7 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties) { + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, segmentId, properties); return this.client.getLroResult(mono, @@ -803,7 +802,7 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties, + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { context = this.client.mergeContext(context); Mono>> mono @@ -827,7 +826,7 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties) { + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties).getSyncPoller(); } @@ -846,7 +845,7 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate properties, + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties, context) .getSyncPoller(); @@ -866,7 +865,7 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentUpdate properties) { + String segmentId, WorkloadNetworkSegmentInner properties) { return beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -886,7 +885,7 @@ private Mono updateAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentUpdate properties, Context context) { + String segmentId, WorkloadNetworkSegmentInner properties, Context context) { return beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -905,7 +904,7 @@ private Mono updateAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentUpdate properties) { + WorkloadNetworkSegmentInner properties) { return updateAsync(resourceGroupName, privateCloudName, segmentId, properties).block(); } @@ -924,7 +923,7 @@ public WorkloadNetworkSegmentInner update(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentUpdate properties, Context context) { + WorkloadNetworkSegmentInner properties, Context context) { return updateAsync(resourceGroupName, privateCloudName, segmentId, properties, context).block(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java index e7fc5d4370839..8b36c1b81a777 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java @@ -10,7 +10,6 @@ import com.azure.resourcemanager.avs.models.VMGroupStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; import java.util.Collections; import java.util.List; @@ -79,8 +78,6 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String vmGroupId; - private WorkloadNetworkVMGroupUpdate updateWorkloadNetworkVMGroup; - public WorkloadNetworkVMGroupImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -108,21 +105,20 @@ public WorkloadNetworkVMGroup create(Context context) { } public WorkloadNetworkVMGroupImpl update() { - this.updateWorkloadNetworkVMGroup = new WorkloadNetworkVMGroupUpdate(); return this; } public WorkloadNetworkVMGroup apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkVmGroups() - .update(resourceGroupName, privateCloudName, vmGroupId, updateWorkloadNetworkVMGroup, Context.NONE); + .update(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkVMGroup apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworkVmGroups() - .update(resourceGroupName, privateCloudName, vmGroupId, updateWorkloadNetworkVMGroup, context); + .update(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); return this; } @@ -152,36 +148,17 @@ public WorkloadNetworkVMGroup refresh(Context context) { } public WorkloadNetworkVMGroupImpl withDisplayName(String displayName) { - if (isInCreateMode()) { - this.innerModel().withDisplayName(displayName); - return this; - } else { - this.updateWorkloadNetworkVMGroup.withDisplayName(displayName); - return this; - } + this.innerModel().withDisplayName(displayName); + return this; } public WorkloadNetworkVMGroupImpl withMembers(List members) { - if (isInCreateMode()) { - this.innerModel().withMembers(members); - return this; - } else { - this.updateWorkloadNetworkVMGroup.withMembers(members); - return this; - } + this.innerModel().withMembers(members); + return this; } public WorkloadNetworkVMGroupImpl withRevision(Long revision) { - if (isInCreateMode()) { - this.innerModel().withRevision(revision); - return this; - } else { - this.updateWorkloadNetworkVMGroup.withRevision(revision); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; + this.innerModel().withRevision(revision); + return this; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java index 2f1f6c7580e75..3d9188915fd7d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.WorkloadNetworkVirtualMachinesClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachineListResult; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachinesList; import reactor.core.publisher.Mono; /** @@ -66,9 +66,8 @@ public interface WorkloadNetworkVirtualMachinesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetwork( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> listByWorkloadNetwork(@HostParam("endpoint") 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); @@ -88,7 +87,7 @@ Mono> get(@HostParam("endpoint") St @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetworkNext( + Mono> listByWorkloadNetworkNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java index 54fc7f28ad921..e0f84e6197f40 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java @@ -34,8 +34,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.WorkloadNetworkVmGroupsClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupListResult; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupsList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -76,7 +75,7 @@ public interface WorkloadNetworkVmGroupsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, + Mono> listByWorkloadNetwork(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -112,7 +111,7 @@ Mono>> update(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context); + @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") @@ -128,7 +127,7 @@ Mono>> delete(@HostParam("endpoint") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkloadNetworkNext( + Mono> listByWorkloadNetworkNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } @@ -679,7 +678,7 @@ public WorkloadNetworkVMGroupInner create(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -728,7 +727,7 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -775,7 +774,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateAsync( String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); return this.client.getLroResult(mono, @@ -799,7 +798,7 @@ private PollerFlux, WorkloadNetworkVMGro @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateAsync( String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context); @@ -823,7 +822,7 @@ private PollerFlux, WorkloadNetworkVMGro @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) .getSyncPoller(); } @@ -844,7 +843,7 @@ public SyncPoller, WorkloadNetworkVMGrou @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) .getSyncPoller(); } @@ -863,7 +862,7 @@ public SyncPoller, WorkloadNetworkVMGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { return beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -883,7 +882,7 @@ private Mono updateAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { return beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -902,7 +901,7 @@ private Mono updateAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { return updateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); } @@ -921,7 +920,7 @@ public WorkloadNetworkVMGroupInner update(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { return updateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context).block(); } 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 f297a888198f5..27ced7faccfb1 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 @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkListResult; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkList; import reactor.core.publisher.Mono; /** @@ -76,7 +76,7 @@ Mono> get(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -86,9 +86,8 @@ Mono> list(@HostParam("endpoint") String end @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java new file mode 100644 index 0000000000000..34ae80e952df3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/AddonList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.AddonInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Addon list operation. + */ +@Immutable +public final class AddonList implements JsonSerializable { + /* + * The Addon items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of AddonList class. + */ + private AddonList() { + } + + /** + * Get the value property: The Addon items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AddonList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AddonList.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 AddonList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AddonList 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 AddonList. + */ + public static AddonList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddonList deserializedAddonList = new AddonList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> AddonInner.fromJson(reader1)); + deserializedAddonList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAddonList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAddonList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java new file mode 100644 index 0000000000000..d2bdeceb5fbc5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/CloudLinkList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.CloudLinkInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a CloudLink list operation. + */ +@Immutable +public final class CloudLinkList implements JsonSerializable { + /* + * The CloudLink items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of CloudLinkList class. + */ + private CloudLinkList() { + } + + /** + * Get the value property: The CloudLink items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model CloudLinkList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudLinkList.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 CloudLinkList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CloudLinkList 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 CloudLinkList. + */ + public static CloudLinkList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CloudLinkList deserializedCloudLinkList = new CloudLinkList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> CloudLinkInner.fromJson(reader1)); + deserializedCloudLinkList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCloudLinkList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCloudLinkList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java new file mode 100644 index 0000000000000..c58f69412216d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ClusterList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.ClusterInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Cluster list operation. + */ +@Immutable +public final class ClusterList implements JsonSerializable { + /* + * The Cluster items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ClusterList class. + */ + private ClusterList() { + } + + /** + * Get the value property: The Cluster items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ClusterList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterList.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 ClusterList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterList 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 ClusterList. + */ + public static ClusterList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterList deserializedClusterList = new ClusterList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ClusterInner.fromJson(reader1)); + deserializedClusterList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedClusterList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java new file mode 100644 index 0000000000000..e0878d6f1b61d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/DatastoreList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.DatastoreInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Datastore list operation. + */ +@Immutable +public final class DatastoreList implements JsonSerializable { + /* + * The Datastore items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of DatastoreList class. + */ + private DatastoreList() { + } + + /** + * Get the value property: The Datastore items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model DatastoreList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DatastoreList.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 DatastoreList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatastoreList 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 DatastoreList. + */ + public static DatastoreList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatastoreList deserializedDatastoreList = new DatastoreList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> DatastoreInner.fromJson(reader1)); + deserializedDatastoreList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDatastoreList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatastoreList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java new file mode 100644 index 0000000000000..e88d80801ea55 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ExpressRouteAuthorizationList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.ExpressRouteAuthorizationInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ExpressRouteAuthorization list operation. + */ +@Immutable +public final class ExpressRouteAuthorizationList implements JsonSerializable { + /* + * The ExpressRouteAuthorization items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ExpressRouteAuthorizationList class. + */ + private ExpressRouteAuthorizationList() { + } + + /** + * Get the value property: The ExpressRouteAuthorization items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ExpressRouteAuthorizationList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExpressRouteAuthorizationList.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 ExpressRouteAuthorizationList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExpressRouteAuthorizationList 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 ExpressRouteAuthorizationList. + */ + public static ExpressRouteAuthorizationList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExpressRouteAuthorizationList deserializedExpressRouteAuthorizationList + = new ExpressRouteAuthorizationList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExpressRouteAuthorizationInner.fromJson(reader1)); + deserializedExpressRouteAuthorizationList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExpressRouteAuthorizationList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExpressRouteAuthorizationList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java new file mode 100644 index 0000000000000..b0a04317d7a16 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/GlobalReachConnectionList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.GlobalReachConnectionInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a GlobalReachConnection list operation. + */ +@Immutable +public final class GlobalReachConnectionList implements JsonSerializable { + /* + * The GlobalReachConnection items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of GlobalReachConnectionList class. + */ + private GlobalReachConnectionList() { + } + + /** + * Get the value property: The GlobalReachConnection items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model GlobalReachConnectionList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GlobalReachConnectionList.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 GlobalReachConnectionList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GlobalReachConnectionList 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 GlobalReachConnectionList. + */ + public static GlobalReachConnectionList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GlobalReachConnectionList deserializedGlobalReachConnectionList = new GlobalReachConnectionList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> GlobalReachConnectionInner.fromJson(reader1)); + deserializedGlobalReachConnectionList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGlobalReachConnectionList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGlobalReachConnectionList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java new file mode 100644 index 0000000000000..de7232d25a29c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/HcxEnterpriseSiteList.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.HcxEnterpriseSiteInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a HcxEnterpriseSite list operation. + */ +@Immutable +public final class HcxEnterpriseSiteList implements JsonSerializable { + /* + * The HcxEnterpriseSite items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of HcxEnterpriseSiteList class. + */ + private HcxEnterpriseSiteList() { + } + + /** + * Get the value property: The HcxEnterpriseSite items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model HcxEnterpriseSiteList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HcxEnterpriseSiteList.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 HcxEnterpriseSiteList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HcxEnterpriseSiteList 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 HcxEnterpriseSiteList. + */ + public static HcxEnterpriseSiteList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HcxEnterpriseSiteList deserializedHcxEnterpriseSiteList = new HcxEnterpriseSiteList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> HcxEnterpriseSiteInner.fromJson(reader1)); + deserializedHcxEnterpriseSiteList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedHcxEnterpriseSiteList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHcxEnterpriseSiteList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java index 2b2445394a8e9..a321ab85959f5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/IscsiPathListResult.java @@ -6,25 +6,27 @@ import com.azure.core.annotation.Immutable; 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.IscsiPathInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * The response of a IscsiPath list operation. */ @Immutable -public final class IscsiPathListResult { +public final class IscsiPathListResult implements JsonSerializable { /* * The IscsiPath items on this page */ - @JsonProperty(value = "value", required = true) private List value; /* * The link to the next page of items */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -66,4 +68,45 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(IscsiPathListResult.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 IscsiPathListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IscsiPathListResult 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 IscsiPathListResult. + */ + public static IscsiPathListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IscsiPathListResult deserializedIscsiPathListResult = new IscsiPathListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> IscsiPathInner.fromJson(reader1)); + deserializedIscsiPathListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedIscsiPathListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIscsiPathListResult; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java new file mode 100644 index 0000000000000..2b1d16cf79ab7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/OperationListResult.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.OperationInner; +import java.io.IOException; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class OperationListResult implements JsonSerializable { + /* + * The Operation items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of OperationListResult class. + */ + private OperationListResult() { + } + + /** + * Get the value property: The Operation items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OperationListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.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 OperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationListResult 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 OperationListResult. + */ + public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationListResult deserializedOperationListResult = new OperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); + deserializedOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationListResult; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java new file mode 100644 index 0000000000000..bc967e4fcaebf --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PlacementPoliciesList.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.PlacementPolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a PlacementPolicy list operation. + */ +@Immutable +public final class PlacementPoliciesList implements JsonSerializable { + /* + * The PlacementPolicy items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PlacementPoliciesList class. + */ + private PlacementPoliciesList() { + } + + /** + * Get the value property: The PlacementPolicy items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PlacementPoliciesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PlacementPoliciesList.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 PlacementPoliciesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlacementPoliciesList 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 PlacementPoliciesList. + */ + public static PlacementPoliciesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlacementPoliciesList deserializedPlacementPoliciesList = new PlacementPoliciesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PlacementPolicyInner.fromJson(reader1)); + deserializedPlacementPoliciesList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPlacementPoliciesList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlacementPoliciesList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java new file mode 100644 index 0000000000000..5c2d798b79574 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/PrivateCloudList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.PrivateCloudInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a PrivateCloud list operation. + */ +@Immutable +public final class PrivateCloudList implements JsonSerializable { + /* + * The PrivateCloud items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PrivateCloudList class. + */ + private PrivateCloudList() { + } + + /** + * Get the value property: The PrivateCloud items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PrivateCloudList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudList.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 PrivateCloudList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateCloudList 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 PrivateCloudList. + */ + public static PrivateCloudList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateCloudList deserializedPrivateCloudList = new PrivateCloudList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> PrivateCloudInner.fromJson(reader1)); + deserializedPrivateCloudList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateCloudList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateCloudList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java new file mode 100644 index 0000000000000..df760524584c4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptCmdletsList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.ScriptCmdletInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ScriptCmdlet list operation. + */ +@Immutable +public final class ScriptCmdletsList implements JsonSerializable { + /* + * The ScriptCmdlet items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ScriptCmdletsList class. + */ + private ScriptCmdletsList() { + } + + /** + * Get the value property: The ScriptCmdlet items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ScriptCmdletsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptCmdletsList.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 ScriptCmdletsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptCmdletsList 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 ScriptCmdletsList. + */ + public static ScriptCmdletsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptCmdletsList deserializedScriptCmdletsList = new ScriptCmdletsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ScriptCmdletInner.fromJson(reader1)); + deserializedScriptCmdletsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedScriptCmdletsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptCmdletsList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java new file mode 100644 index 0000000000000..221a2d7d4c1bd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.ScriptExecutionInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ScriptExecution list operation. + */ +@Immutable +public final class ScriptExecutionsList implements JsonSerializable { + /* + * The ScriptExecution items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ScriptExecutionsList class. + */ + private ScriptExecutionsList() { + } + + /** + * Get the value property: The ScriptExecution items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ScriptExecutionsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionsList.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 ScriptExecutionsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptExecutionsList 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 ScriptExecutionsList. + */ + public static ScriptExecutionsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptExecutionsList deserializedScriptExecutionsList = new ScriptExecutionsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ScriptExecutionInner.fromJson(reader1)); + deserializedScriptExecutionsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedScriptExecutionsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptExecutionsList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java new file mode 100644 index 0000000000000..4b6b8b48c29ff --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptPackagesList.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.ScriptPackageInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ScriptPackage list operation. + */ +@Immutable +public final class ScriptPackagesList implements JsonSerializable { + /* + * The ScriptPackage items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ScriptPackagesList class. + */ + private ScriptPackagesList() { + } + + /** + * Get the value property: The ScriptPackage items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ScriptPackagesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptPackagesList.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 ScriptPackagesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptPackagesList 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 ScriptPackagesList. + */ + public static ScriptPackagesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptPackagesList deserializedScriptPackagesList = new ScriptPackagesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ScriptPackageInner.fromJson(reader1)); + deserializedScriptPackagesList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedScriptPackagesList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptPackagesList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java new file mode 100644 index 0000000000000..db88c30ef7c8b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/VirtualMachinesList.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.VirtualMachineInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a VirtualMachine list operation. + */ +@Immutable +public final class VirtualMachinesList implements JsonSerializable { + /* + * The VirtualMachine items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of VirtualMachinesList class. + */ + private VirtualMachinesList() { + } + + /** + * Get the value property: The VirtualMachine items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model VirtualMachinesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachinesList.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 VirtualMachinesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachinesList 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 VirtualMachinesList. + */ + public static VirtualMachinesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachinesList deserializedVirtualMachinesList = new VirtualMachinesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VirtualMachineInner.fromJson(reader1)); + deserializedVirtualMachinesList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVirtualMachinesList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachinesList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java new file mode 100644 index 0000000000000..fef946cd0a77a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDhcpList.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkDhcpInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetworkDhcp list operation. + */ +@Immutable +public final class WorkloadNetworkDhcpList implements JsonSerializable { + /* + * The WorkloadNetworkDhcp items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkDhcpList class. + */ + private WorkloadNetworkDhcpList() { + } + + /** + * Get the value property: The WorkloadNetworkDhcp items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model WorkloadNetworkDhcpList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDhcpList.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 WorkloadNetworkDhcpList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDhcpList 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 WorkloadNetworkDhcpList. + */ + public static WorkloadNetworkDhcpList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDhcpList deserializedWorkloadNetworkDhcpList = new WorkloadNetworkDhcpList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkDhcpInner.fromJson(reader1)); + deserializedWorkloadNetworkDhcpList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkDhcpList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDhcpList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java new file mode 100644 index 0000000000000..292d21034031c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsServicesList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkDnsServiceInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetworkDnsService list operation. + */ +@Immutable +public final class WorkloadNetworkDnsServicesList implements JsonSerializable { + /* + * The WorkloadNetworkDnsService items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkDnsServicesList class. + */ + private WorkloadNetworkDnsServicesList() { + } + + /** + * Get the value property: The WorkloadNetworkDnsService items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkDnsServicesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsServicesList.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 WorkloadNetworkDnsServicesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDnsServicesList 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 WorkloadNetworkDnsServicesList. + */ + public static WorkloadNetworkDnsServicesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDnsServicesList deserializedWorkloadNetworkDnsServicesList + = new WorkloadNetworkDnsServicesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkDnsServiceInner.fromJson(reader1)); + deserializedWorkloadNetworkDnsServicesList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkDnsServicesList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDnsServicesList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java new file mode 100644 index 0000000000000..930c54561a183 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkDnsZonesList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkDnsZoneInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetworkDnsZone list operation. + */ +@Immutable +public final class WorkloadNetworkDnsZonesList implements JsonSerializable { + /* + * The WorkloadNetworkDnsZone items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkDnsZonesList class. + */ + private WorkloadNetworkDnsZonesList() { + } + + /** + * Get the value property: The WorkloadNetworkDnsZone items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkDnsZonesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsZonesList.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 WorkloadNetworkDnsZonesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDnsZonesList 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 WorkloadNetworkDnsZonesList. + */ + public static WorkloadNetworkDnsZonesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDnsZonesList deserializedWorkloadNetworkDnsZonesList = new WorkloadNetworkDnsZonesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkDnsZoneInner.fromJson(reader1)); + deserializedWorkloadNetworkDnsZonesList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkDnsZonesList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDnsZonesList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java new file mode 100644 index 0000000000000..770af19950ac5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkGatewayList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkGatewayInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetworkGateway list operation. + */ +@Immutable +public final class WorkloadNetworkGatewayList implements JsonSerializable { + /* + * The WorkloadNetworkGateway items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkGatewayList class. + */ + private WorkloadNetworkGatewayList() { + } + + /** + * Get the value property: The WorkloadNetworkGateway items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkGatewayList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkGatewayList.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 WorkloadNetworkGatewayList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkGatewayList 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 WorkloadNetworkGatewayList. + */ + public static WorkloadNetworkGatewayList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkGatewayList deserializedWorkloadNetworkGatewayList = new WorkloadNetworkGatewayList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkGatewayInner.fromJson(reader1)); + deserializedWorkloadNetworkGatewayList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkGatewayList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkGatewayList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java new file mode 100644 index 0000000000000..655ce3573c946 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkList.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetwork list operation. + */ +@Immutable +public final class WorkloadNetworkList implements JsonSerializable { + /* + * The WorkloadNetwork items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkList class. + */ + private WorkloadNetworkList() { + } + + /** + * Get the value property: The WorkloadNetwork items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model WorkloadNetworkList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkList.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 WorkloadNetworkList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkList 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 WorkloadNetworkList. + */ + public static WorkloadNetworkList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkList deserializedWorkloadNetworkList = new WorkloadNetworkList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkInner.fromJson(reader1)); + deserializedWorkloadNetworkList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java new file mode 100644 index 0000000000000..8bee83c796c69 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPortMirroringList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkPortMirroringInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetworkPortMirroring list operation. + */ +@Immutable +public final class WorkloadNetworkPortMirroringList implements JsonSerializable { + /* + * The WorkloadNetworkPortMirroring items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkPortMirroringList class. + */ + private WorkloadNetworkPortMirroringList() { + } + + /** + * Get the value property: The WorkloadNetworkPortMirroring items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkPortMirroringList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPortMirroringList.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 WorkloadNetworkPortMirroringList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkPortMirroringList 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 WorkloadNetworkPortMirroringList. + */ + public static WorkloadNetworkPortMirroringList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkPortMirroringList deserializedWorkloadNetworkPortMirroringList + = new WorkloadNetworkPortMirroringList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkPortMirroringInner.fromJson(reader1)); + deserializedWorkloadNetworkPortMirroringList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkPortMirroringList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkPortMirroringList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java new file mode 100644 index 0000000000000..79339df90f448 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkPublicIPsList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkPublicIpInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetworkPublicIP list operation. + */ +@Immutable +public final class WorkloadNetworkPublicIPsList implements JsonSerializable { + /* + * The WorkloadNetworkPublicIP items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkPublicIPsList class. + */ + private WorkloadNetworkPublicIPsList() { + } + + /** + * Get the value property: The WorkloadNetworkPublicIP items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkPublicIPsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPublicIPsList.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 WorkloadNetworkPublicIPsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkPublicIPsList 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 WorkloadNetworkPublicIPsList. + */ + public static WorkloadNetworkPublicIPsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkPublicIPsList deserializedWorkloadNetworkPublicIPsList = new WorkloadNetworkPublicIPsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkPublicIpInner.fromJson(reader1)); + deserializedWorkloadNetworkPublicIPsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkPublicIPsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkPublicIPsList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java new file mode 100644 index 0000000000000..e066949e7b83b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkSegmentsList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkSegmentInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetworkSegment list operation. + */ +@Immutable +public final class WorkloadNetworkSegmentsList implements JsonSerializable { + /* + * The WorkloadNetworkSegment items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkSegmentsList class. + */ + private WorkloadNetworkSegmentsList() { + } + + /** + * Get the value property: The WorkloadNetworkSegment items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkSegmentsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkSegmentsList.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 WorkloadNetworkSegmentsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkSegmentsList 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 WorkloadNetworkSegmentsList. + */ + public static WorkloadNetworkSegmentsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkSegmentsList deserializedWorkloadNetworkSegmentsList = new WorkloadNetworkSegmentsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkSegmentInner.fromJson(reader1)); + deserializedWorkloadNetworkSegmentsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkSegmentsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkSegmentsList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java new file mode 100644 index 0000000000000..529bacfa504a9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVMGroupsList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkVMGroupInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetworkVMGroup list operation. + */ +@Immutable +public final class WorkloadNetworkVMGroupsList implements JsonSerializable { + /* + * The WorkloadNetworkVMGroup items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkVMGroupsList class. + */ + private WorkloadNetworkVMGroupsList() { + } + + /** + * Get the value property: The WorkloadNetworkVMGroup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkVMGroupsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVMGroupsList.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 WorkloadNetworkVMGroupsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkVMGroupsList 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 WorkloadNetworkVMGroupsList. + */ + public static WorkloadNetworkVMGroupsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkVMGroupsList deserializedWorkloadNetworkVMGroupsList = new WorkloadNetworkVMGroupsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkVMGroupInner.fromJson(reader1)); + deserializedWorkloadNetworkVMGroupsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkVMGroupsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkVMGroupsList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java new file mode 100644 index 0000000000000..573d4ffa5d70e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/WorkloadNetworkVirtualMachinesList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.WorkloadNetworkVirtualMachineInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a WorkloadNetworkVirtualMachine list operation. + */ +@Immutable +public final class WorkloadNetworkVirtualMachinesList implements JsonSerializable { + /* + * The WorkloadNetworkVirtualMachine items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkVirtualMachinesList class. + */ + private WorkloadNetworkVirtualMachinesList() { + } + + /** + * Get the value property: The WorkloadNetworkVirtualMachine items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkVirtualMachinesList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVirtualMachinesList.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 WorkloadNetworkVirtualMachinesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkVirtualMachinesList 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 WorkloadNetworkVirtualMachinesList. + */ + public static WorkloadNetworkVirtualMachinesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkVirtualMachinesList deserializedWorkloadNetworkVirtualMachinesList + = new WorkloadNetworkVirtualMachinesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> WorkloadNetworkVirtualMachineInner.fromJson(reader1)); + deserializedWorkloadNetworkVirtualMachinesList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedWorkloadNetworkVirtualMachinesList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkVirtualMachinesList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java index 1e2b7e1a440fd..0322f0e300dd0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public ActionType() { * @param name a name to look for. * @return the corresponding ActionType. */ - @JsonCreator public static ActionType fromString(String name) { return fromString(name, ActionType.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java index 2e99ee4029b0d..22ecde52de545 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java @@ -137,7 +137,7 @@ interface WithProperties { /** * The template for Addon update. */ - interface Update { + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * @@ -158,6 +158,18 @@ interface Update { * The Addon update stages. */ interface UpdateStages { + /** + * The stage of the Addon update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(AddonProperties properties); + } } /** 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 770649b610aa8..04599dbf8543d 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 @@ -5,35 +5,31 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The properties of an Arc addon. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "addonType", - defaultImpl = AddonArcProperties.class, - visible = true) -@JsonTypeName("Arc") @Fluent public final class AddonArcProperties extends AddonProperties { /* * Addon type */ - @JsonTypeId - @JsonProperty(value = "addonType", required = true) private AddonType addonType = AddonType.ARC; /* * The VMware vCenter resource ID */ - @JsonProperty(value = "vCenter") private String vCenter; + /* + * The state of the addon provisioning + */ + private AddonProvisioningState provisioningState; + /** * Creates an instance of AddonArcProperties class. */ @@ -70,6 +66,16 @@ 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. * @@ -79,4 +85,46 @@ public AddonArcProperties withVCenter(String vCenter) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("addonType", this.addonType == null ? null : this.addonType.toString()); + jsonWriter.writeStringField("vCenter", this.vCenter); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AddonArcProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AddonArcProperties 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 AddonArcProperties. + */ + public static AddonArcProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddonArcProperties deserializedAddonArcProperties = new AddonArcProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedAddonArcProperties.provisioningState + = AddonProvisioningState.fromString(reader.getString()); + } else if ("addonType".equals(fieldName)) { + deserializedAddonArcProperties.addonType = AddonType.fromString(reader.getString()); + } else if ("vCenter".equals(fieldName)) { + deserializedAddonArcProperties.vCenter = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAddonArcProperties; + }); + } } 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 62cf458248488..f2a981b779e64 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 @@ -6,35 +6,31 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The properties of an HCX addon. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "addonType", - defaultImpl = AddonHcxProperties.class, - visible = true) -@JsonTypeName("HCX") @Fluent public final class AddonHcxProperties extends AddonProperties { /* * Addon type */ - @JsonTypeId - @JsonProperty(value = "addonType", required = true) private AddonType addonType = AddonType.HCX; /* * The HCX offer, example VMware MaaS Cloud Provider (Enterprise) */ - @JsonProperty(value = "offer", required = true) private String offer; + /* + * The state of the addon provisioning + */ + private AddonProvisioningState provisioningState; + /** * Creates an instance of AddonHcxProperties class. */ @@ -71,6 +67,16 @@ public AddonHcxProperties withOffer(String offer) { 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. * @@ -86,4 +92,47 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(AddonHcxProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("offer", this.offer); + jsonWriter.writeStringField("addonType", this.addonType == null ? null : this.addonType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AddonHcxProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AddonHcxProperties 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 AddonHcxProperties. + */ + public static AddonHcxProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddonHcxProperties deserializedAddonHcxProperties = new AddonHcxProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedAddonHcxProperties.provisioningState + = 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 { + reader.skipChildren(); + } + } + + return deserializedAddonHcxProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java index 2a94360247bb3..67e3aaa9b2ff0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java @@ -5,35 +5,25 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +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 an addon. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "addonType", defaultImpl = AddonProperties.class, visible = true) -@JsonTypeName("AddonProperties") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "SRM", value = AddonSrmProperties.class), - @JsonSubTypes.Type(name = "VR", value = AddonVrProperties.class), - @JsonSubTypes.Type(name = "HCX", value = AddonHcxProperties.class), - @JsonSubTypes.Type(name = "Arc", value = AddonArcProperties.class) }) @Immutable -public class AddonProperties { +public class AddonProperties implements JsonSerializable { /* * Addon type */ - @JsonTypeId - @JsonProperty(value = "addonType", required = true) private AddonType addonType = AddonType.fromString("AddonProperties"); /* * The state of the addon provisioning */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private AddonProvisioningState provisioningState; /** @@ -60,6 +50,17 @@ public AddonProvisioningState provisioningState() { return this.provisioningState; } + /** + * Set the provisioningState property: The state of the addon provisioning. + * + * @param provisioningState the provisioningState value to set. + * @return the AddonProperties object itself. + */ + AddonProperties withProvisioningState(AddonProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + /** * Validates the instance. * @@ -67,4 +68,74 @@ public AddonProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("addonType", this.addonType == null ? null : this.addonType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AddonProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AddonProperties 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 AddonProperties. + */ + public static AddonProperties 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 ("addonType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("SRM".equals(discriminatorValue)) { + return AddonSrmProperties.fromJson(readerToUse.reset()); + } else if ("VR".equals(discriminatorValue)) { + return AddonVrProperties.fromJson(readerToUse.reset()); + } else if ("HCX".equals(discriminatorValue)) { + return AddonHcxProperties.fromJson(readerToUse.reset()); + } else if ("Arc".equals(discriminatorValue)) { + return AddonArcProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static AddonProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddonProperties deserializedAddonProperties = new AddonProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("addonType".equals(fieldName)) { + deserializedAddonProperties.addonType = AddonType.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedAddonProperties.provisioningState + = AddonProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAddonProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java index 97f859a2dab0c..c4ec6d2f28126 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public AddonProvisioningState() { * @param name a name to look for. * @return the corresponding AddonProvisioningState. */ - @JsonCreator public static AddonProvisioningState fromString(String name) { return fromString(name, AddonProvisioningState.class); } 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 76ba8c9c95dd2..a31a2bca88646 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 @@ -5,35 +5,31 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The properties of a Site Recovery Manager (SRM) addon. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "addonType", - defaultImpl = AddonSrmProperties.class, - visible = true) -@JsonTypeName("SRM") @Fluent public final class AddonSrmProperties extends AddonProperties { /* * Addon type */ - @JsonTypeId - @JsonProperty(value = "addonType", required = true) private AddonType addonType = AddonType.SRM; /* * The Site Recovery Manager (SRM) license */ - @JsonProperty(value = "licenseKey") private String licenseKey; + /* + * The state of the addon provisioning + */ + private AddonProvisioningState provisioningState; + /** * Creates an instance of AddonSrmProperties class. */ @@ -70,6 +66,16 @@ 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. * @@ -79,4 +85,46 @@ public AddonSrmProperties withLicenseKey(String licenseKey) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("addonType", this.addonType == null ? null : this.addonType.toString()); + jsonWriter.writeStringField("licenseKey", this.licenseKey); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AddonSrmProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AddonSrmProperties 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 AddonSrmProperties. + */ + public static AddonSrmProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddonSrmProperties deserializedAddonSrmProperties = new AddonSrmProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedAddonSrmProperties.provisioningState + = AddonProvisioningState.fromString(reader.getString()); + } else if ("addonType".equals(fieldName)) { + deserializedAddonSrmProperties.addonType = AddonType.fromString(reader.getString()); + } else if ("licenseKey".equals(fieldName)) { + deserializedAddonSrmProperties.licenseKey = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAddonSrmProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java index d1d8a0b7fe561..57b25f50ac57e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public AddonType() { * @param name a name to look for. * @return the corresponding AddonType. */ - @JsonCreator public static AddonType fromString(String name) { return fromString(name, AddonType.class); } 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 94be4fb3727db..1fa733b29ffb2 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 @@ -5,31 +5,31 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The properties of a vSphere Replication (VR) addon. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "addonType", defaultImpl = AddonVrProperties.class, visible = true) -@JsonTypeName("VR") @Fluent public final class AddonVrProperties extends AddonProperties { /* * Addon type */ - @JsonTypeId - @JsonProperty(value = "addonType", required = true) private AddonType addonType = AddonType.VR; /* * The vSphere Replication Server (VRS) count */ - @JsonProperty(value = "vrsCount", required = true) private int vrsCount; + /* + * The state of the addon provisioning + */ + private AddonProvisioningState provisioningState; + /** * Creates an instance of AddonVrProperties class. */ @@ -66,6 +66,16 @@ 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. * @@ -75,4 +85,47 @@ public AddonVrProperties withVrsCount(int vrsCount) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("vrsCount", this.vrsCount); + jsonWriter.writeStringField("addonType", this.addonType == null ? null : this.addonType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AddonVrProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AddonVrProperties 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 AddonVrProperties. + */ + public static AddonVrProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AddonVrProperties deserializedAddonVrProperties = new AddonVrProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedAddonVrProperties.provisioningState + = AddonProvisioningState.fromString(reader.getString()); + } else if ("vrsCount".equals(fieldName)) { + deserializedAddonVrProperties.vrsCount = reader.getInt(); + } else if ("addonType".equals(fieldName)) { + deserializedAddonVrProperties.addonType = AddonType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAddonVrProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java index f4c84d0b511a4..5c3f77a76ce98 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public AffinityStrength() { * @param name a name to look for. * @return the corresponding AffinityStrength. */ - @JsonCreator public static AffinityStrength fromString(String name) { return fromString(name, AffinityStrength.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java index 6737aee1af2a3..59f40dc8ec3ad 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public AffinityType() { * @param name a name to look for. * @return the corresponding AffinityType. */ - @JsonCreator public static AffinityType fromString(String name) { return fromString(name, AffinityType.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java index 5d5efeb1974cf..3bab7b0d484dd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 describing private cloud availability zone distribution. */ @Fluent -public final class AvailabilityProperties { +public final class AvailabilityProperties implements JsonSerializable { /* * The availability strategy for the private cloud */ - @JsonProperty(value = "strategy") private AvailabilityStrategy strategy; /* * The primary availability zone for the private cloud */ - @JsonProperty(value = "zone") private Integer zone; /* * The secondary availability zone for the private cloud */ - @JsonProperty(value = "secondaryZone") private Integer secondaryZone; /** @@ -103,4 +104,46 @@ public AvailabilityProperties withSecondaryZone(Integer secondaryZone) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("strategy", this.strategy == null ? null : this.strategy.toString()); + jsonWriter.writeNumberField("zone", this.zone); + jsonWriter.writeNumberField("secondaryZone", this.secondaryZone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailabilityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailabilityProperties 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 AvailabilityProperties. + */ + public static AvailabilityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AvailabilityProperties deserializedAvailabilityProperties = new AvailabilityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("strategy".equals(fieldName)) { + deserializedAvailabilityProperties.strategy = AvailabilityStrategy.fromString(reader.getString()); + } else if ("zone".equals(fieldName)) { + deserializedAvailabilityProperties.zone = reader.getNullable(JsonReader::getInt); + } else if ("secondaryZone".equals(fieldName)) { + deserializedAvailabilityProperties.secondaryZone = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailabilityProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java index 042f51e5b69c3..ca114ccc65bf1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public AvailabilityStrategy() { * @param name a name to look for. * @return the corresponding AvailabilityStrategy. */ - @JsonCreator public static AvailabilityStrategy fromString(String name) { return fromString(name, AvailabilityStrategy.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java index e95e2487e4e45..932f814d293fa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public AzureHybridBenefitType() { * @param name a name to look for. * @return the corresponding AzureHybridBenefitType. */ - @JsonCreator public static AzureHybridBenefitType fromString(String name) { return fromString(name, AzureHybridBenefitType.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java index 95542b2a4456a..42484381f02ed 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * An ExpressRoute Circuit. */ @Immutable -public final class Circuit { +public final class Circuit implements JsonSerializable { /* * CIDR of primary subnet */ - @JsonProperty(value = "primarySubnet", access = JsonProperty.Access.WRITE_ONLY) private String primarySubnet; /* * CIDR of secondary subnet */ - @JsonProperty(value = "secondarySubnet", access = JsonProperty.Access.WRITE_ONLY) private String secondarySubnet; /* * Identifier of the ExpressRoute Circuit (Microsoft Colo only) */ - @JsonProperty(value = "expressRouteID", access = JsonProperty.Access.WRITE_ONLY) private String expressRouteId; /* * ExpressRoute Circuit private peering identifier */ - @JsonProperty(value = "expressRoutePrivatePeeringID", access = JsonProperty.Access.WRITE_ONLY) private String expressRoutePrivatePeeringId; /** @@ -85,4 +85,45 @@ public String expressRoutePrivatePeeringId() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Circuit from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Circuit 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 Circuit. + */ + public static Circuit fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Circuit deserializedCircuit = new Circuit(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primarySubnet".equals(fieldName)) { + deserializedCircuit.primarySubnet = reader.getString(); + } else if ("secondarySubnet".equals(fieldName)) { + deserializedCircuit.secondarySubnet = reader.getString(); + } else if ("expressRouteID".equals(fieldName)) { + deserializedCircuit.expressRouteId = reader.getString(); + } else if ("expressRoutePrivatePeeringID".equals(fieldName)) { + deserializedCircuit.expressRoutePrivatePeeringId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCircuit; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java index 16b507f1636a8..c6487cf29f404 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public CloudLinkProvisioningState() { * @param name a name to look for. * @return the corresponding CloudLinkProvisioningState. */ - @JsonCreator public static CloudLinkProvisioningState fromString(String name) { return fromString(name, CloudLinkProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java index 3d8a7fcd51814..06efb216419a2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -52,7 +51,6 @@ public CloudLinkStatus() { * @param name a name to look for. * @return the corresponding CloudLinkStatus. */ - @JsonCreator public static CloudLinkStatus fromString(String name) { return fromString(name, CloudLinkStatus.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java index 62d9c9ab36207..770cb04a1698a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public ClusterProvisioningState() { * @param name a name to look for. * @return the corresponding ClusterProvisioningState. */ - @JsonCreator public static ClusterProvisioningState fromString(String name) { return fromString(name, ClusterProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java index 404e7b8dd03c1..f770db686fd92 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java @@ -5,25 +5,27 @@ 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 com.azure.resourcemanager.avs.fluent.models.ClusterUpdateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * An update of a cluster resource. */ @Fluent -public final class ClusterUpdate { +public final class ClusterUpdate implements JsonSerializable { /* * The SKU (Stock Keeping Unit) assigned to this resource. */ - @JsonProperty(value = "sku") private Sku sku; /* * The properties of a cluster resource that may be updated */ - @JsonProperty(value = "properties") private ClusterUpdateProperties innerProperties; /** @@ -120,4 +122,43 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterUpdate 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 ClusterUpdate. + */ + public static ClusterUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterUpdate deserializedClusterUpdate = new ClusterUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sku".equals(fieldName)) { + deserializedClusterUpdate.sku = Sku.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedClusterUpdate.innerProperties = ClusterUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterUpdate; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java index af36ef2ca495c..70605586268be 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +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; /** * Zone and associated hosts info. */ @Immutable -public final class ClusterZone { +public final class ClusterZone implements JsonSerializable { /* * List of hosts belonging to the availability zone in a cluster */ - @JsonProperty(value = "hosts", access = JsonProperty.Access.WRITE_ONLY) private List hosts; /* * Availability zone identifier */ - @JsonProperty(value = "zone", access = JsonProperty.Access.WRITE_ONLY) private String zone; /** @@ -56,4 +58,42 @@ public String zone() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterZone from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterZone 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 ClusterZone. + */ + public static ClusterZone fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterZone deserializedClusterZone = new ClusterZone(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hosts".equals(fieldName)) { + List hosts = reader.readArray(reader1 -> reader1.getString()); + deserializedClusterZone.hosts = hosts; + } else if ("zone".equals(fieldName)) { + deserializedClusterZone.zone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterZone; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java index 71943a806dd68..65be88695cf64 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; /** * The ClustersUpdateHeaders model. @@ -17,13 +16,11 @@ public final class ClustersUpdateHeaders { /* * The Retry-After property. */ - @JsonProperty(value = "Retry-After") private Integer retryAfter; /* * The Location property. */ - @JsonProperty(value = "Location") private String location; // HttpHeaders containing the raw property values. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java index c7e9aa7b45af5..de253632494a7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -67,7 +66,6 @@ public DatastoreProvisioningState() { * @param name a name to look for. * @return the corresponding DatastoreProvisioningState. */ - @JsonCreator public static DatastoreProvisioningState fromString(String name) { return fromString(name, DatastoreProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java index dac8a488be951..a2849634fc1f6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public DatastoreStatus() { * @param name a name to look for. * @return the corresponding DatastoreStatus. */ - @JsonCreator public static DatastoreStatus fromString(String name) { return fromString(name, DatastoreStatus.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java index 01669779e0bf9..1874d6e10800b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public DhcpTypeEnum() { * @param name a name to look for. * @return the corresponding DhcpTypeEnum. */ - @JsonCreator public static DhcpTypeEnum fromString(String name) { return fromString(name, DhcpTypeEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java index a610724aa61ba..3036ea8f8890a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java @@ -6,36 +6,36 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * An iSCSI volume from Microsoft.StoragePool provider. */ @Fluent -public final class DiskPoolVolume { +public final class DiskPoolVolume implements JsonSerializable { /* * Azure resource ID of the iSCSI target */ - @JsonProperty(value = "targetId", required = true) private String targetId; /* * Name of the LUN to be used for datastore */ - @JsonProperty(value = "lunName", required = true) private String lunName; /* * Mode that describes whether the LUN has to be mounted as a datastore or * attached as a LUN */ - @JsonProperty(value = "mountOption") private MountOptionEnum mountOption; /* * Device path */ - @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) private String path; /** @@ -132,4 +132,49 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(DiskPoolVolume.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetId", this.targetId); + jsonWriter.writeStringField("lunName", this.lunName); + jsonWriter.writeStringField("mountOption", this.mountOption == null ? null : this.mountOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiskPoolVolume from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiskPoolVolume 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 DiskPoolVolume. + */ + public static DiskPoolVolume fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiskPoolVolume deserializedDiskPoolVolume = new DiskPoolVolume(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetId".equals(fieldName)) { + deserializedDiskPoolVolume.targetId = reader.getString(); + } else if ("lunName".equals(fieldName)) { + deserializedDiskPoolVolume.lunName = reader.getString(); + } else if ("mountOption".equals(fieldName)) { + deserializedDiskPoolVolume.mountOption = MountOptionEnum.fromString(reader.getString()); + } else if ("path".equals(fieldName)) { + deserializedDiskPoolVolume.path = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiskPoolVolume; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java index 0149e9a6215ef..be0c1b8e7c490 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -52,7 +51,6 @@ public DnsServiceLogLevelEnum() { * @param name a name to look for. * @return the corresponding DnsServiceLogLevelEnum. */ - @JsonCreator public static DnsServiceLogLevelEnum fromString(String name) { return fromString(name, DnsServiceLogLevelEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java index 3c4515e7963cc..98f414d9f9e61 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public DnsServiceStatusEnum() { * @param name a name to look for. * @return the corresponding DnsServiceStatusEnum. */ - @JsonCreator public static DnsServiceStatusEnum fromString(String name) { return fromString(name, DnsServiceStatusEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java index 244416261c6df..8b4261d15578f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public DnsZoneType() { * @param name a name to look for. * @return the corresponding DnsZoneType. */ - @JsonCreator public static DnsZoneType fromString(String name) { return fromString(name, DnsZoneType.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java index 5918b457024ec..ecf6eef6c96ae 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java @@ -6,17 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * An Elastic SAN volume from Microsoft.ElasticSan provider. */ @Fluent -public final class ElasticSanVolume { +public final class ElasticSanVolume implements JsonSerializable { /* * Azure resource ID of the Elastic SAN Volume */ - @JsonProperty(value = "targetId", required = true) private String targetId; /** @@ -58,4 +61,41 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ElasticSanVolume.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetId", this.targetId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSanVolume from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSanVolume 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 ElasticSanVolume. + */ + public static ElasticSanVolume fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSanVolume deserializedElasticSanVolume = new ElasticSanVolume(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetId".equals(fieldName)) { + deserializedElasticSanVolume.targetId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSanVolume; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java index cbf60213ebd09..2485edf71ae5a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 customer managed encryption key. */ @Fluent -public final class Encryption { +public final class Encryption implements JsonSerializable { /* * Status of customer managed encryption key */ - @JsonProperty(value = "status") private EncryptionState status; /* * The key vault where the encryption key is stored */ - @JsonProperty(value = "keyVaultProperties") private EncryptionKeyVaultProperties keyVaultProperties; /** @@ -80,4 +82,43 @@ public void validate() { keyVaultProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Encryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Encryption 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 Encryption. + */ + public static Encryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Encryption deserializedEncryption = new Encryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedEncryption.status = EncryptionState.fromString(reader.getString()); + } else if ("keyVaultProperties".equals(fieldName)) { + deserializedEncryption.keyVaultProperties = EncryptionKeyVaultProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryption; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java index 6bd6583f53a2d..9d80df0380599 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public EncryptionKeyStatus() { * @param name a name to look for. * @return the corresponding EncryptionKeyStatus. */ - @JsonCreator public static EncryptionKeyStatus fromString(String name) { return fromString(name, EncryptionKeyStatus.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java index 5a62734620fa5..b6279d7d00074 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java @@ -5,47 +5,45 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * An Encryption Key. */ @Fluent -public final class EncryptionKeyVaultProperties { +public final class EncryptionKeyVaultProperties implements JsonSerializable { /* * The name of the key. */ - @JsonProperty(value = "keyName") private String keyName; /* * The version of the key. */ - @JsonProperty(value = "keyVersion") private String keyVersion; /* * The auto-detected version of the key if versionType is auto-detected. */ - @JsonProperty(value = "autoDetectedKeyVersion", access = JsonProperty.Access.WRITE_ONLY) private String autoDetectedKeyVersion; /* * The URL of the vault. */ - @JsonProperty(value = "keyVaultUrl") private String keyVaultUrl; /* * The state of key provided */ - @JsonProperty(value = "keyState", access = JsonProperty.Access.WRITE_ONLY) private EncryptionKeyStatus keyState; /* * Property of the key if user provided or auto detected */ - @JsonProperty(value = "versionType", access = JsonProperty.Access.WRITE_ONLY) private EncryptionVersionType versionType; /** @@ -148,4 +146,54 @@ public EncryptionVersionType versionType() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyName", this.keyName); + jsonWriter.writeStringField("keyVersion", this.keyVersion); + jsonWriter.writeStringField("keyVaultUrl", this.keyVaultUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptionKeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptionKeyVaultProperties 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 EncryptionKeyVaultProperties. + */ + public static EncryptionKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptionKeyVaultProperties deserializedEncryptionKeyVaultProperties = new EncryptionKeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyName".equals(fieldName)) { + deserializedEncryptionKeyVaultProperties.keyName = reader.getString(); + } else if ("keyVersion".equals(fieldName)) { + deserializedEncryptionKeyVaultProperties.keyVersion = reader.getString(); + } else if ("autoDetectedKeyVersion".equals(fieldName)) { + deserializedEncryptionKeyVaultProperties.autoDetectedKeyVersion = reader.getString(); + } else if ("keyVaultUrl".equals(fieldName)) { + deserializedEncryptionKeyVaultProperties.keyVaultUrl = reader.getString(); + } else if ("keyState".equals(fieldName)) { + deserializedEncryptionKeyVaultProperties.keyState + = EncryptionKeyStatus.fromString(reader.getString()); + } else if ("versionType".equals(fieldName)) { + deserializedEncryptionKeyVaultProperties.versionType + = EncryptionVersionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptionKeyVaultProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java index 90d39b0b04f53..2ed252ea0e5cb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public EncryptionState() { * @param name a name to look for. * @return the corresponding EncryptionState. */ - @JsonCreator public static EncryptionState fromString(String name) { return fromString(name, EncryptionState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java index 56e45c51104e5..6f92d45a843b8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public EncryptionVersionType() { * @param name a name to look for. * @return the corresponding EncryptionVersionType. */ - @JsonCreator public static EncryptionVersionType fromString(String name) { return fromString(name, EncryptionVersionType.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java index e9e31207fe3a5..1ec6012f38fad 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java @@ -5,47 +5,45 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Endpoint addresses. */ @Immutable -public final class Endpoints { +public final class Endpoints implements JsonSerializable { /* * Endpoint FQDN for the NSX-T Data Center manager */ - @JsonProperty(value = "nsxtManager", access = JsonProperty.Access.WRITE_ONLY) private String nsxtManager; /* * Endpoint FQDN for Virtual Center Server Appliance */ - @JsonProperty(value = "vcsa", access = JsonProperty.Access.WRITE_ONLY) private String vcsa; /* * Endpoint FQDN for the HCX Cloud Manager */ - @JsonProperty(value = "hcxCloudManager", access = JsonProperty.Access.WRITE_ONLY) private String hcxCloudManager; /* * Endpoint IP for the NSX-T Data Center manager */ - @JsonProperty(value = "nsxtManagerIp", access = JsonProperty.Access.WRITE_ONLY) private String nsxtManagerIp; /* * Endpoint IP for Virtual Center Server Appliance */ - @JsonProperty(value = "vcenterIp", access = JsonProperty.Access.WRITE_ONLY) private String vcenterIp; /* * Endpoint IP for the HCX Cloud Manager */ - @JsonProperty(value = "hcxCloudManagerIp", access = JsonProperty.Access.WRITE_ONLY) private String hcxCloudManagerIp; /** @@ -115,4 +113,49 @@ public String hcxCloudManagerIp() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Endpoints from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Endpoints 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 Endpoints. + */ + public static Endpoints fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Endpoints deserializedEndpoints = new Endpoints(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nsxtManager".equals(fieldName)) { + deserializedEndpoints.nsxtManager = reader.getString(); + } else if ("vcsa".equals(fieldName)) { + deserializedEndpoints.vcsa = reader.getString(); + } else if ("hcxCloudManager".equals(fieldName)) { + deserializedEndpoints.hcxCloudManager = reader.getString(); + } else if ("nsxtManagerIp".equals(fieldName)) { + deserializedEndpoints.nsxtManagerIp = reader.getString(); + } else if ("vcenterIp".equals(fieldName)) { + deserializedEndpoints.vcenterIp = reader.getString(); + } else if ("hcxCloudManagerIp".equals(fieldName)) { + deserializedEndpoints.hcxCloudManagerIp = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpoints; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java index 30a3bc34cc576..ea9d641b9779f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -48,7 +47,6 @@ public ExpressRouteAuthorizationProvisioningState() { * @param name a name to look for. * @return the corresponding ExpressRouteAuthorizationProvisioningState. */ - @JsonCreator public static ExpressRouteAuthorizationProvisioningState fromString(String name) { return fromString(name, ExpressRouteAuthorizationProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java index 18c2464b67690..f0e4505b46314 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -48,7 +47,6 @@ public GlobalReachConnectionProvisioningState() { * @param name a name to look for. * @return the corresponding GlobalReachConnectionProvisioningState. */ - @JsonCreator public static GlobalReachConnectionProvisioningState fromString(String name) { return fromString(name, GlobalReachConnectionProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java index 6a419aec25cbf..4ddf3fb31ab42 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public GlobalReachConnectionStatus() { * @param name a name to look for. * @return the corresponding GlobalReachConnectionStatus. */ - @JsonCreator public static GlobalReachConnectionStatus fromString(String name) { return fromString(name, GlobalReachConnectionStatus.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java index 578e9984329b2..d0fe69e15a2f2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public HcxEnterpriseSiteProvisioningState() { * @param name a name to look for. * @return the corresponding HcxEnterpriseSiteProvisioningState. */ - @JsonCreator public static HcxEnterpriseSiteProvisioningState fromString(String name) { return fromString(name, HcxEnterpriseSiteProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java index 137f1d0d6547c..6bb9fde8e7efd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public HcxEnterpriseSiteStatus() { * @param name a name to look for. * @return the corresponding HcxEnterpriseSiteStatus. */ - @JsonCreator public static HcxEnterpriseSiteStatus fromString(String name) { return fromString(name, HcxEnterpriseSiteStatus.class); } 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 80eb5d1c973ca..8351a2adcc28d 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 @@ -5,73 +5,67 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * vCenter Single Sign On Identity Source. */ @Fluent -public final class IdentitySource { +public final class IdentitySource implements JsonSerializable { /* * The name of the identity source */ - @JsonProperty(value = "name") private String name; /* * The domain's NetBIOS name */ - @JsonProperty(value = "alias") private String alias; /* * The domain's dns name */ - @JsonProperty(value = "domain") private String domain; /* * The base distinguished name for users */ - @JsonProperty(value = "baseUserDN") private String baseUserDN; /* * The base distinguished name for groups */ - @JsonProperty(value = "baseGroupDN") private String baseGroupDN; /* * Primary server URL */ - @JsonProperty(value = "primaryServer") private String primaryServer; /* * Secondary server URL */ - @JsonProperty(value = "secondaryServer") private String secondaryServer; /* * Protect LDAP communication using SSL certificate (LDAPS) */ - @JsonProperty(value = "ssl") private SslEnum ssl; /* * The ID of an Active Directory user with a minimum of read-only access to Base * DN for users and group */ - @JsonProperty(value = "username") private String username; /* * The password of the Active Directory user with a minimum of read-only access to * Base DN for users and groups. */ - @JsonProperty(value = "password") private String password; /** @@ -291,4 +285,67 @@ public IdentitySource withPassword(String password) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("alias", this.alias); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeStringField("baseUserDN", this.baseUserDN); + jsonWriter.writeStringField("baseGroupDN", this.baseGroupDN); + jsonWriter.writeStringField("primaryServer", this.primaryServer); + jsonWriter.writeStringField("secondaryServer", this.secondaryServer); + jsonWriter.writeStringField("ssl", this.ssl == null ? null : this.ssl.toString()); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("password", this.password); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentitySource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentitySource 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 IdentitySource. + */ + public static IdentitySource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentitySource deserializedIdentitySource = new IdentitySource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedIdentitySource.name = reader.getString(); + } else if ("alias".equals(fieldName)) { + deserializedIdentitySource.alias = reader.getString(); + } else if ("domain".equals(fieldName)) { + deserializedIdentitySource.domain = reader.getString(); + } else if ("baseUserDN".equals(fieldName)) { + deserializedIdentitySource.baseUserDN = reader.getString(); + } else if ("baseGroupDN".equals(fieldName)) { + deserializedIdentitySource.baseGroupDN = reader.getString(); + } else if ("primaryServer".equals(fieldName)) { + deserializedIdentitySource.primaryServer = reader.getString(); + } else if ("secondaryServer".equals(fieldName)) { + deserializedIdentitySource.secondaryServer = reader.getString(); + } else if ("ssl".equals(fieldName)) { + deserializedIdentitySource.ssl = SslEnum.fromString(reader.getString()); + } else if ("username".equals(fieldName)) { + deserializedIdentitySource.username = reader.getString(); + } else if ("password".equals(fieldName)) { + deserializedIdentitySource.password = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentitySource; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java index df34a0cd73a72..738d033591a74 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public InternetEnum() { * @param name a name to look for. * @return the corresponding InternetEnum. */ - @JsonCreator public static InternetEnum fromString(String name) { return fromString(name, InternetEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java index c755bc5e5bc94..373c75411ac23 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -62,7 +61,6 @@ public IscsiPathProvisioningState() { * @param name a name to look for. * @return the corresponding IscsiPathProvisioningState. */ - @JsonCreator public static IscsiPathProvisioningState fromString(String name) { return fromString(name, IscsiPathProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java index 34b4587325b66..b0e7333231590 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java @@ -5,42 +5,41 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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 properties of a management cluster. */ @Fluent -public final class ManagementCluster { +public final class ManagementCluster implements JsonSerializable { /* * The cluster size */ - @JsonProperty(value = "clusterSize") private Integer clusterSize; /* * The state of the cluster provisioning */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ClusterProvisioningState provisioningState; /* * The identity */ - @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) private Integer clusterId; /* * The hosts */ - @JsonProperty(value = "hosts") private List hosts; /* * Name of the vsan datastore associated with the cluster */ - @JsonProperty(value = "vsanDatastoreName") private String vsanDatastoreName; /** @@ -134,4 +133,52 @@ public ManagementCluster withVsanDatastoreName(String vsanDatastoreName) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("clusterSize", this.clusterSize); + jsonWriter.writeArrayField("hosts", this.hosts, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("vsanDatastoreName", this.vsanDatastoreName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagementCluster from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagementCluster 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 ManagementCluster. + */ + public static ManagementCluster fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagementCluster deserializedManagementCluster = new ManagementCluster(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterSize".equals(fieldName)) { + deserializedManagementCluster.clusterSize = reader.getNullable(JsonReader::getInt); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagementCluster.provisioningState + = ClusterProvisioningState.fromString(reader.getString()); + } else if ("clusterId".equals(fieldName)) { + deserializedManagementCluster.clusterId = reader.getNullable(JsonReader::getInt); + } else if ("hosts".equals(fieldName)) { + List hosts = reader.readArray(reader1 -> reader1.getString()); + deserializedManagementCluster.hosts = hosts; + } else if ("vsanDatastoreName".equals(fieldName)) { + deserializedManagementCluster.vsanDatastoreName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagementCluster; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java index 89ab687292529..7f2adc3ba5e7a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public MountOptionEnum() { * @param name a name to look for. * @return the corresponding MountOptionEnum. */ - @JsonCreator public static MountOptionEnum fromString(String name) { return fromString(name, MountOptionEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java index 51f489f0aacfa..7565084f53054 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java @@ -6,17 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * An Azure NetApp Files volume from Microsoft.NetApp provider. */ @Fluent -public final class NetAppVolume { +public final class NetAppVolume implements JsonSerializable { /* * Azure resource ID of the NetApp volume */ - @JsonProperty(value = "id", required = true) private String id; /** @@ -58,4 +61,41 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(NetAppVolume.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetAppVolume from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetAppVolume 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 NetAppVolume. + */ + public static NetAppVolume fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetAppVolume deserializedNetAppVolume = new NetAppVolume(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetAppVolume.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetAppVolume; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java index 9c1c3995db870..dfa9b8bd44fd8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public NsxPublicIpQuotaRaisedEnum() { * @param name a name to look for. * @return the corresponding NsxPublicIpQuotaRaisedEnum. */ - @JsonCreator public static NsxPublicIpQuotaRaisedEnum fromString(String name) { return fromString(name, NsxPublicIpQuotaRaisedEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java index a4e2620537dcd..1a0d463271fbe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java @@ -5,38 +5,38 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Localized display information for and operation. */ @Immutable -public final class OperationDisplay { +public final class OperationDisplay implements JsonSerializable { /* * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or * "Microsoft Compute". */ - @JsonProperty(value = "provider") private String provider; /* * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or * "Job Schedule Collections". */ - @JsonProperty(value = "resource") private String resource; /* * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". */ - @JsonProperty(value = "operation") private String operation; /* * The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ - @JsonProperty(value = "description") private String description; /** @@ -92,4 +92,49 @@ public String description() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", this.provider); + jsonWriter.writeStringField("resource", this.resource); + jsonWriter.writeStringField("operation", this.operation); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDisplay 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 OperationDisplay. + */ + public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDisplay deserializedOperationDisplay = new OperationDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationDisplay.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationDisplay.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationDisplay.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDisplay.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDisplay; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java index ded9e05298b90..3883f7045eef3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public OptionalParamEnum() { * @param name a name to look for. * @return the corresponding OptionalParamEnum. */ - @JsonCreator public static OptionalParamEnum fromString(String name) { return fromString(name, OptionalParamEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java index 3bfb29adc6a86..8cd87356f71fa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -43,7 +42,6 @@ public Origin() { * @param name a name to look for. * @return the corresponding Origin. */ - @JsonCreator public static Origin fromString(String name) { return fromString(name, Origin.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java index dd9ba716c9020..3bed16e484c12 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java @@ -5,39 +5,29 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * a powershell credential object. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = PSCredentialExecutionParameter.class, - visible = true) -@JsonTypeName("Credential") @Fluent public final class PSCredentialExecutionParameter extends ScriptExecutionParameter { /* * script execution parameter type */ - @JsonTypeId - @JsonProperty(value = "type", required = true) private ScriptExecutionParameterType type = ScriptExecutionParameterType.CREDENTIAL; /* * username for login */ - @JsonProperty(value = "username") private String username; /* * password for login */ - @JsonProperty(value = "password") private String password; /** @@ -114,4 +104,52 @@ public PSCredentialExecutionParameter withName(String name) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("password", this.password); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PSCredentialExecutionParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PSCredentialExecutionParameter 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 PSCredentialExecutionParameter. + */ + public static PSCredentialExecutionParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PSCredentialExecutionParameter deserializedPSCredentialExecutionParameter + = new PSCredentialExecutionParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPSCredentialExecutionParameter.withName(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedPSCredentialExecutionParameter.type + = ScriptExecutionParameterType.fromString(reader.getString()); + } else if ("username".equals(fieldName)) { + deserializedPSCredentialExecutionParameter.username = reader.getString(); + } else if ("password".equals(fieldName)) { + deserializedPSCredentialExecutionParameter.password = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPSCredentialExecutionParameter; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java index 8fc49a9279066..44d68e385fb44 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; /** * The PlacementPoliciesUpdateHeaders model. @@ -17,13 +16,11 @@ public final class PlacementPoliciesUpdateHeaders { /* * The Retry-After property. */ - @JsonProperty(value = "Retry-After") private Integer retryAfter; /* * The Location property. */ - @JsonProperty(value = "Location") private String location; // HttpHeaders containing the raw property values. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java index 611556f5be65d..f932a1ea692ac 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java @@ -5,49 +5,35 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Abstract placement policy properties. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = PlacementPolicyProperties.class, - visible = true) -@JsonTypeName("PlacementPolicyProperties") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "VmVm", value = VmPlacementPolicyProperties.class), - @JsonSubTypes.Type(name = "VmHost", value = VmHostPlacementPolicyProperties.class) }) @Fluent -public class PlacementPolicyProperties { +public class PlacementPolicyProperties implements JsonSerializable { /* * Placement Policy type */ - @JsonTypeId - @JsonProperty(value = "type", required = true) private PlacementPolicyType type = PlacementPolicyType.fromString("PlacementPolicyProperties"); /* * Whether the placement policy is enabled or disabled */ - @JsonProperty(value = "state") private PlacementPolicyState state; /* * Display name of the placement policy */ - @JsonProperty(value = "displayName") private String displayName; /* * The provisioning state */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PlacementPolicyProvisioningState provisioningState; /** @@ -114,6 +100,17 @@ public PlacementPolicyProvisioningState provisioningState() { return this.provisioningState; } + /** + * Set the provisioningState property: The provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the PlacementPolicyProperties object itself. + */ + PlacementPolicyProperties withProvisioningState(PlacementPolicyProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + /** * Validates the instance. * @@ -121,4 +118,76 @@ public PlacementPolicyProvisioningState provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + jsonWriter.writeStringField("displayName", this.displayName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlacementPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlacementPolicyProperties 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 PlacementPolicyProperties. + */ + public static PlacementPolicyProperties 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 ("type".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("VmVm".equals(discriminatorValue)) { + return VmPlacementPolicyProperties.fromJson(readerToUse.reset()); + } else if ("VmHost".equals(discriminatorValue)) { + return VmHostPlacementPolicyProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static PlacementPolicyProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlacementPolicyProperties deserializedPlacementPolicyProperties = new PlacementPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedPlacementPolicyProperties.type = PlacementPolicyType.fromString(reader.getString()); + } else if ("state".equals(fieldName)) { + deserializedPlacementPolicyProperties.state = PlacementPolicyState.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedPlacementPolicyProperties.displayName = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedPlacementPolicyProperties.provisioningState + = PlacementPolicyProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPlacementPolicyProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java index 2e80e3f0fd327..a209b1ec14689 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public PlacementPolicyProvisioningState() { * @param name a name to look for. * @return the corresponding PlacementPolicyProvisioningState. */ - @JsonCreator public static PlacementPolicyProvisioningState fromString(String name) { return fromString(name, PlacementPolicyProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java index 46550ba88cd77..0b37d391d7ad8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public PlacementPolicyState() { * @param name a name to look for. * @return the corresponding PlacementPolicyState. */ - @JsonCreator public static PlacementPolicyState fromString(String name) { return fromString(name, PlacementPolicyState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java index 3824816537e2d..6ea8a21eeb354 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public PlacementPolicyType() { * @param name a name to look for. * @return the corresponding PlacementPolicyType. */ - @JsonCreator public static PlacementPolicyType fromString(String name) { return fromString(name, PlacementPolicyType.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java index 95783b89ab2b4..bc1dbaf142f96 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java @@ -5,19 +5,22 @@ 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 com.azure.resourcemanager.avs.fluent.models.PlacementPolicyUpdateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * An update of a DRS placement policy resource. */ @Fluent -public final class PlacementPolicyUpdate { +public final class PlacementPolicyUpdate implements JsonSerializable { /* * The properties of a placement policy resource that may be updated */ - @JsonProperty(value = "properties") private PlacementPolicyUpdateProperties innerProperties; /** @@ -160,4 +163,41 @@ public void validate() { 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 PlacementPolicyUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlacementPolicyUpdate 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 PlacementPolicyUpdate. + */ + public static PlacementPolicyUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlacementPolicyUpdate deserializedPlacementPolicyUpdate = new PlacementPolicyUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedPlacementPolicyUpdate.innerProperties + = PlacementPolicyUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPlacementPolicyUpdate; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java index 74e70df15abdb..4dbca91f1cbd4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public PortMirroringDirectionEnum() { * @param name a name to look for. * @return the corresponding PortMirroringDirectionEnum. */ - @JsonCreator public static PortMirroringDirectionEnum fromString(String name) { return fromString(name, PortMirroringDirectionEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java index 6d4b5a6c95639..6c1944c485115 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public PortMirroringStatusEnum() { * @param name a name to look for. * @return the corresponding PortMirroringStatusEnum. */ - @JsonCreator public static PortMirroringStatusEnum fromString(String name) { return fromString(name, PortMirroringStatusEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java index f962c2e312c0a..3e91d9d5b693e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java @@ -6,29 +6,32 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +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 the service-assigned identity associated with this resource. + * Managed service identity (either system assigned, or none). */ @Fluent -public final class PrivateCloudIdentity { +public final class PrivateCloudIdentity implements JsonSerializable { /* - * The Active Directory tenant id of the principal. + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; + private String principalId; /* - * The active directory identifier of this principal. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; + private String tenantId; /* * The type of managed identity assigned to this resource. */ - @JsonProperty(value = "type", required = true) private ResourceIdentityType type; /** @@ -38,21 +41,23 @@ public PrivateCloudIdentity() { } /** - * Get the tenantId property: The Active Directory tenant id of the principal. + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. * - * @return the tenantId value. + * @return the principalId value. */ - public String tenantId() { - return this.tenantId; + public String principalId() { + return this.principalId; } /** - * Get the principalId property: The active directory identifier of this principal. + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. * - * @return the principalId value. + * @return the tenantId value. */ - public String principalId() { - return this.principalId; + public String tenantId() { + return this.tenantId; } /** @@ -88,4 +93,45 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudIdentity.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateCloudIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateCloudIdentity 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 PrivateCloudIdentity. + */ + public static PrivateCloudIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateCloudIdentity deserializedPrivateCloudIdentity = new PrivateCloudIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedPrivateCloudIdentity.type = ResourceIdentityType.fromString(reader.getString()); + } else if ("principalId".equals(fieldName)) { + deserializedPrivateCloudIdentity.principalId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedPrivateCloudIdentity.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateCloudIdentity; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java index 635678a88a456..a31f618c1a671 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -67,7 +66,6 @@ public PrivateCloudProvisioningState() { * @param name a name to look for. * @return the corresponding PrivateCloudProvisioningState. */ - @JsonCreator public static PrivateCloudProvisioningState fromString(String name) { return fromString(name, PrivateCloudProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java index 1e1c98da50c50..7c9642789be90 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java @@ -5,9 +5,12 @@ 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 com.azure.resourcemanager.avs.fluent.models.PrivateCloudUpdateProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -15,30 +18,25 @@ * An update to a private cloud resource. */ @Fluent -public final class PrivateCloudUpdate { +public final class PrivateCloudUpdate implements JsonSerializable { /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * The SKU (Stock Keeping Unit) assigned to this resource. */ - @JsonProperty(value = "sku") private Sku sku; /* * The managed service identities assigned to this resource. */ - @JsonProperty(value = "identity") private PrivateCloudIdentity identity; /* * The updatable properties of a private cloud resource */ - @JsonProperty(value = "properties") private PrivateCloudUpdateProperties innerProperties; /** @@ -301,4 +299,50 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateCloudUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateCloudUpdate 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 PrivateCloudUpdate. + */ + public static PrivateCloudUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateCloudUpdate deserializedPrivateCloudUpdate = new PrivateCloudUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPrivateCloudUpdate.tags = tags; + } else if ("sku".equals(fieldName)) { + deserializedPrivateCloudUpdate.sku = Sku.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedPrivateCloudUpdate.identity = PrivateCloudIdentity.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedPrivateCloudUpdate.innerProperties = PrivateCloudUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateCloudUpdate; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateHeaders.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateHeaders.java index 2313280930011..d9da780e3dc70 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateHeaders.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateHeaders.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; -import com.fasterxml.jackson.annotation.JsonProperty; /** * The PrivateCloudsUpdateHeaders model. @@ -17,13 +16,11 @@ public final class PrivateCloudsUpdateHeaders { /* * The Retry-After property. */ - @JsonProperty(value = "Retry-After") private Integer retryAfter; /* * The Location property. */ - @JsonProperty(value = "Location") private String location; // HttpHeaders containing the raw property values. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java index ac8bba4127a79..168d0eed1f086 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public QuotaEnabled() { * @param name a name to look for. * @return the corresponding QuotaEnabled. */ - @JsonCreator public static QuotaEnabled fromString(String name) { return fromString(name, QuotaEnabled.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java index 6aa4d8bd8a4a7..901a9b78ed3be 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java @@ -5,11 +5,10 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** - * The kind of managemed identity assigned to this resource. + * Type of managed service identity (either system assigned, or none). */ public final class ResourceIdentityType extends ExpandableStringEnum { /** @@ -37,7 +36,6 @@ public ResourceIdentityType() { * @param name a name to look for. * @return the corresponding ResourceIdentityType. */ - @JsonCreator public static ResourceIdentityType fromString(String name) { return fromString(name, ResourceIdentityType.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java index e797ddec8bb8b..ac9d8473d4b46 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ScriptCmdletAudience() { * @param name a name to look for. * @return the corresponding ScriptCmdletAudience. */ - @JsonCreator public static ScriptCmdletAudience fromString(String name) { return fromString(name, ScriptCmdletAudience.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java index 03ba6c931165c..dc17da2760d1f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public ScriptCmdletProvisioningState() { * @param name a name to look for. * @return the corresponding ScriptCmdletProvisioningState. */ - @JsonCreator public static ScriptCmdletProvisioningState fromString(String name) { return fromString(name, ScriptCmdletProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java index f664ed6d8c223..2767375ab4876 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java @@ -6,38 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +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 arguments passed in to the execution. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = ScriptExecutionParameter.class, - visible = true) -@JsonTypeName("ScriptExecutionParameter") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "SecureValue", value = ScriptSecureStringExecutionParameter.class), - @JsonSubTypes.Type(name = "Value", value = ScriptStringExecutionParameter.class), - @JsonSubTypes.Type(name = "Credential", value = PSCredentialExecutionParameter.class) }) @Fluent -public class ScriptExecutionParameter { +public class ScriptExecutionParameter implements JsonSerializable { /* * script execution parameter type */ - @JsonTypeId - @JsonProperty(value = "type", required = true) private ScriptExecutionParameterType type = ScriptExecutionParameterType.fromString("ScriptExecutionParameter"); /* * The parameter name */ - @JsonProperty(value = "name", required = true) private String name; /** @@ -88,4 +75,74 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionParameter.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptExecutionParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptExecutionParameter 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 ScriptExecutionParameter. + */ + public static ScriptExecutionParameter 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 ("type".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("SecureValue".equals(discriminatorValue)) { + return ScriptSecureStringExecutionParameter.fromJson(readerToUse.reset()); + } else if ("Value".equals(discriminatorValue)) { + return ScriptStringExecutionParameter.fromJson(readerToUse.reset()); + } else if ("Credential".equals(discriminatorValue)) { + return PSCredentialExecutionParameter.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static ScriptExecutionParameter fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptExecutionParameter deserializedScriptExecutionParameter = new ScriptExecutionParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedScriptExecutionParameter.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScriptExecutionParameter.type + = ScriptExecutionParameterType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptExecutionParameter; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java index e1d03da8e94ef..73e9dbf342a40 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public ScriptExecutionParameterType() { * @param name a name to look for. * @return the corresponding ScriptExecutionParameterType. */ - @JsonCreator public static ScriptExecutionParameterType fromString(String name) { return fromString(name, ScriptExecutionParameterType.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java index 350de3278c1e4..fdba11f21f352 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -67,7 +66,6 @@ public ScriptExecutionProvisioningState() { * @param name a name to look for. * @return the corresponding ScriptExecutionProvisioningState. */ - @JsonCreator public static ScriptExecutionProvisioningState fromString(String name) { return fromString(name, ScriptExecutionProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java index e8952d495b155..4407420e71ae2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public ScriptOutputStreamType() { * @param name a name to look for. * @return the corresponding ScriptOutputStreamType. */ - @JsonCreator public static ScriptOutputStreamType fromString(String name) { return fromString(name, ScriptOutputStreamType.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java index 86a3f0efaca05..adf53658781f2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public ScriptPackageProvisioningState() { * @param name a name to look for. * @return the corresponding ScriptPackageProvisioningState. */ - @JsonCreator public static ScriptPackageProvisioningState fromString(String name) { return fromString(name, ScriptPackageProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java index 4e516d22e7a7e..cce96969e8c80 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java @@ -5,43 +5,42 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * An parameter that the script will accept. */ @Immutable -public final class ScriptParameter { +public final class ScriptParameter implements JsonSerializable { /* * The type of parameter the script is expecting. psCredential is a * PSCredentialObject */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private ScriptParameterTypes type; /* * The parameter name that the script will expect a parameter value for */ - @JsonProperty(value = "name") private String name; /* * User friendly description of the parameter */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; /* * Should this parameter be visible to arm and passed in the parameters argument * when executing */ - @JsonProperty(value = "visibility", access = JsonProperty.Access.WRITE_ONLY) private VisibilityParameterEnum visibility; /* * Is this parameter required or optional */ - @JsonProperty(value = "optional", access = JsonProperty.Access.WRITE_ONLY) private OptionalParamEnum optional; /** @@ -104,4 +103,48 @@ public OptionalParamEnum optional() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptParameter 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 ScriptParameter. + */ + public static ScriptParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptParameter deserializedScriptParameter = new ScriptParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedScriptParameter.type = ScriptParameterTypes.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedScriptParameter.name = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedScriptParameter.description = reader.getString(); + } else if ("visibility".equals(fieldName)) { + deserializedScriptParameter.visibility = VisibilityParameterEnum.fromString(reader.getString()); + } else if ("optional".equals(fieldName)) { + deserializedScriptParameter.optional = OptionalParamEnum.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptParameter; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java index bf2593b5ff872..76280b7a49fad 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public ScriptParameterTypes() { * @param name a name to look for. * @return the corresponding ScriptParameterTypes. */ - @JsonCreator public static ScriptParameterTypes fromString(String name) { return fromString(name, ScriptParameterTypes.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java index eca966e7f3681..463da8ee5d634 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * a plain text value execution parameter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = ScriptSecureStringExecutionParameter.class, - visible = true) -@JsonTypeName("SecureValue") @Fluent public final class ScriptSecureStringExecutionParameter extends ScriptExecutionParameter { /* * script execution parameter type */ - @JsonTypeId - @JsonProperty(value = "type", required = true) private ScriptExecutionParameterType type = ScriptExecutionParameterType.SECURE_VALUE; /* * A secure value for the passed parameter, not to be stored in logs */ - @JsonProperty(value = "secureValue") private String secureValue; /** @@ -88,4 +79,49 @@ public ScriptSecureStringExecutionParameter withName(String name) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("secureValue", this.secureValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptSecureStringExecutionParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptSecureStringExecutionParameter 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 ScriptSecureStringExecutionParameter. + */ + public static ScriptSecureStringExecutionParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptSecureStringExecutionParameter deserializedScriptSecureStringExecutionParameter + = new ScriptSecureStringExecutionParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedScriptSecureStringExecutionParameter.withName(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedScriptSecureStringExecutionParameter.type + = ScriptExecutionParameterType.fromString(reader.getString()); + } else if ("secureValue".equals(fieldName)) { + deserializedScriptSecureStringExecutionParameter.secureValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptSecureStringExecutionParameter; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java index f9e1c3ae9b9d6..d960180ba1c52 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java @@ -5,33 +5,24 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * a plain text value execution parameter. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = ScriptStringExecutionParameter.class, - visible = true) -@JsonTypeName("Value") @Fluent public final class ScriptStringExecutionParameter extends ScriptExecutionParameter { /* * script execution parameter type */ - @JsonTypeId - @JsonProperty(value = "type", required = true) private ScriptExecutionParameterType type = ScriptExecutionParameterType.VALUE; /* * The value for the passed parameter */ - @JsonProperty(value = "value") private String value; /** @@ -88,4 +79,49 @@ public ScriptStringExecutionParameter withName(String name) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptStringExecutionParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptStringExecutionParameter 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 ScriptStringExecutionParameter. + */ + public static ScriptStringExecutionParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptStringExecutionParameter deserializedScriptStringExecutionParameter + = new ScriptStringExecutionParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedScriptStringExecutionParameter.withName(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedScriptStringExecutionParameter.type + = ScriptExecutionParameterType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedScriptStringExecutionParameter.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptStringExecutionParameter; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java index 6e4e5259f6c2b..6bac7ce67eb3b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public SegmentStatusEnum() { * @param name a name to look for. * @return the corresponding SegmentStatusEnum. */ - @JsonCreator public static SegmentStatusEnum fromString(String name) { return fromString(name, SegmentStatusEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java index 807e32ff1d2ed..f06fe022b8736 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java @@ -6,44 +6,43 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +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 SKU (Stock Keeping Unit) assigned to this resource. + * The resource model definition representing SKU. */ @Fluent -public final class Sku { +public final class Sku implements JsonSerializable { /* - * The name of the SKU, usually a combination of letters and numbers, for example, 'P3' + * The name of the SKU. Ex - P3. It is typically a letter+number code */ - @JsonProperty(value = "name", required = true) private String name; /* * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is * not required on a PUT. */ - @JsonProperty(value = "tier") private SkuTier tier; /* * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone * code. */ - @JsonProperty(value = "size") private String size; /* * If the service has different generations of hardware, for the same SKU, then that can be captured here. */ - @JsonProperty(value = "family") private String family; /* * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible * for the resource this may be omitted. */ - @JsonProperty(value = "capacity") private Integer capacity; /** @@ -53,7 +52,7 @@ public Sku() { } /** - * Get the name property: The name of the SKU, usually a combination of letters and numbers, for example, 'P3'. + * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. * * @return the name value. */ @@ -62,7 +61,7 @@ public String name() { } /** - * Set the name property: The name of the SKU, usually a combination of letters and numbers, for example, 'P3'. + * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. * * @param name the name value to set. * @return the Sku object itself. @@ -172,4 +171,53 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(Sku.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeStringField("family", this.family); + jsonWriter.writeNumberField("capacity", this.capacity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Sku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Sku 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 Sku. + */ + public static Sku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Sku deserializedSku = new Sku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedSku.name = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedSku.tier = SkuTier.fromString(reader.getString()); + } else if ("size".equals(fieldName)) { + deserializedSku.size = reader.getString(); + } else if ("family".equals(fieldName)) { + deserializedSku.family = reader.getString(); + } else if ("capacity".equals(fieldName)) { + deserializedSku.capacity = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSku; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java index 7e8a2f6f0a765..4858dbe09df93 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java @@ -4,11 +4,9 @@ package com.azure.resourcemanager.avs.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** - * Available service tiers for the SKU. + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not + * required on a PUT. */ public enum SkuTier { /** @@ -46,7 +44,6 @@ public enum SkuTier { * @param value the serialized value to parse. * @return the parsed SkuTier object, or null if unable to parse. */ - @JsonCreator public static SkuTier fromString(String value) { if (value == null) { return null; @@ -63,7 +60,6 @@ public static SkuTier fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java index 0e31e0dba6ee0..274252d6381e3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public SslEnum() { * @param name a name to look for. * @return the corresponding SslEnum. */ - @JsonCreator public static SslEnum fromString(String name) { return fromString(name, SslEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java index 5a566728dc1f9..3d27e4979bc45 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public TrialStatus() { * @param name a name to look for. * @return the corresponding TrialStatus. */ - @JsonCreator public static TrialStatus fromString(String name) { return fromString(name, TrialStatus.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java index ffb41b271c1f5..2c74336ccfa3f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public VMGroupStatusEnum() { * @param name a name to look for. * @return the corresponding VMGroupStatusEnum. */ - @JsonCreator public static VMGroupStatusEnum fromString(String name) { return fromString(name, VMGroupStatusEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java index 38753b25edc8f..ebb9d42543da0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public VMTypeEnum() { * @param name a name to look for. * @return the corresponding VMTypeEnum. */ - @JsonCreator public static VMTypeEnum fromString(String name) { return fromString(name, VMTypeEnum.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java index d4f60a80c190e..d644f3eb2f13e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public VirtualMachineProvisioningState() { * @param name a name to look for. * @return the corresponding VirtualMachineProvisioningState. */ - @JsonCreator public static VirtualMachineProvisioningState fromString(String name) { return fromString(name, VirtualMachineProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java index 634f511bc6319..705cde62c1b7d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Set VM DRS-driven movement to restricted (enabled) or not (disabled). */ @Fluent -public final class VirtualMachineRestrictMovement { +public final class VirtualMachineRestrictMovement implements JsonSerializable { /* * Whether VM DRS-driven movement is restricted (enabled) or not (disabled) */ - @JsonProperty(value = "restrictMovement") private VirtualMachineRestrictMovementState restrictMovement; /** @@ -51,4 +54,43 @@ public VirtualMachineRestrictMovement withRestrictMovement(VirtualMachineRestric */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("restrictMovement", + this.restrictMovement == null ? null : this.restrictMovement.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualMachineRestrictMovement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualMachineRestrictMovement 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 VirtualMachineRestrictMovement. + */ + public static VirtualMachineRestrictMovement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualMachineRestrictMovement deserializedVirtualMachineRestrictMovement + = new VirtualMachineRestrictMovement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("restrictMovement".equals(fieldName)) { + deserializedVirtualMachineRestrictMovement.restrictMovement + = VirtualMachineRestrictMovementState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualMachineRestrictMovement; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java index 00b4914e15ada..3e11b6b9ac707 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public VirtualMachineRestrictMovementState() { * @param name a name to look for. * @return the corresponding VirtualMachineRestrictMovementState. */ - @JsonCreator public static VirtualMachineRestrictMovementState fromString(String name) { return fromString(name, VirtualMachineRestrictMovementState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java index ad01a3796b127..7eb8550e7e6ba 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public VisibilityParameterEnum() { * @param name a name to look for. * @return the corresponding VisibilityParameterEnum. */ - @JsonCreator public static VisibilityParameterEnum fromString(String name) { return fromString(name, VisibilityParameterEnum.class); } 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 4940ba479e9d0..f0074a9c0aff8 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 @@ -6,60 +6,52 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * VM-Host placement policy properties. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = VmHostPlacementPolicyProperties.class, - visible = true) -@JsonTypeName("VmHost") @Fluent public final class VmHostPlacementPolicyProperties extends PlacementPolicyProperties { /* * Placement Policy type */ - @JsonTypeId - @JsonProperty(value = "type", required = true) private PlacementPolicyType type = PlacementPolicyType.VM_HOST; /* * Virtual machine members list */ - @JsonProperty(value = "vmMembers", required = true) private List vmMembers; /* * Host members list */ - @JsonProperty(value = "hostMembers", required = true) private List hostMembers; /* * placement policy affinity type */ - @JsonProperty(value = "affinityType", required = true) private AffinityType affinityType; /* * vm-host placement policy affinity strength (should/must) */ - @JsonProperty(value = "affinityStrength") private AffinityStrength affinityStrength; /* * placement policy azure hybrid benefit opt-in type */ - @JsonProperty(value = "azureHybridBenefitType") private AzureHybridBenefitType azureHybridBenefitType; + /* + * The provisioning state + */ + private PlacementPolicyProvisioningState provisioningState; + /** * Creates an instance of VmHostPlacementPolicyProperties class. */ @@ -176,6 +168,16 @@ 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} */ @@ -220,4 +222,75 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(VmHostPlacementPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", state() == null ? null : state().toString()); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeArrayField("vmMembers", this.vmMembers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("hostMembers", this.hostMembers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("affinityType", this.affinityType == null ? null : this.affinityType.toString()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("affinityStrength", + this.affinityStrength == null ? null : this.affinityStrength.toString()); + jsonWriter.writeStringField("azureHybridBenefitType", + this.azureHybridBenefitType == null ? null : this.azureHybridBenefitType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VmHostPlacementPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VmHostPlacementPolicyProperties 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 VmHostPlacementPolicyProperties. + */ + public static VmHostPlacementPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VmHostPlacementPolicyProperties deserializedVmHostPlacementPolicyProperties + = new VmHostPlacementPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedVmHostPlacementPolicyProperties + .withState(PlacementPolicyState.fromString(reader.getString())); + } else if ("displayName".equals(fieldName)) { + deserializedVmHostPlacementPolicyProperties.withDisplayName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedVmHostPlacementPolicyProperties.provisioningState + = PlacementPolicyProvisioningState.fromString(reader.getString()); + } else if ("vmMembers".equals(fieldName)) { + List vmMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedVmHostPlacementPolicyProperties.vmMembers = vmMembers; + } else if ("hostMembers".equals(fieldName)) { + List hostMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedVmHostPlacementPolicyProperties.hostMembers = hostMembers; + } else if ("affinityType".equals(fieldName)) { + deserializedVmHostPlacementPolicyProperties.affinityType + = AffinityType.fromString(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedVmHostPlacementPolicyProperties.type + = PlacementPolicyType.fromString(reader.getString()); + } else if ("affinityStrength".equals(fieldName)) { + deserializedVmHostPlacementPolicyProperties.affinityStrength + = AffinityStrength.fromString(reader.getString()); + } else if ("azureHybridBenefitType".equals(fieldName)) { + deserializedVmHostPlacementPolicyProperties.azureHybridBenefitType + = AzureHybridBenefitType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVmHostPlacementPolicyProperties; + }); + } } 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 5a5f6bdc2da73..f0c46c0c4db1d 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 @@ -6,42 +6,37 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * VM-VM placement policy properties. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "type", - defaultImpl = VmPlacementPolicyProperties.class, - visible = true) -@JsonTypeName("VmVm") @Fluent public final class VmPlacementPolicyProperties extends PlacementPolicyProperties { /* * Placement Policy type */ - @JsonTypeId - @JsonProperty(value = "type", required = true) private PlacementPolicyType type = PlacementPolicyType.VM_VM; /* * Virtual machine members list */ - @JsonProperty(value = "vmMembers", required = true) private List vmMembers; /* * placement policy affinity type */ - @JsonProperty(value = "affinityType", required = true) private AffinityType affinityType; + /* + * The provisioning state + */ + private PlacementPolicyProvisioningState provisioningState; + /** * Creates an instance of VmPlacementPolicyProperties class. */ @@ -98,6 +93,16 @@ 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} */ @@ -137,4 +142,58 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(VmPlacementPolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("state", state() == null ? null : state().toString()); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeArrayField("vmMembers", this.vmMembers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("affinityType", this.affinityType == null ? null : this.affinityType.toString()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VmPlacementPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VmPlacementPolicyProperties 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 VmPlacementPolicyProperties. + */ + public static VmPlacementPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VmPlacementPolicyProperties deserializedVmPlacementPolicyProperties = new VmPlacementPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("state".equals(fieldName)) { + deserializedVmPlacementPolicyProperties + .withState(PlacementPolicyState.fromString(reader.getString())); + } else if ("displayName".equals(fieldName)) { + deserializedVmPlacementPolicyProperties.withDisplayName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedVmPlacementPolicyProperties.provisioningState + = PlacementPolicyProvisioningState.fromString(reader.getString()); + } else if ("vmMembers".equals(fieldName)) { + List vmMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedVmPlacementPolicyProperties.vmMembers = vmMembers; + } else if ("affinityType".equals(fieldName)) { + deserializedVmPlacementPolicyProperties.affinityType = AffinityType.fromString(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedVmPlacementPolicyProperties.type = PlacementPolicyType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVmPlacementPolicyProperties; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java index c24855c3a6c02..adad0ea38981f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java @@ -163,9 +163,9 @@ interface UpdateStages { */ interface WithProperties { /** - * Specifies the properties property: The updatable properties of a DHCP update. + * Specifies the properties property: The resource-specific properties for this resource.. * - * @param properties The updatable properties of a DHCP update. + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ Update withProperties(WorkloadNetworkDhcpEntity properties); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java index 22fb1757745e3..eb71f9e61f714 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java @@ -5,57 +5,42 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +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; /** * Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to * inherit from. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "dhcpType", - defaultImpl = WorkloadNetworkDhcpEntity.class, - visible = true) -@JsonTypeName("WorkloadNetworkDhcpEntity") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "SERVER", value = WorkloadNetworkDhcpServer.class), - @JsonSubTypes.Type(name = "RELAY", value = WorkloadNetworkDhcpRelay.class) }) @Fluent -public class WorkloadNetworkDhcpEntity { +public class WorkloadNetworkDhcpEntity implements JsonSerializable { /* * Type of DHCP: SERVER or RELAY. */ - @JsonTypeId - @JsonProperty(value = "dhcpType", required = true) private DhcpTypeEnum dhcpType = DhcpTypeEnum.fromString("WorkloadNetworkDhcpEntity"); /* * Display name of the DHCP entity. */ - @JsonProperty(value = "displayName") private String displayName; /* * NSX Segments consuming DHCP. */ - @JsonProperty(value = "segments", access = JsonProperty.Access.WRITE_ONLY) private List segments; /* * The provisioning state */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkDhcpProvisioningState provisioningState; /* * NSX revision number. */ - @JsonProperty(value = "revision") private Long revision; /** @@ -102,6 +87,17 @@ public List segments() { return this.segments; } + /** + * Set the segments property: NSX Segments consuming DHCP. + * + * @param segments the segments value to set. + * @return the WorkloadNetworkDhcpEntity object itself. + */ + WorkloadNetworkDhcpEntity withSegments(List segments) { + this.segments = segments; + return this; + } + /** * Get the provisioningState property: The provisioning state. * @@ -111,6 +107,17 @@ public WorkloadNetworkDhcpProvisioningState provisioningState() { return this.provisioningState; } + /** + * Set the provisioningState property: The provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the WorkloadNetworkDhcpEntity object itself. + */ + WorkloadNetworkDhcpEntity withProvisioningState(WorkloadNetworkDhcpProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + /** * Get the revision property: NSX revision number. * @@ -138,4 +145,79 @@ public WorkloadNetworkDhcpEntity withRevision(Long revision) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dhcpType", this.dhcpType == null ? null : this.dhcpType.toString()); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeNumberField("revision", this.revision); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkDhcpEntity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDhcpEntity 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 WorkloadNetworkDhcpEntity. + */ + public static WorkloadNetworkDhcpEntity 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 ("dhcpType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("SERVER".equals(discriminatorValue)) { + return WorkloadNetworkDhcpServer.fromJson(readerToUse.reset()); + } else if ("RELAY".equals(discriminatorValue)) { + return WorkloadNetworkDhcpRelay.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static WorkloadNetworkDhcpEntity fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDhcpEntity deserializedWorkloadNetworkDhcpEntity = new WorkloadNetworkDhcpEntity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dhcpType".equals(fieldName)) { + deserializedWorkloadNetworkDhcpEntity.dhcpType = DhcpTypeEnum.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkDhcpEntity.displayName = reader.getString(); + } else if ("segments".equals(fieldName)) { + List segments = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkloadNetworkDhcpEntity.segments = segments; + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkDhcpEntity.provisioningState + = WorkloadNetworkDhcpProvisioningState.fromString(reader.getString()); + } else if ("revision".equals(fieldName)) { + deserializedWorkloadNetworkDhcpEntity.revision = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDhcpEntity; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java index c7e1621043935..3dfc8c88508fd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -58,7 +57,6 @@ public WorkloadNetworkDhcpProvisioningState() { * @param name a name to look for. * @return the corresponding WorkloadNetworkDhcpProvisioningState. */ - @JsonCreator public static WorkloadNetworkDhcpProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkDhcpProvisioningState.class); } 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 e25017fa7a0f7..455cd083ce9a3 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 @@ -5,36 +5,37 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * NSX DHCP Relay. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "dhcpType", - defaultImpl = WorkloadNetworkDhcpRelay.class, - visible = true) -@JsonTypeName("RELAY") @Fluent public final class WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { /* * Type of DHCP: SERVER or RELAY. */ - @JsonTypeId - @JsonProperty(value = "dhcpType", required = true) private DhcpTypeEnum dhcpType = DhcpTypeEnum.RELAY; /* * DHCP Relay Addresses. Max 3. */ - @JsonProperty(value = "serverAddresses") private List serverAddresses; + /* + * NSX Segments consuming DHCP. + */ + private List segments; + + /* + * The provisioning state + */ + private WorkloadNetworkDhcpProvisioningState provisioningState; + /** * Creates an instance of WorkloadNetworkDhcpRelay class. */ @@ -71,6 +72,26 @@ public WorkloadNetworkDhcpRelay withServerAddresses(List serverAddresses return this; } + /** + * Get the segments property: NSX Segments consuming DHCP. + * + * @return the segments value. + */ + @Override + public List segments() { + return this.segments; + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + @Override + public WorkloadNetworkDhcpProvisioningState provisioningState() { + return this.provisioningState; + } + /** * {@inheritDoc} */ @@ -98,4 +119,57 @@ public WorkloadNetworkDhcpRelay withRevision(Long revision) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeNumberField("revision", revision()); + jsonWriter.writeStringField("dhcpType", this.dhcpType == null ? null : this.dhcpType.toString()); + jsonWriter.writeArrayField("serverAddresses", this.serverAddresses, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkDhcpRelay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDhcpRelay 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 WorkloadNetworkDhcpRelay. + */ + public static WorkloadNetworkDhcpRelay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDhcpRelay deserializedWorkloadNetworkDhcpRelay = new WorkloadNetworkDhcpRelay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkDhcpRelay.withDisplayName(reader.getString()); + } else if ("segments".equals(fieldName)) { + List segments = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkloadNetworkDhcpRelay.segments = segments; + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkDhcpRelay.provisioningState + = WorkloadNetworkDhcpProvisioningState.fromString(reader.getString()); + } else if ("revision".equals(fieldName)) { + deserializedWorkloadNetworkDhcpRelay.withRevision(reader.getNullable(JsonReader::getLong)); + } else if ("dhcpType".equals(fieldName)) { + deserializedWorkloadNetworkDhcpRelay.dhcpType = DhcpTypeEnum.fromString(reader.getString()); + } else if ("serverAddresses".equals(fieldName)) { + List serverAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkloadNetworkDhcpRelay.serverAddresses = serverAddresses; + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDhcpRelay; + }); + } } 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 21563ebe97ea3..f1593985e73a0 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 @@ -5,40 +5,41 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeId; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; /** * NSX DHCP Server. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - property = "dhcpType", - defaultImpl = WorkloadNetworkDhcpServer.class, - visible = true) -@JsonTypeName("SERVER") @Fluent public final class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { /* * Type of DHCP: SERVER or RELAY. */ - @JsonTypeId - @JsonProperty(value = "dhcpType", required = true) private DhcpTypeEnum dhcpType = DhcpTypeEnum.SERVER; /* * DHCP Server Address. */ - @JsonProperty(value = "serverAddress") private String serverAddress; /* * DHCP Server Lease Time. */ - @JsonProperty(value = "leaseTime") - private Integer leaseTime; + private Long leaseTime; + + /* + * NSX Segments consuming DHCP. + */ + private List segments; + + /* + * The provisioning state + */ + private WorkloadNetworkDhcpProvisioningState provisioningState; /** * Creates an instance of WorkloadNetworkDhcpServer class. @@ -81,7 +82,7 @@ public WorkloadNetworkDhcpServer withServerAddress(String serverAddress) { * * @return the leaseTime value. */ - public Integer leaseTime() { + public Long leaseTime() { return this.leaseTime; } @@ -91,11 +92,31 @@ public Integer leaseTime() { * @param leaseTime the leaseTime value to set. * @return the WorkloadNetworkDhcpServer object itself. */ - public WorkloadNetworkDhcpServer withLeaseTime(Integer leaseTime) { + public WorkloadNetworkDhcpServer withLeaseTime(Long leaseTime) { this.leaseTime = leaseTime; return this; } + /** + * Get the segments property: NSX Segments consuming DHCP. + * + * @return the segments value. + */ + @Override + public List segments() { + return this.segments; + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + @Override + public WorkloadNetworkDhcpProvisioningState provisioningState() { + return this.provisioningState; + } + /** * {@inheritDoc} */ @@ -123,4 +144,58 @@ public WorkloadNetworkDhcpServer withRevision(Long revision) { public void validate() { super.validate(); } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeNumberField("revision", revision()); + jsonWriter.writeStringField("dhcpType", this.dhcpType == null ? null : this.dhcpType.toString()); + jsonWriter.writeStringField("serverAddress", this.serverAddress); + jsonWriter.writeNumberField("leaseTime", this.leaseTime); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkDhcpServer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkDhcpServer 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 WorkloadNetworkDhcpServer. + */ + public static WorkloadNetworkDhcpServer fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkDhcpServer deserializedWorkloadNetworkDhcpServer = new WorkloadNetworkDhcpServer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedWorkloadNetworkDhcpServer.withDisplayName(reader.getString()); + } else if ("segments".equals(fieldName)) { + List segments = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkloadNetworkDhcpServer.segments = segments; + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkloadNetworkDhcpServer.provisioningState + = WorkloadNetworkDhcpProvisioningState.fromString(reader.getString()); + } else if ("revision".equals(fieldName)) { + deserializedWorkloadNetworkDhcpServer.withRevision(reader.getNullable(JsonReader::getLong)); + } else if ("dhcpType".equals(fieldName)) { + deserializedWorkloadNetworkDhcpServer.dhcpType = DhcpTypeEnum.fromString(reader.getString()); + } else if ("serverAddress".equals(fieldName)) { + deserializedWorkloadNetworkDhcpServer.serverAddress = reader.getString(); + } else if ("leaseTime".equals(fieldName)) { + deserializedWorkloadNetworkDhcpServer.leaseTime = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkDhcpServer; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java index ea2625c86c83a..aab884016c35c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -58,7 +57,6 @@ public WorkloadNetworkDnsServiceProvisioningState() { * @param name a name to look for. * @return the corresponding WorkloadNetworkDnsServiceProvisioningState. */ - @JsonCreator public static WorkloadNetworkDnsServiceProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkDnsServiceProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java index 842996c790b08..7fc1a1f4f7960 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java @@ -74,7 +74,7 @@ public interface WorkloadNetworkDnsZone { * * @return the dnsServices value. */ - Integer dnsServices(); + Long dnsServices(); /** * Gets the provisioningState property: The provisioning state. @@ -220,7 +220,7 @@ interface WithDnsServices { * @param dnsServices Number of DNS Services using the DNS zone. * @return the next definition stage. */ - WithCreate withDnsServices(Integer dnsServices); + WithCreate withDnsServices(Long dnsServices); } /** @@ -331,7 +331,7 @@ interface WithDnsServices { * @param dnsServices Number of DNS Services using the DNS zone. * @return the next definition stage. */ - Update withDnsServices(Integer dnsServices); + Update withDnsServices(Long dnsServices); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java index 4e85529ce7451..9b52b89012d02 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -58,7 +57,6 @@ public WorkloadNetworkDnsZoneProvisioningState() { * @param name a name to look for. * @return the corresponding WorkloadNetworkDnsZoneProvisioningState. */ - @JsonCreator public static WorkloadNetworkDnsZoneProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkDnsZoneProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java index 170b5439bbfeb..763c52eb94120 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -58,7 +57,6 @@ public WorkloadNetworkPortMirroringProvisioningState() { * @param name a name to look for. * @return the corresponding WorkloadNetworkPortMirroringProvisioningState. */ - @JsonCreator public static WorkloadNetworkPortMirroringProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkPortMirroringProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java index d11d0499eae13..ff21560fd0020 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -57,7 +56,6 @@ public WorkloadNetworkProvisioningState() { * @param name a name to look for. * @return the corresponding WorkloadNetworkProvisioningState. */ - @JsonCreator public static WorkloadNetworkProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java index dcbf8cc99e615..8ada4ce7c9ca0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -58,7 +57,6 @@ public WorkloadNetworkPublicIpProvisioningState() { * @param name a name to look for. * @return the corresponding WorkloadNetworkPublicIpProvisioningState. */ - @JsonCreator public static WorkloadNetworkPublicIpProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkPublicIpProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java index 181068c024a10..32c5a4e85f313 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Ports and any VIF attached to segment. */ @Immutable -public final class WorkloadNetworkSegmentPortVif { +public final class WorkloadNetworkSegmentPortVif implements JsonSerializable { /* * Name of port or VIF attached to segment. */ - @JsonProperty(value = "portName") private String portName; /** @@ -40,4 +43,41 @@ public String portName() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("portName", this.portName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkSegmentPortVif from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkSegmentPortVif 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 WorkloadNetworkSegmentPortVif. + */ + public static WorkloadNetworkSegmentPortVif fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkSegmentPortVif deserializedWorkloadNetworkSegmentPortVif + = new WorkloadNetworkSegmentPortVif(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("portName".equals(fieldName)) { + deserializedWorkloadNetworkSegmentPortVif.portName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkSegmentPortVif; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java index 6dd40c5b95412..dbd7394ed1801 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -58,7 +57,6 @@ public WorkloadNetworkSegmentProvisioningState() { * @param name a name to look for. * @return the corresponding WorkloadNetworkSegmentProvisioningState. */ - @JsonCreator public static WorkloadNetworkSegmentProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkSegmentProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java index 504e11a07b440..a4a5a4234f92f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +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; /** * Subnet configuration for segment. */ @Fluent -public final class WorkloadNetworkSegmentSubnet { +public final class WorkloadNetworkSegmentSubnet implements JsonSerializable { /* * DHCP Range assigned for subnet. */ - @JsonProperty(value = "dhcpRanges") private List dhcpRanges; /* * Gateway address. */ - @JsonProperty(value = "gatewayAddress") private String gatewayAddress; /** @@ -78,4 +80,44 @@ public WorkloadNetworkSegmentSubnet withGatewayAddress(String gatewayAddress) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("dhcpRanges", this.dhcpRanges, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("gatewayAddress", this.gatewayAddress); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkloadNetworkSegmentSubnet from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkloadNetworkSegmentSubnet 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 WorkloadNetworkSegmentSubnet. + */ + public static WorkloadNetworkSegmentSubnet fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkloadNetworkSegmentSubnet deserializedWorkloadNetworkSegmentSubnet = new WorkloadNetworkSegmentSubnet(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dhcpRanges".equals(fieldName)) { + List dhcpRanges = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkloadNetworkSegmentSubnet.dhcpRanges = dhcpRanges; + } else if ("gatewayAddress".equals(fieldName)) { + deserializedWorkloadNetworkSegmentSubnet.gatewayAddress = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkloadNetworkSegmentSubnet; + }); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java index d25f1a2465506..525bda8e12175 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -58,7 +57,6 @@ public WorkloadNetworkVMGroupProvisioningState() { * @param name a name to look for. * @return the corresponding WorkloadNetworkVMGroupProvisioningState. */ - @JsonCreator public static WorkloadNetworkVMGroupProvisioningState fromString(String name) { return fromString(name, WorkloadNetworkVMGroupProvisioningState.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json index 070476c77b397..8878e547a7984 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json @@ -1,926 +1 @@ -[ { - "name" : "com.azure.resourcemanager.avs.fluent.models.AddonInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.CloudLinkInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.CloudLinkProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.DatastoreInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.DatastoreProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.IscsiPathInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.IscsiPathProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.OperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.PlacementPolicyUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.PrivateCloudProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.PrivateCloudUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.QuotaInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptCmdletProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptExecutionProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptPackageProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.TrialInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.VirtualMachineProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.AddonListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.CloudLinkListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.ClusterListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.DatastoreListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.ExpressRouteAuthorizationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.GlobalReachConnectionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.HcxEnterpriseSiteListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.IscsiPathListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.PagedOperation", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.PlacementPolicyListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.PrivateCloudListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.ScriptCmdletListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.ScriptExecutionListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.ScriptPackageListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.VirtualMachineListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServiceListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZoneListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachineListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ActionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AddonArcProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AddonHcxProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AddonProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AddonProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AddonSrmProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AddonType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AddonVrProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AffinityStrength", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AffinityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AvailabilityProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AvailabilityStrategy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.AzureHybridBenefitType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.Circuit", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.CloudLinkProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.CloudLinkStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ClusterProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ClusterUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ClusterZone", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ClustersUpdateHeaders", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.DatastoreProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.DatastoreStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.DhcpTypeEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.DiskPoolVolume", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.DnsServiceStatusEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.DnsZoneType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ElasticSanVolume", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.Encryption", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.EncryptionKeyStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.EncryptionKeyVaultProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.EncryptionState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.EncryptionVersionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.Endpoints", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.GlobalReachConnectionProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.IdentitySource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.InternetEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.IscsiPathProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ManagementCluster", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.MountOptionEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.NetAppVolume", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.OperationDisplay", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.OptionalParamEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.Origin", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PSCredentialExecutionParameter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PlacementPoliciesUpdateHeaders", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PortMirroringStatusEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PrivateCloudIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PrivateCloudUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.PrivateCloudsUpdateHeaders", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.QuotaEnabled", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ResourceIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptCmdletAudience", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionParameter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionParameterType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptOutputStreamType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptPackageProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptParameter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptParameterTypes", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.SegmentStatusEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.Sku", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.SkuTier", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.SslEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.TrialStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.VMGroupStatusEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.VMTypeEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.VisibilityParameterEnum", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.VmPlacementPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpRelay", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[ ] \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java index aa98f4730098c..75ed4e9289012 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java @@ -25,7 +25,7 @@ public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsM .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") .withRevision(1L) .withServerAddress("40.1.5.1/24") - .withLeaseTime(86400)) + .withLeaseTime(86400L)) .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java index c066fa1a11443..9c1db30aa6976 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java @@ -25,7 +25,7 @@ public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsM .getValue(); resource.update() .withProperties( - new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400)) + new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400L)) .apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java index 9497c42457e17..fc9ad39c0d99a 100644 --- 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 @@ -12,15 +12,15 @@ public final class AddonArcPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonArcProperties model - = BinaryData.fromString("{\"addonType\":\"Arc\",\"vCenter\":\"hc\",\"provisioningState\":\"Succeeded\"}") + = BinaryData.fromString("{\"addonType\":\"Arc\",\"vCenter\":\"sz\",\"provisioningState\":\"Succeeded\"}") .toObject(AddonArcProperties.class); - Assertions.assertEquals("hc", model.vCenter()); + Assertions.assertEquals("sz", model.vCenter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonArcProperties model = new AddonArcProperties().withVCenter("hc"); + AddonArcProperties model = new AddonArcProperties().withVCenter("sz"); model = BinaryData.fromObject(model).toObject(AddonArcProperties.class); - Assertions.assertEquals("hc", model.vCenter()); + Assertions.assertEquals("sz", 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 index 879e691d9474d..9dab1f86e4f5c 100644 --- 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 @@ -11,16 +11,16 @@ public final class AddonHcxPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AddonHcxProperties model = BinaryData - .fromString("{\"addonType\":\"HCX\",\"offer\":\"cslfaoqzpiyylha\",\"provisioningState\":\"Deleting\"}") - .toObject(AddonHcxProperties.class); - Assertions.assertEquals("cslfaoqzpiyylha", model.offer()); + AddonHcxProperties model + = BinaryData.fromString("{\"addonType\":\"HCX\",\"offer\":\"jervtia\",\"provisioningState\":\"Failed\"}") + .toObject(AddonHcxProperties.class); + Assertions.assertEquals("jervtia", model.offer()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonHcxProperties model = new AddonHcxProperties().withOffer("cslfaoqzpiyylha"); + AddonHcxProperties model = new AddonHcxProperties().withOffer("jervtia"); model = BinaryData.fromObject(model).toObject(AddonHcxProperties.class); - Assertions.assertEquals("cslfaoqzpiyylha", model.offer()); + Assertions.assertEquals("jervtia", 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 index 4dbab9ad3b4a5..e01043bc81917 100644 --- 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 @@ -12,7 +12,7 @@ public final class AddonInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonInner model = BinaryData.fromString( - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"uzkopbminrfd\",\"name\":\"oyuhhziui\",\"type\":\"fozbhdmsmlmzqhof\"}") + "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"rodtjinfwjlfl\",\"name\":\"kacjvefkdlfo\",\"type\":\"kggkfpa\"}") .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 new file mode 100644 index 0000000000000..532901e961325 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.AddonList; +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\":\"Cancelled\"},\"id\":\"kqb\",\"name\":\"qu\",\"type\":\"paxh\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"ivpdtiir\",\"name\":\"tdqoaxoruzfgsq\",\"type\":\"yfxrx\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"ramxjezwlwnw\",\"name\":\"uqlcvydy\",\"type\":\"atdooaojkniod\"}],\"nextLink\":\"oebwnujhemms\"}") + .toObject(AddonList.class); + Assertions.assertEquals("oebwnujhemms", 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 index 172c78e240991..984df8afb9dad 100644 --- 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 @@ -11,7 +11,7 @@ public final class AddonPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonProperties model - = BinaryData.fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"}") + = BinaryData.fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"}") .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 index a3549db1c1053..a83ae07bf20bf 100644 --- 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 @@ -12,15 +12,15 @@ public final class AddonVrPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonVrProperties model - = BinaryData.fromString("{\"addonType\":\"VR\",\"vrsCount\":674060065,\"provisioningState\":\"Failed\"}") + = BinaryData.fromString("{\"addonType\":\"VR\",\"vrsCount\":1554130145,\"provisioningState\":\"Deleting\"}") .toObject(AddonVrProperties.class); - Assertions.assertEquals(674060065, model.vrsCount()); + Assertions.assertEquals(1554130145, model.vrsCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonVrProperties model = new AddonVrProperties().withVrsCount(674060065); + AddonVrProperties model = new AddonVrProperties().withVrsCount(1554130145); model = BinaryData.fromObject(model).toObject(AddonVrProperties.class); - Assertions.assertEquals(674060065, model.vrsCount()); + Assertions.assertEquals(1554130145, 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 index 30e896bfdad4c..0bc0db4065a9a 100644 --- 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 @@ -21,7 +21,7 @@ public final class AddonsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"wndyqleallk\",\"name\":\"mtkhlowkxxpvbr\",\"type\":\"fjmzsyzfho\"}"; + = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"vxwlmzqwmvtxnj\",\"name\":\"xmcuqud\",\"type\":\"cvclxynpdk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Addon response = manager.addons() - .define("v") - .withExistingPrivateCloud("kjxnqpvwgfstmhq", "kizmdksaoafclu") + .define("mmkjsvthnwpztek") + .withExistingPrivateCloud("vsg", "wohqfzizvu") .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 index 2107b3d94c794..824800df7ad01 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.addons().delete("abeolhbhlvbm", "uqibsxtkcu", "fbsfarfsiow", com.azure.core.util.Context.NONE); + manager.addons().delete("gvriibakclac", "fr", "xousxauzl", 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 index f2c2901c66eb1..5543bcc2d8e52 100644 --- 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 @@ -20,7 +20,7 @@ public final class AddonsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"nlbqnbldxeaclg\",\"name\":\"chorimkrsr\",\"type\":\"moucsofldpuviyfc\"}"; + = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"lxxhljfp\",\"name\":\"picrmnzhrgmqgjsx\",\"type\":\"pqcbfrmbodthsq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Addon response = manager.addons() - .getWithResponse("gahxkumasjcaa", "fdmmcpug", "ehqepvufhbzehe", com.azure.core.util.Context.NONE) + .getWithResponse("qpswokmvkhlggdhb", "mzqkz", "zu", 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 index 1a56591d46cf9..896c927799892 100644 --- 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 @@ -21,7 +21,7 @@ public final class AddonsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"fsv\",\"name\":\"pavbo\",\"type\":\"fppdbwnu\"}]}"; + = "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"haowj\",\"name\":\"mzvupor\",\"type\":\"zdfuydzvkfvxcnqm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.addons().list("aimmoiroqb", "shbraga", com.azure.core.util.Context.NONE); + = manager.addons().list("knidib", "qjxgpnrhgovfgp", 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 index 591e593ef5b2a..b87cca7611437 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.authorizations().delete("n", "ypuuwwltvuqjctze", "keifzzhmkdasv", com.azure.core.util.Context.NONE); + manager.authorizations().delete("jrajcivm", "ghfcfiwrxgkneuvy", "nzqodfvpg", com.azure.core.util.Context.NONE); } } 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 index b33dc2c525323..db8cd6890a4e4 100644 --- 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 @@ -12,15 +12,15 @@ public final class CloudLinkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Building\",\"linkedCloud\":\"dwbwhkszzcmrvexz\"},\"id\":\"bt\",\"name\":\"gsfraoyzkoow\",\"type\":\"lmnguxaw\"}") + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Deleting\",\"linkedCloud\":\"vayffimrzrt\"},\"id\":\"qogsexnevfd\",\"name\":\"wnwmewzs\",\"type\":\"yceuzsoib\"}") .toObject(CloudLinkInner.class); - Assertions.assertEquals("dwbwhkszzcmrvexz", model.linkedCloud()); + Assertions.assertEquals("vayffimrzrt", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkInner model = new CloudLinkInner().withLinkedCloud("dwbwhkszzcmrvexz"); + CloudLinkInner model = new CloudLinkInner().withLinkedCloud("vayffimrzrt"); model = BinaryData.fromObject(model).toObject(CloudLinkInner.class); - Assertions.assertEquals("dwbwhkszzcmrvexz", model.linkedCloud()); + Assertions.assertEquals("vayffimrzrt", 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 new file mode 100644 index 0000000000000..959612d1c009c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.CloudLinkList; +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\":\"Succeeded\",\"status\":\"Failed\",\"linkedCloud\":\"tcs\"},\"id\":\"cktqumiekkezzi\",\"name\":\"hlyfjhdgqgg\",\"type\":\"bdunygaeqid\"},{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Disconnected\",\"linkedCloud\":\"llrxcyjmoad\"},\"id\":\"varmywdmj\",\"name\":\"jqbjhhy\",\"type\":\"xrwlyc\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Disconnected\",\"linkedCloud\":\"kgymareqnajxqug\"},\"id\":\"ky\",\"name\":\"ubeddg\",\"type\":\"sofwqmzqalkrmnji\"}],\"nextLink\":\"xacqqudfnbyx\"}") + .toObject(CloudLinkList.class); + Assertions.assertEquals("tcs", model.value().get(0).linkedCloud()); + Assertions.assertEquals("xacqqudfnbyx", 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 index 7e687c91b28b9..b4f81c7d08f86 100644 --- 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 @@ -12,15 +12,15 @@ public final class CloudLinkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkProperties model = BinaryData - .fromString("{\"provisioningState\":\"Succeeded\",\"status\":\"Deleting\",\"linkedCloud\":\"uuximerq\"}") + .fromString("{\"provisioningState\":\"Succeeded\",\"status\":\"Disconnected\",\"linkedCloud\":\"xtrthz\"}") .toObject(CloudLinkProperties.class); - Assertions.assertEquals("uuximerq", model.linkedCloud()); + Assertions.assertEquals("xtrthz", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("uuximerq"); + CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("xtrthz"); model = BinaryData.fromObject(model).toObject(CloudLinkProperties.class); - Assertions.assertEquals("uuximerq", model.linkedCloud()); + Assertions.assertEquals("xtrthz", 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 index e6d8f6b8da1fe..c0509fc703856 100644 --- 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 @@ -21,7 +21,7 @@ public final class CloudLinksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Building\",\"linkedCloud\":\"gbdvibidmhmwff\"},\"id\":\"fmuvapckccr\",\"name\":\"vwe\",\"type\":\"oxoyyukp\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Deleting\",\"linkedCloud\":\"lxpaglqivbgkcv\"},\"id\":\"pzvuqdflvo\",\"name\":\"iypfp\",\"type\":\"bcpzgpxtivh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); CloudLink response = manager.cloudLinks() - .define("pmkmlmvevfx") - .withExistingPrivateCloud("bcrymodizrx", "lobdxna") - .withLinkedCloud("xliohrdddt") + .define("ygjbmzyospspsh") + .withExistingPrivateCloud("quhuxylrj", "m") + .withLinkedCloud("mspbpssdfpp") .create(); - Assertions.assertEquals("gbdvibidmhmwff", response.linkedCloud()); + Assertions.assertEquals("lxpaglqivbgkcv", 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 index 1b85b4dd85385..c1ecea551f33a 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.cloudLinks().delete("ytprwnwvroev", "tlyo", "rrrouuxvnsa", com.azure.core.util.Context.NONE); + manager.cloudLinks().delete("amowaziynknlqwzd", "piwhxqs", "dtmaa", 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 index 925e511b03a47..1a1436d00064d 100644 --- 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 @@ -21,7 +21,7 @@ public final class CloudLinksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Active\",\"linkedCloud\":\"mxxdtddmflh\"},\"id\":\"tx\",\"name\":\"vtzn\",\"type\":\"pxbannovvoxc\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Deleting\",\"linkedCloud\":\"t\"},\"id\":\"auunfprnjletlx\",\"name\":\"mr\",\"type\":\"ddoui\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); CloudLink response = manager.cloudLinks() - .getWithResponse("inqcymczngnbdxxe", "unin", "udbchaqdtv", com.azure.core.util.Context.NONE) + .getWithResponse("quvre", "mrnjh", "sujz", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mxxdtddmflh", response.linkedCloud()); + Assertions.assertEquals("t", 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 index 2b8d8bc8b82e2..1eabf866c6314 100644 --- 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 @@ -22,7 +22,7 @@ public final class CloudLinksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Disconnected\",\"linkedCloud\":\"nlvhhtklnvnafvv\"},\"id\":\"f\",\"name\":\"devjb\",\"type\":\"slcqxypokkh\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Failed\",\"linkedCloud\":\"pxbiygnugjknfs\"},\"id\":\"cttuxuu\",\"name\":\"i\",\"type\":\"flqo\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.cloudLinks().list("rljyoogwxhnsdu", "gwbsreurf", com.azure.core.util.Context.NONE); + = manager.cloudLinks().list("rgxffmshkw", "bkgozxwopdbydpi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("nlvhhtklnvnafvv", response.iterator().next().linkedCloud()); + Assertions.assertEquals("pxbiygnugjknfs", response.iterator().next().linkedCloud()); } } 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 new file mode 100644 index 0000000000000..f4a823f4ffa13 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.ClusterList; +import com.azure.resourcemanager.avs.models.SkuTier; +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\":1323879070,\"provisioningState\":\"Deleting\",\"clusterId\":1853852705,\"hosts\":[\"hhbcsglummajtjao\",\"xobnbdxkqpxok\"],\"vsanDatastoreName\":\"ionpimexg\"},\"sku\":{\"name\":\"txgcpodgmaajr\",\"tier\":\"Basic\",\"size\":\"wzrlovmclwhij\",\"family\":\"ejctbzaqsqsycb\",\"capacity\":1508721218},\"id\":\"gukdkexxppo\",\"name\":\"mxaxc\",\"type\":\"jpgd\"},{\"properties\":{\"clusterSize\":263932996,\"provisioningState\":\"Cancelled\",\"clusterId\":1680873734,\"hosts\":[\"mouexhdzx\",\"bqe\",\"jnxqbzvddntwn\"],\"vsanDatastoreName\":\"icbtwnpzao\"},\"sku\":{\"name\":\"vuhrhcffcyddgl\",\"tier\":\"Free\",\"size\":\"jqkwpyeicx\",\"family\":\"ciwqvhk\",\"capacity\":1053923929},\"id\":\"igdtopbob\",\"name\":\"og\",\"type\":\"m\"},{\"properties\":{\"clusterSize\":35431541,\"provisioningState\":\"Canceled\",\"clusterId\":1242660761,\"hosts\":[\"ayvvtpgvdf\"],\"vsanDatastoreName\":\"otkftutqxlngx\"},\"sku\":{\"name\":\"efgugnxk\",\"tier\":\"Basic\",\"size\":\"mi\",\"family\":\"thz\",\"capacity\":2050810494},\"id\":\"rabhjybigeho\",\"name\":\"fbowskanyk\",\"type\":\"zlcuiywgqywgndrv\"},{\"properties\":{\"clusterSize\":1744996179,\"provisioningState\":\"Canceled\",\"clusterId\":539523379,\"hosts\":[\"gyncocpecfvmmc\",\"ofsx\",\"zevgb\"],\"vsanDatastoreName\":\"jqabcypmivkwlzuv\"},\"sku\":{\"name\":\"c\",\"tier\":\"Premium\",\"size\":\"nbacfi\",\"family\":\"l\",\"capacity\":10134075},\"id\":\"tqgtzxdpnqbqq\",\"name\":\"xrjfeallnwsub\",\"type\":\"snjampmng\"}],\"nextLink\":\"scxaq\"}") + .toObject(ClusterList.class); + Assertions.assertEquals("txgcpodgmaajr", model.value().get(0).sku().name()); + Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); + Assertions.assertEquals("wzrlovmclwhij", model.value().get(0).sku().size()); + Assertions.assertEquals("ejctbzaqsqsycb", model.value().get(0).sku().family()); + Assertions.assertEquals(1508721218, model.value().get(0).sku().capacity()); + Assertions.assertEquals(1323879070, model.value().get(0).clusterSize()); + Assertions.assertEquals("hhbcsglummajtjao", model.value().get(0).hosts().get(0)); + Assertions.assertEquals("ionpimexg", model.value().get(0).vsanDatastoreName()); + Assertions.assertEquals("scxaq", model.nextLink()); + } +} 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 index 7896805609c12..4adc81db767ca 100644 --- 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 @@ -24,7 +24,7 @@ public final class ClustersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"clusterSize\":1609142876,\"provisioningState\":\"Succeeded\",\"clusterId\":1184462676,\"hosts\":[\"rtkgdojbmxvavref\",\"eesvecu\"],\"vsanDatastoreName\":\"pxtxsuwp\"},\"sku\":{\"name\":\"tujwsawdd\",\"tier\":\"Standard\",\"size\":\"bxv\",\"family\":\"itvtzeexavo\",\"capacity\":809172379},\"id\":\"lecdmdqbw\",\"name\":\"ypq\",\"type\":\"gsfjac\"}"; + = "{\"properties\":{\"clusterSize\":687861741,\"provisioningState\":\"Succeeded\",\"clusterId\":1053518025,\"hosts\":[\"vluwmncsttij\",\"y\",\"vpo\"],\"vsanDatastoreName\":\"rsg\"},\"sku\":{\"name\":\"gbdhuzqgnjdg\",\"tier\":\"Premium\",\"size\":\"cli\",\"family\":\"zvhxnk\",\"capacity\":144563900},\"id\":\"u\",\"name\":\"otppnv\",\"type\":\"xz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,25 +34,25 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Cluster response = manager.clusters() - .define("gat") - .withExistingPrivateCloud("zbezkgimsidxasic", "dyvvjskgfmocwahp") - .withSku(new Sku().withName("syxkyxvxevblb") + .define("mlqtmldgxob") + .withExistingPrivateCloud("gzuriglaecxndt", "cokpv") + .withSku(new Sku().withName("fvjlboxqvkjlmx") .withTier(SkuTier.FREE) - .withSize("ljlageuaulxu") - .withFamily("mjbnk") - .withCapacity(1476296254)) - .withClusterSize(187526121) - .withHosts(Arrays.asList("na", "zybbj")) - .withVsanDatastoreName("dj") + .withSize("ynhdwdigum") + .withFamily("raauzzpt") + .withCapacity(1518095696)) + .withClusterSize(1763053171) + .withHosts(Arrays.asList("ayzri")) + .withVsanDatastoreName("hya") .create(); - Assertions.assertEquals("tujwsawdd", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("bxv", response.sku().size()); - Assertions.assertEquals("itvtzeexavo", response.sku().family()); - Assertions.assertEquals(809172379, response.sku().capacity()); - Assertions.assertEquals(1609142876, response.clusterSize()); - Assertions.assertEquals("rtkgdojbmxvavref", response.hosts().get(0)); - Assertions.assertEquals("pxtxsuwp", response.vsanDatastoreName()); + Assertions.assertEquals("gbdhuzqgnjdg", response.sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); + Assertions.assertEquals("cli", response.sku().size()); + Assertions.assertEquals("zvhxnk", response.sku().family()); + Assertions.assertEquals(144563900, response.sku().capacity()); + Assertions.assertEquals(687861741, response.clusterSize()); + Assertions.assertEquals("vluwmncsttij", response.hosts().get(0)); + Assertions.assertEquals("rsg", 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 index ad42ab65258b4..b53342f54c418 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.clusters().delete("wivkxo", "zunbixx", "ti", com.azure.core.util.Context.NONE); + manager.clusters().delete("ril", "zapeewchpx", "ktwkuziyc", 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 index 29939ecb9d35e..cc8f6a8a6854b 100644 --- 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 @@ -22,7 +22,7 @@ public final class ClustersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"clusterSize\":1517277198,\"provisioningState\":\"Canceled\",\"clusterId\":1929585131,\"hosts\":[\"yrmewipmvekdx\",\"kuqgsjjxundxgket\",\"zhhzjhfjmhvvmu\",\"gpmuneqsxvmhfbuz\"],\"vsanDatastoreName\":\"ihsasb\"},\"sku\":{\"name\":\"udypohyuems\",\"tier\":\"Premium\",\"size\":\"qyrp\",\"family\":\"obrltt\",\"capacity\":2105592893},\"id\":\"nygq\",\"name\":\"nfwqzdzgtilaxhn\",\"type\":\"hqlyvijo\"}"; + = "{\"properties\":{\"clusterSize\":1933240221,\"provisioningState\":\"Failed\",\"clusterId\":1386214001,\"hosts\":[\"ulapzwyrp\",\"ogtqxepnylbf\",\"ajlyjtlvofqzhv\",\"cib\"],\"vsanDatastoreName\":\"mowuxrk\"},\"sku\":{\"name\":\"pvdwxf\",\"tier\":\"Premium\",\"size\":\"vwzjbhyz\",\"family\":\"jrkambtrnegvmnv\",\"capacity\":531370640},\"id\":\"vldspa\",\"name\":\"tjb\",\"type\":\"kdmflvestmjlx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Cluster response = manager.clusters() - .getWithResponse("zdjtxvzflbqv", "aqvlgafcqusr", "vetnwsdtutn", com.azure.core.util.Context.NONE) + .getWithResponse("xkzb", "msgeivsiykzk", "ncj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("udypohyuems", response.sku().name()); + Assertions.assertEquals("pvdwxf", response.sku().name()); Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("qyrp", response.sku().size()); - Assertions.assertEquals("obrltt", response.sku().family()); - Assertions.assertEquals(2105592893, response.sku().capacity()); - Assertions.assertEquals(1517277198, response.clusterSize()); - Assertions.assertEquals("yrmewipmvekdx", response.hosts().get(0)); - Assertions.assertEquals("ihsasb", response.vsanDatastoreName()); + Assertions.assertEquals("vwzjbhyz", response.sku().size()); + Assertions.assertEquals("jrkambtrnegvmnv", response.sku().family()); + Assertions.assertEquals(531370640, response.sku().capacity()); + Assertions.assertEquals(1933240221, response.clusterSize()); + Assertions.assertEquals("ulapzwyrp", response.hosts().get(0)); + Assertions.assertEquals("mowuxrk", 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 index 145b01f8f21b5..2569bc7d8aacb 100644 --- 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 @@ -23,7 +23,7 @@ public final class ClustersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"clusterSize\":1056443499,\"provisioningState\":\"Failed\",\"clusterId\":1289310691,\"hosts\":[\"zhqizxf\"],\"vsanDatastoreName\":\"tgqscjavftjuh\"},\"sku\":{\"name\":\"qaz\",\"tier\":\"Premium\",\"size\":\"guwpi\",\"family\":\"ajc\",\"capacity\":101089654},\"id\":\"ghfcfiwrxgkneuvy\",\"name\":\"nzqodfvpg\",\"type\":\"hoxgsgbpf\"}]}"; + = "{\"value\":[{\"properties\":{\"clusterSize\":1426712657,\"provisioningState\":\"Cancelled\",\"clusterId\":128886656,\"hosts\":[\"l\",\"chp\",\"db\"],\"vsanDatastoreName\":\"vwrdnhfukuvsj\"},\"sku\":{\"name\":\"swsmys\",\"tier\":\"Premium\",\"size\":\"qypfcv\",\"family\":\"rchpqbmfpjbabwid\",\"capacity\":1095864620},\"id\":\"spuunnoxyhkxgq\",\"name\":\"drihpfhoqcaaewda\",\"type\":\"mdjvlpj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.clusters().list("kxhdjhlimmbcx", "h", com.azure.core.util.Context.NONE); + = manager.clusters().list("n", "ntfpmvmemfnc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("qaz", response.iterator().next().sku().name()); + Assertions.assertEquals("swsmys", response.iterator().next().sku().name()); Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); - Assertions.assertEquals("guwpi", response.iterator().next().sku().size()); - Assertions.assertEquals("ajc", response.iterator().next().sku().family()); - Assertions.assertEquals(101089654, response.iterator().next().sku().capacity()); - Assertions.assertEquals(1056443499, response.iterator().next().clusterSize()); - Assertions.assertEquals("zhqizxf", response.iterator().next().hosts().get(0)); - Assertions.assertEquals("tgqscjavftjuh", response.iterator().next().vsanDatastoreName()); + Assertions.assertEquals("qypfcv", response.iterator().next().sku().size()); + Assertions.assertEquals("rchpqbmfpjbabwid", response.iterator().next().sku().family()); + Assertions.assertEquals(1095864620, response.iterator().next().sku().capacity()); + Assertions.assertEquals(1426712657, response.iterator().next().clusterSize()); + Assertions.assertEquals("l", response.iterator().next().hosts().get(0)); + Assertions.assertEquals("vwrdnhfukuvsj", 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 index 77db952bc9b84..3578bd3d3dea5 100644 --- 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 @@ -20,7 +20,7 @@ public final class ClustersListZonesWithResponseMockTests { @Test public void testListZonesWithResponse() throws Exception { String responseStr - = "{\"zones\":[{\"hosts\":[\"frpmpdnqqskaw\"],\"zone\":\"qvmmbn\"},{\"hosts\":[\"rtql\"],\"zone\":\"megni\"},{\"hosts\":[\"kxlzyqdrfeg\",\"ealzxwhcansymoyq\"],\"zone\":\"wigdi\"},{\"hosts\":[\"bxgomfaj\",\"wasqvdaeyyg\"],\"zone\":\"akjsqz\"}]}"; + = "{\"zones\":[{\"hosts\":[\"gl\",\"dzgkr\"],\"zone\":\"eevt\"},{\"hosts\":[\"r\"],\"zone\":\"t\"},{\"hosts\":[\"tpzdmovzvfvaawzq\"],\"zone\":\"f\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testListZonesWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ClusterZoneList response = manager.clusters() - .listZonesWithResponse("vcpwpgclrc", "vtsoxf", "kenx", com.azure.core.util.Context.NONE) + .listZonesWithResponse("levufuztcktyhj", "qedcgzulwm", "rqzz", com.azure.core.util.Context.NONE) .getValue(); } 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 new file mode 100644 index 0000000000000..5242780f387a5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.DatastoreList; +import com.azure.resourcemanager.avs.models.MountOptionEnum; +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\":\"Succeeded\",\"netAppVolume\":{\"id\":\"uxh\"},\"diskPoolVolume\":{\"targetId\":\"udxorrqn\",\"lunName\":\"poczvyifqrvkdvjs\",\"mountOption\":\"MOUNT\",\"path\":\"vvdfwatkpnpul\"},\"elasticSanVolume\":{\"targetId\":\"xbczwtruwiqz\"},\"status\":\"Inaccessible\"},\"id\":\"sovmyokacspkwl\",\"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\"},{\"properties\":{\"provisioningState\":\"Updating\",\"netAppVolume\":{\"id\":\"faxkffeii\"},\"diskPoolVolume\":{\"targetId\":\"lvmezyvshxmzsbbz\",\"lunName\":\"ggi\",\"mountOption\":\"ATTACH\",\"path\":\"burvjxxjnspy\"},\"elasticSanVolume\":{\"targetId\":\"tko\"},\"status\":\"Detached\"},\"id\":\"uknvudwti\",\"name\":\"kbldngkpocipa\",\"type\":\"yxoegukgjnp\"}],\"nextLink\":\"cgygev\"}") + .toObject(DatastoreList.class); + Assertions.assertEquals("uxh", model.value().get(0).netAppVolume().id()); + Assertions.assertEquals("udxorrqn", model.value().get(0).diskPoolVolume().targetId()); + Assertions.assertEquals("poczvyifqrvkdvjs", model.value().get(0).diskPoolVolume().lunName()); + Assertions.assertEquals(MountOptionEnum.MOUNT, model.value().get(0).diskPoolVolume().mountOption()); + Assertions.assertEquals("xbczwtruwiqz", model.value().get(0).elasticSanVolume().targetId()); + Assertions.assertEquals("cgygev", model.nextLink()); + } +} 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 index 6622ed37870a9..143833b2880da 100644 --- 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 @@ -25,7 +25,7 @@ public final class DatastoresCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"ecj\"},\"diskPoolVolume\":{\"targetId\":\"islstv\",\"lunName\":\"sylwxdzaumweooh\",\"mountOption\":\"MOUNT\",\"path\":\"uzboyjathw\"},\"elasticSanVolume\":{\"targetId\":\"olbaemwmdx\"},\"status\":\"DeadOrError\"},\"id\":\"jscjpahl\",\"name\":\"veabfqxnmwmqtib\",\"type\":\"yijddtvqcttad\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"t\"},\"diskPoolVolume\":{\"targetId\":\"dslqxihhrmooizqs\",\"lunName\":\"ypxiutcxap\",\"mountOption\":\"MOUNT\",\"path\":\"petogebjox\"},\"elasticSanVolume\":{\"targetId\":\"hvnh\"},\"status\":\"Unknown\"},\"id\":\"q\",\"name\":\"kkzjcjbtrga\",\"type\":\"hvv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,18 +35,19 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Datastore response = manager.datastores() - .define("riz") - .withExistingCluster("egprhptil", "ucb", "qtgdqohmcwsl") - .withNetAppVolume(new NetAppVolume().withId("ralllibphb")) - .withDiskPoolVolume( - new DiskPoolVolume().withTargetId("mizak").withLunName("kan").withMountOption(MountOptionEnum.MOUNT)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("ha")) + .define("teyowclu") + .withExistingCluster("cuplcplcwkhih", "hlhzdsqtzbsrgno", "cjhfgmvecactxmw") + .withNetAppVolume(new NetAppVolume().withId("qvgqouw")) + .withDiskPoolVolume(new DiskPoolVolume().withTargetId("zmpjwyiv") + .withLunName("ikf") + .withMountOption(MountOptionEnum.ATTACH)) + .withElasticSanVolume(new ElasticSanVolume().withTargetId("kteusqczk")) .create(); - Assertions.assertEquals("ecj", response.netAppVolume().id()); - Assertions.assertEquals("islstv", response.diskPoolVolume().targetId()); - Assertions.assertEquals("sylwxdzaumweooh", response.diskPoolVolume().lunName()); + Assertions.assertEquals("t", response.netAppVolume().id()); + Assertions.assertEquals("dslqxihhrmooizqs", response.diskPoolVolume().targetId()); + Assertions.assertEquals("ypxiutcxap", response.diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.MOUNT, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("olbaemwmdx", response.elasticSanVolume().targetId()); + Assertions.assertEquals("hvnh", 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 index e050cdc5302fc..3be3a4c511f63 100644 --- 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 @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.datastores() - .delete("f", "oajvgcxtxjcs", "eafidltugsresm", "ssjhoiftxfkf", com.azure.core.util.Context.NONE); + manager.datastores().delete("nbtgkbugrjqctoj", "mi", "of", "eypefojyqd", 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 index b15e646a20aea..cd551340a1ee0 100644 --- 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 @@ -22,7 +22,7 @@ public final class DatastoresGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Cancelled\",\"netAppVolume\":{\"id\":\"zaefedxihc\"},\"diskPoolVolume\":{\"targetId\":\"phkmcrjdqnsdfz\",\"lunName\":\"bg\",\"mountOption\":\"ATTACH\",\"path\":\"lkdghr\"},\"elasticSanVolume\":{\"targetId\":\"uutlwxezwzhok\"},\"status\":\"LostCommunication\"},\"id\":\"hh\",\"name\":\"qlgehg\",\"type\":\"pipifh\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"netAppVolume\":{\"id\":\"hycav\"},\"diskPoolVolume\":{\"targetId\":\"ggxdb\",\"lunName\":\"esmi\",\"mountOption\":\"ATTACH\",\"path\":\"ra\"},\"elasticSanVolume\":{\"targetId\":\"aawiuagydwqfb\"},\"status\":\"Detached\"},\"id\":\"fgiagtcojocqwo\",\"name\":\"fnzjvusfzldm\",\"type\":\"zuxylfsbtkadpyso\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Datastore response = manager.datastores() - .getWithResponse("disdosfjbjsvgj", "whryvycytdcl", "gc", "knfnwmbtmvpdv", com.azure.core.util.Context.NONE) + .getWithResponse("fcjnaeoisrvhmgor", "fukiscvwmzhw", "lefaxvxilcbtgn", "nzeyqxtjj", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zaefedxihc", response.netAppVolume().id()); - Assertions.assertEquals("phkmcrjdqnsdfz", response.diskPoolVolume().targetId()); - Assertions.assertEquals("bg", response.diskPoolVolume().lunName()); + Assertions.assertEquals("hycav", response.netAppVolume().id()); + Assertions.assertEquals("ggxdb", response.diskPoolVolume().targetId()); + Assertions.assertEquals("esmi", response.diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.ATTACH, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("uutlwxezwzhok", response.elasticSanVolume().targetId()); + Assertions.assertEquals("aawiuagydwqfb", 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 index e095c11a364ba..aedf1e64269c0 100644 --- 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 @@ -23,7 +23,7 @@ public final class DatastoresListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"netAppVolume\":{\"id\":\"m\"},\"diskPoolVolume\":{\"targetId\":\"sckdlp\",\"lunName\":\"gzrcxfailcfxwmdb\",\"mountOption\":\"ATTACH\",\"path\":\"gsftufqobrjlnacg\"},\"elasticSanVolume\":{\"targetId\":\"kknhxkizvytnrzv\"},\"status\":\"Attached\"},\"id\":\"aaeranokqgukk\",\"name\":\"qnvb\",\"type\":\"oylaxxul\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"netAppVolume\":{\"id\":\"nysuxmprafwgckh\"},\"diskPoolVolume\":{\"targetId\":\"xvd\",\"lunName\":\"ffwafq\",\"mountOption\":\"ATTACH\",\"path\":\"aspavehhr\"},\"elasticSanVolume\":{\"targetId\":\"bunzozudh\"},\"status\":\"DeadOrError\"},\"id\":\"moy\",\"name\":\"cdyuibhmfdnbzyd\",\"type\":\"f\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.datastores().list("slhhxudbxv", "d", "tnsi", com.azure.core.util.Context.NONE); + PagedIterable response = manager.datastores() + .list("hihfrbbcevqagtlt", "hlfkqojpy", "vgtrdcnifmzzs", com.azure.core.util.Context.NONE); - Assertions.assertEquals("m", response.iterator().next().netAppVolume().id()); - Assertions.assertEquals("sckdlp", response.iterator().next().diskPoolVolume().targetId()); - Assertions.assertEquals("gzrcxfailcfxwmdb", response.iterator().next().diskPoolVolume().lunName()); + Assertions.assertEquals("nysuxmprafwgckh", response.iterator().next().netAppVolume().id()); + Assertions.assertEquals("xvd", response.iterator().next().diskPoolVolume().targetId()); + Assertions.assertEquals("ffwafq", response.iterator().next().diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.ATTACH, response.iterator().next().diskPoolVolume().mountOption()); - Assertions.assertEquals("kknhxkizvytnrzv", response.iterator().next().elasticSanVolume().targetId()); + Assertions.assertEquals("bunzozudh", response.iterator().next().elasticSanVolume().targetId()); } } 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 index e4b9fbfa9013a..47232aba946a1 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.globalReachConnections().delete("rkcxkj", "bn", "mysu", com.azure.core.util.Context.NONE); + manager.globalReachConnections().delete("hyuemslyn", "qyrp", "oobrlttyms", 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 index dd0a3856b8d4c..e6d7606867a65 100644 --- 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 @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.hcxEnterpriseSites() - .deleteWithResponse("mquhio", "rsjuivfcdisyir", "xzhczexrxz", com.azure.core.util.Context.NONE); + .deleteWithResponse("j", "uktalhsnvkcdmxz", "poaimlnwiaaomyl", 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 index 586d3f62597ec..563c4efc19b22 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"clnpkci\"},\"id\":\"zriykhy\",\"name\":\"wf\",\"type\":\"jlb\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"networkBlock\":\"kjprvk\"},\"id\":\"fz\",\"name\":\"ljyxgtczhe\",\"type\":\"dbsdshm\"}") .toObject(IscsiPathInner.class); - Assertions.assertEquals("clnpkci", model.networkBlock()); + Assertions.assertEquals("kjprvk", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathInner model = new IscsiPathInner().withNetworkBlock("clnpkci"); + IscsiPathInner model = new IscsiPathInner().withNetworkBlock("kjprvk"); model = BinaryData.fromObject(model).toObject(IscsiPathInner.class); - Assertions.assertEquals("clnpkci", model.networkBlock()); + Assertions.assertEquals("kjprvk", 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 index 507058b7bb172..489c2c71d2501 100644 --- 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 @@ -12,9 +12,9 @@ public final class IscsiPathListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"ivwzjbhyzs\"},\"id\":\"rkambt\",\"name\":\"negvmnvuqe\",\"type\":\"vldspa\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"kkdmfl\"},\"id\":\"stmjlxrri\",\"name\":\"ozapeew\",\"type\":\"hpxlktwkuziycs\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"f\"},\"id\":\"tcktyhjtqedcgzu\",\"name\":\"wmmrq\",\"type\":\"zrrjvpgly\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"rvqeevtoepryutn\"},\"id\":\"tpzdmovzvfvaawzq\",\"name\":\"dflgzuri\",\"type\":\"laecxndticok\"}],\"nextLink\":\"zmlqtmldgxo\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"mvikl\"},\"id\":\"dvk\",\"name\":\"bejdznxcv\",\"type\":\"srhnjivo\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"ovqfzge\"},\"id\":\"dftuljltduce\",\"name\":\"mtmczuome\",\"type\":\"wcw\"}],\"nextLink\":\"ioknssxmoj\"}") .toObject(IscsiPathListResult.class); - Assertions.assertEquals("ivwzjbhyzs", model.value().get(0).networkBlock()); - Assertions.assertEquals("zmlqtmldgxo", model.nextLink()); + Assertions.assertEquals("mvikl", model.value().get(0).networkBlock()); + Assertions.assertEquals("ioknssxmoj", 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 index 065f992cd60ae..db8a538a1cd77 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathProperties model - = BinaryData.fromString("{\"provisioningState\":\"Deleting\",\"networkBlock\":\"vkjlmxhom\"}") + = BinaryData.fromString("{\"provisioningState\":\"Building\",\"networkBlock\":\"aehvbbxuri\"}") .toObject(IscsiPathProperties.class); - Assertions.assertEquals("vkjlmxhom", model.networkBlock()); + Assertions.assertEquals("aehvbbxuri", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("vkjlmxhom"); + IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("aehvbbxuri"); model = BinaryData.fromObject(model).toObject(IscsiPathProperties.class); - Assertions.assertEquals("vkjlmxhom", model.networkBlock()); + Assertions.assertEquals("aehvbbxuri", 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 index 80916db42043b..250ca71fb41f0 100644 --- 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 @@ -22,7 +22,7 @@ public final class IscsiPathsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"ojwyvf\"},\"id\":\"btsuahxs\",\"name\":\"xjcmmzrrsc\",\"type\":\"biwsd\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"emmucfxh\"},\"id\":\"kflrmymy\",\"name\":\"nc\",\"type\":\"lhrisw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); IscsiPath response = manager.iscsiPaths() - .createOrUpdate("rs", "yjq", new IscsiPathInner().withNetworkBlock("nozoeoq"), + .createOrUpdate("xzecpaxwkufykhvu", "xepmrut", new IscsiPathInner().withNetworkBlock("aobn"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("ojwyvf", response.networkBlock()); + Assertions.assertEquals("emmucfxh", 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 index 6ae952db352df..95ac5c5ad5e10 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.iscsiPaths().delete("npxqwodi", "fjxcjrmmuabwibv", com.azure.core.util.Context.NONE); + manager.iscsiPaths().delete("lmiiiovg", "cgxuugqkctotiowl", 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 index ac1223e88bd5d..5d3ed7f360b5b 100644 --- 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 @@ -21,7 +21,7 @@ public final class IscsiPathsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"rtywi\"},\"id\":\"mhlaku\",\"name\":\"lgbhgauacdi\",\"type\":\"mxu\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"networkBlock\":\"desqplpvmjcdo\"},\"id\":\"bidyv\",\"name\":\"eowxvgpi\",\"type\":\"deugf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); IscsiPath response - = manager.iscsiPaths().getWithResponse("c", "v", com.azure.core.util.Context.NONE).getValue(); + = manager.iscsiPaths().getWithResponse("lycsxz", "jks", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("rtywi", response.networkBlock()); + Assertions.assertEquals("desqplpvmjcdo", 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 index 9717218976216..3e2268282038d 100644 --- 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 @@ -22,7 +22,7 @@ public final class IscsiPathsListByPrivateCloudMockTests { @Test public void testListByPrivateCloud() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"rweft\"},\"id\":\"qejpmvssehaepwa\",\"name\":\"cxtczhupeukn\",\"type\":\"jduyyespydjfb\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"networkBlock\":\"droznn\"},\"id\":\"rlktgjcsggu\",\"name\":\"hemlwywaee\",\"type\":\"zgfbukklelssx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByPrivateCloud() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.iscsiPaths().listByPrivateCloud("cqlliz", "tac", com.azure.core.util.Context.NONE); + = manager.iscsiPaths().listByPrivateCloud("kcoeqswank", "t", com.azure.core.util.Context.NONE); - Assertions.assertEquals("rweft", response.iterator().next().networkBlock()); + Assertions.assertEquals("droznn", 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 index 528720a8f5134..f617dc3425cf2 100644 --- 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 @@ -19,8 +19,7 @@ public final class LocationsCheckQuotaAvailabilityWithResponseMockTests { @Test public void testCheckQuotaAvailabilityWithResponse() throws Exception { - String responseStr - = "{\"hostsRemaining\":{\"u\":1014687090,\"tppn\":1432155819,\"xz\":1573137323},\"quotaEnabled\":\"Disabled\"}"; + String responseStr = "{\"hostsRemaining\":{\"vyvnqqyb\":382394727},\"quotaEnabled\":\"Enabled\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +29,7 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Quota response = manager.locations() - .checkQuotaAvailabilityWithResponse("nscliqhzvhxnk", com.azure.core.util.Context.NONE) + .checkQuotaAvailabilityWithResponse("orfmluiqt", 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 index bd496468b2aa0..313c8a65432be 100644 --- 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 @@ -21,7 +21,7 @@ public final class LocationsCheckTrialAvailabilityWithResponseMockTests { @Test public void testCheckTrialAvailabilityWithResponse() throws Exception { - String responseStr = "{\"status\":\"TrialUsed\",\"availableHosts\":1139502489}"; + String responseStr = "{\"status\":\"TrialUsed\",\"availableHosts\":1122494487}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testCheckTrialAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Trial response = manager.locations() - .checkTrialAvailabilityWithResponse("lauyav", - new Sku().withName("uwmncs") + .checkTrialAvailabilityWithResponse("dlwwqfbumlkxt", + new Sku().withName("qjfsmlmbtxhw") .withTier(SkuTier.FREE) - .withSize("fybvpoek") - .withFamily("gsgbdhuzq") - .withCapacity(41953991), + .withSize("rtawcoezb") + .withFamily("ubskhudygoookkq") + .withCapacity(280222728), com.azure.core.util.Context.NONE) .getValue(); 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 new file mode 100644 index 0000000000000..63ff8aedb346c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.OperationListResult; +import com.azure.resourcemanager.avs.models.ActionType; +import org.junit.jupiter.api.Assertions; + +public final class OperationListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") + .toObject(OperationListResult.class); + Assertions.assertEquals("pybczmehmtzopb", model.value().get(0).display().provider()); + Assertions.assertEquals("h", model.value().get(0).display().resource()); + Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).display().operation()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().description()); + Assertions.assertEquals(ActionType.INTERNAL, model.value().get(0).actionType()); + Assertions.assertEquals("kfo", model.nextLink()); + } +} 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 index d5ad3ebfcc9c7..baf5fa3f0fca0 100644 --- 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 @@ -23,7 +23,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"nhdwdigumbnra\",\"isDataAction\":false,\"display\":{\"provider\":\"tj\",\"resource\":\"ysdzhez\",\"operation\":\"vaiqyuvvf\",\"description\":\"kphhq\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"tfnhtbaxkgxywr\",\"isDataAction\":true,\"display\":{\"provider\":\"lyhpluodpvruud\",\"resource\":\"zibt\",\"operation\":\"stgktst\",\"description\":\"xeclzedqbcvhzlhp\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,10 +34,10 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("tj", response.iterator().next().display().provider()); - Assertions.assertEquals("ysdzhez", response.iterator().next().display().resource()); - Assertions.assertEquals("vaiqyuvvf", response.iterator().next().display().operation()); - Assertions.assertEquals("kphhq", response.iterator().next().display().description()); + Assertions.assertEquals("lyhpluodpvruud", response.iterator().next().display().provider()); + Assertions.assertEquals("zibt", response.iterator().next().display().resource()); + Assertions.assertEquals("stgktst", response.iterator().next().display().operation()); + Assertions.assertEquals("xeclzedqbcvhzlhp", response.iterator().next().display().description()); Assertions.assertEquals(ActionType.INTERNAL, response.iterator().next().actionType()); } } 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 index fe466079fcfda..e63814ca3cbd9 100644 --- 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 @@ -23,7 +23,7 @@ public final class PlacementPoliciesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"nmzlanru\",\"provisioningState\":\"Succeeded\"},\"id\":\"nphcnzqtpjhmqrh\",\"name\":\"thlaiwdcxs\",\"type\":\"lzzhzdtxet\"}"; + = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"wfepbnwgfmx\",\"provisioningState\":\"Succeeded\"},\"id\":\"bjb\",\"name\":\"dlfgtdysnaq\",\"type\":\"flq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PlacementPolicy response = manager.placementPolicies() - .define("whmozusgzvlnsnnj") - .withExistingCluster("lhguyn", "chl", "mltx") + .define("qfecjxeygtuhx") + .withExistingCluster("gepuslvyjtc", "uwkasiz", "esfuught") .withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("olpy")) + new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("ewmrswnjlxu")) .create(); Assertions.assertEquals(PlacementPolicyState.DISABLED, response.properties().state()); - Assertions.assertEquals("nmzlanru", response.properties().displayName()); + Assertions.assertEquals("wfepbnwgfmx", 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 index de1aa803f8fc0..9f890bc98fef9 100644 --- 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 @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.placementPolicies().delete("rkolawjm", "smwr", "kcdxfzzzw", "jafi", com.azure.core.util.Context.NONE); + manager.placementPolicies() + .delete("oxovnekhenlusf", "rd", "jxtxrdc", "tjvidt", 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 index 1c09718a98f49..522cecf083a3d 100644 --- 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 @@ -22,7 +22,7 @@ public final class PlacementPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"uzk\",\"provisioningState\":\"Failed\"},\"id\":\"o\",\"name\":\"xrzvhqjwtrhtgvgz\",\"type\":\"c\"}"; + = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"muowolbauiro\",\"provisioningState\":\"Succeeded\"},\"id\":\"szonwpngajinn\",\"name\":\"xjawrt\",\"type\":\"jfjmyccxlzh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PlacementPolicy response = manager.placementPolicies() - .getWithResponse("vlwyzg", "blkujrllfojuidjp", "uyjucejikzo", "ovvtzejetjkln", - com.azure.core.util.Context.NONE) + .getWithResponse("wrpqafgfugsnnf", "yetefyp", "coc", "fjgtixrjvzuy", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); - Assertions.assertEquals("uzk", response.properties().displayName()); + Assertions.assertEquals("muowolbauiro", 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 index a59d39888e7c0..a9652a7e1a615 100644 --- 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 @@ -23,7 +23,7 @@ public final class PlacementPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"tl\",\"provisioningState\":\"Updating\"},\"id\":\"agb\",\"name\":\"idqlvhu\",\"type\":\"oveofizrvjfnmj\"}]}"; + = "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"kqtob\",\"provisioningState\":\"Canceled\"},\"id\":\"ofshfphwpnulaiyw\",\"name\":\"e\",\"type\":\"ywhslwkojpllndnp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.placementPolicies() - .list("ttcjuhplrvkmjc", "mjvlgfgg", "vkyylizrzbjpsf", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.placementPolicies().list("pubowsepdfg", "mtdherngb", "c", com.azure.core.util.Context.NONE); - Assertions.assertEquals(PlacementPolicyState.DISABLED, response.iterator().next().properties().state()); - Assertions.assertEquals("tl", response.iterator().next().properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, response.iterator().next().properties().state()); + Assertions.assertEquals("kqtob", 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 new file mode 100644 index 0000000000000..812ec7103817d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.PlacementPoliciesList; +import com.azure.resourcemanager.avs.models.PlacementPolicyState; +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\":\"Enabled\",\"displayName\":\"wyznkbyku\",\"provisioningState\":\"Deleting\"},\"id\":\"hpagm\",\"name\":\"r\",\"type\":\"kdsnfdsdoakgtdl\"}],\"nextLink\":\"kzevdlhewpusds\"}") + .toObject(PlacementPoliciesList.class); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.value().get(0).properties().state()); + Assertions.assertEquals("wyznkbyku", model.value().get(0).properties().displayName()); + Assertions.assertEquals("kzevdlhewpusds", 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 index 41ebef68aadaa..b2f59ceaa089b 100644 --- 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 @@ -14,18 +14,18 @@ public final class PlacementPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"klff\",\"provisioningState\":\"Deleting\"},\"id\":\"wqlgzrf\",\"name\":\"eeyebi\",\"type\":\"ikayuhqlbjbsybb\"}") + "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"gvbbejdcng\",\"provisioningState\":\"Deleting\"},\"id\":\"akufgmjz\",\"name\":\"wr\",\"type\":\"grtwae\"}") .toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); - Assertions.assertEquals("klff", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); + Assertions.assertEquals("gvbbejdcng", model.properties().displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyInner model = new PlacementPolicyInner().withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("klff")); + new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("gvbbejdcng")); model = BinaryData.fromObject(model).toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); - Assertions.assertEquals("klff", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); + Assertions.assertEquals("gvbbejdcng", 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 index b66388814c2bc..2649024e7c2cb 100644 --- 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 @@ -13,18 +13,18 @@ public final class PlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"t\",\"provisioningState\":\"Updating\"}") + "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"kopbminrf\",\"provisioningState\":\"Canceled\"}") .toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("t", model.displayName()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("kopbminrf", model.displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyProperties model - = new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("t"); + = new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("kopbminrf"); model = BinaryData.fromObject(model).toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("t", model.displayName()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("kopbminrf", 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 index 509d809bb3941..89896d66e5826 100644 --- 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 @@ -16,28 +16,28 @@ public final class PlacementPolicyUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdateProperties model = BinaryData.fromString( - "{\"state\":\"Disabled\",\"vmMembers\":[\"flsjc\"],\"hostMembers\":[\"zfjvfbgofe\",\"jagrqmqhldvr\",\"iiojnal\",\"hfkvtvsexsowuel\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}") + "{\"state\":\"Enabled\",\"vmMembers\":[\"lfeadcygq\"],\"hostMembers\":[\"hejhzisx\",\"fpel\",\"lppvksrpq\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"None\"}") .toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("flsjc", model.vmMembers().get(0)); - Assertions.assertEquals("zfjvfbgofe", model.hostMembers().get(0)); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("lfeadcygq", model.vmMembers().get(0)); + Assertions.assertEquals("hejhzisx", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); + Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyUpdateProperties model - = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.DISABLED) - .withVmMembers(Arrays.asList("flsjc")) - .withHostMembers(Arrays.asList("zfjvfbgofe", "jagrqmqhldvr", "iiojnal", "hfkvtvsexsowuel")) + = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.ENABLED) + .withVmMembers(Arrays.asList("lfeadcygq")) + .withHostMembers(Arrays.asList("hejhzisx", "fpel", "lppvksrpq")) .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); + .withAzureHybridBenefitType(AzureHybridBenefitType.NONE); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("flsjc", model.vmMembers().get(0)); - Assertions.assertEquals("zfjvfbgofe", model.hostMembers().get(0)); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("lfeadcygq", model.vmMembers().get(0)); + Assertions.assertEquals("hejhzisx", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); + Assertions.assertEquals(AzureHybridBenefitType.NONE, 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 index 1e90d8af0bcd9..f5dfd57f44288 100644 --- 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 @@ -16,27 +16,27 @@ public final class PlacementPolicyUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdate model = BinaryData.fromString( - "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"rmbzo\",\"okixrjqcir\"],\"hostMembers\":[\"frl\",\"zszrnwoiindfpw\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"None\"}}") + "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"msweypqwdxggicc\",\"n\",\"qhuexm\"],\"hostMembers\":[\"lstvlzywe\",\"hz\",\"ncsdtclusiyp\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}}") .toObject(PlacementPolicyUpdate.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("rmbzo", model.vmMembers().get(0)); - Assertions.assertEquals("frl", model.hostMembers().get(0)); + Assertions.assertEquals("msweypqwdxggicc", model.vmMembers().get(0)); + Assertions.assertEquals("lstvlzywe", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); + 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("rmbzo", "okixrjqcir")) - .withHostMembers(Arrays.asList("frl", "zszrnwoiindfpw")) + .withVmMembers(Arrays.asList("msweypqwdxggicc", "n", "qhuexm")) + .withHostMembers(Arrays.asList("lstvlzywe", "hz", "ncsdtclusiyp")) .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.NONE); + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdate.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("rmbzo", model.vmMembers().get(0)); - Assertions.assertEquals("frl", model.hostMembers().get(0)); + Assertions.assertEquals("msweypqwdxggicc", model.vmMembers().get(0)); + Assertions.assertEquals("lstvlzywe", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); + 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 index 9b0a999769de5..6d07a89e39201 100644 --- 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 @@ -13,7 +13,7 @@ public final class PrivateCloudIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateCloudIdentity model - = BinaryData.fromString("{\"tenantId\":\"gakeqsr\",\"principalId\":\"bzqqedqytbciq\",\"type\":\"None\"}") + = BinaryData.fromString("{\"principalId\":\"gakeqsr\",\"tenantId\":\"bzqqedqytbciq\",\"type\":\"None\"}") .toObject(PrivateCloudIdentity.class); Assertions.assertEquals(ResourceIdentityType.NONE, 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 index a6cbf6514c39b..145be9812bdc5 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.privateClouds().delete("etoge", "joxslhvnhla", com.azure.core.util.Context.NONE); + manager.privateClouds().delete("owzfttsttkt", "ahbqactxtgzuk", com.azure.core.util.Context.NONE); } } 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 index f1a2969ba26f1..607e7710d1c35 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptCmdletInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"lpijnkrxfrd\",\"timeout\":\"c\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"nasx\",\"description\":\"tozqyzhftwesgo\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"krlgnyhm\",\"description\":\"sxkkg\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"xjb\",\"name\":\"hqxvcxgfrpdsofbs\",\"type\":\"rnsvbuswd\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"ujxukndxd\",\"timeout\":\"rjguufzdmsyqtf\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"String\",\"name\":\"ingamvp\",\"description\":\"o\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"qamvdkfwynwcvtbv\",\"description\":\"yhmtnvyqiat\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"zcjaesgvvsccy\",\"description\":\"g\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Bool\",\"name\":\"lvdnkfx\",\"description\":\"emdwzrmuhapfc\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"qvpsvuoymg\",\"name\":\"celve\",\"type\":\"rypqlmfeo\"}") .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 index 6c853883a5580..dd91bd4e542b0 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptCmdletPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"description\":\"bycnunvjsrtkf\",\"timeout\":\"nopqgikyzirtx\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Credential\",\"name\":\"tpsew\",\"description\":\"oi\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"tqmieox\",\"description\":\"ggufhyaomtb\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]}") + "{\"provisioningState\":\"Failed\",\"description\":\"wkyhkobopgxe\",\"timeout\":\"owepbqpcrfkb\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"dw\",\"description\":\"p\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]}") .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 index afb413e506356..91453731d8a78 100644 --- 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 @@ -20,7 +20,7 @@ public final class ScriptCmdletsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"kltytmhdroz\",\"timeout\":\"hdrlktg\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"String\",\"name\":\"eml\",\"description\":\"waeeczgfb\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"xblycsxzuj\",\"description\":\"rlsmdesqplpvmjc\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"dyvt\",\"name\":\"owx\",\"type\":\"gpiudeug\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"jnhgwydyyn\",\"timeout\":\"vkh\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Credential\",\"name\":\"rfdl\",\"description\":\"kh\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"zjcpeogk\",\"name\":\"nmg\",\"type\":\"ro\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,8 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptCmdlet response = manager.scriptCmdlets() - .getWithResponse("th", "hn", "naoyank", "oe", com.azure.core.util.Context.NONE) + .getWithResponse("nlgmtrwahzjmu", "ftbyrplro", "kpigqfusu", "kzmkwklsnoxaxmqe", + 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 index eaea474fcb25c..b595ce65667ad 100644 --- 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 @@ -21,7 +21,7 @@ public final class ScriptCmdletsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"gjggsv\",\"timeout\":\"jkxibda\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"mkxfbvfbhdyir\",\"description\":\"wpg\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"String\",\"name\":\"o\",\"description\":\"kkum\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"ztbws\",\"description\":\"qowxwcom\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"zc\",\"description\":\"k\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"fdv\",\"name\":\"vhb\",\"type\":\"rnfxtgddp\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"qekewvnqvcd\",\"timeout\":\"uaucmf\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Credential\",\"name\":\"un\",\"description\":\"ikczvvitacgxmf\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"vs\",\"description\":\"hlwntsjgq\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"uuuybnchrsziz\",\"name\":\"yuel\",\"type\":\"etndnbfqyggagf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.scriptCmdlets().list("mrqbrjbbmpxdlv", "kfrexcrseqwjks", "hud", com.azure.core.util.Context.NONE); + = manager.scriptCmdlets().list("nsharujtjiqxfzyj", "ttvwkpqh", "penuy", 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 new file mode 100644 index 0000000000000..a924ce6c52659 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.ScriptCmdletsList; +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\":\"bbqwrvtldg\",\"timeout\":\"pgvmpipaslthaqfx\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"dsrezpdrhneuyow\",\"description\":\"d\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"bi\",\"name\":\"cgpik\",\"type\":\"zimejzanlfzx\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"bzonok\",\"timeout\":\"rjqc\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"azszrnwoiindfpw\",\"description\":\"ylwbtlhflsjcdhsz\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"eljag\",\"description\":\"mqhldvrii\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"ghfkvtvsexs\",\"name\":\"wueluqhhahhxv\",\"type\":\"hmzk\"}],\"nextLink\":\"jgwwspughftq\"}") + .toObject(ScriptCmdletsList.class); + Assertions.assertEquals("jgwwspughftq", 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 index 53ca6f17ccc92..76ac5e131f1d8 100644 --- 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 @@ -16,39 +16,37 @@ public final class ScriptExecutionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionInner model = BinaryData.fromString( - "{\"properties\":{\"scriptCmdletId\":\"izsh\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"impevf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mblrrilbywd\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"icc\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rwfscjfnynszquj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"zdvoqytibyowbb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gyavu\"}],\"failureReason\":\"thjoxoism\",\"timeout\":\"ksbpimlqoljx\",\"retention\":\"gxxlxsffgcvizq\",\"submittedAt\":\"2021-03-28T18:15:03Z\",\"startedAt\":\"2021-04-12T21:20:45Z\",\"finishedAt\":\"2021-04-04T23:05:36Z\",\"provisioningState\":\"Pending\",\"output\":[\"fgfb\",\"jub\",\"yhgk\"],\"namedOutputs\":{\"ktlahbqa\":\"datansgowzfttst\"},\"information\":[\"tgzukxitmmqt\",\"qqqxhrnxrx\",\"pjui\",\"av\"],\"warnings\":[\"dzf\",\"azivjlfrqttbajl\",\"atnwxyiopi\",\"kqqfk\"],\"errors\":[\"cxkdmligovi\"]},\"id\":\"xk\",\"name\":\"mloazuru\",\"type\":\"cbgoor\"}") + "{\"properties\":{\"scriptCmdletId\":\"bnujrywvtylbf\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"urdoi\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"iithtywu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xcbihw\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"fdntwjchrdgoih\"}],\"failureReason\":\"mwctondzjluudfd\",\"timeout\":\"wggytsbwtovvt\",\"retention\":\"einqf\",\"submittedAt\":\"2021-05-10T20:16:44Z\",\"startedAt\":\"2021-09-17T22:17:43Z\",\"finishedAt\":\"2021-10-13T18:52:56Z\",\"provisioningState\":\"Canceled\",\"output\":[\"nepttwqmsni\",\"fcdmqnrojlpijn\",\"rxfrddhc\"],\"namedOutputs\":{\"hftwesgog\":\"dataizzronasxiftozqy\",\"sxkkg\":\"datazhonnxkrlgnyhmo\",\"rghxjb\":\"datah\"},\"information\":[\"xvcxgfrpdsofbshr\",\"svbuswdvzyy\",\"ycnunvjsrtk\",\"awnopqgikyzirtxd\"],\"warnings\":[\"zejntps\"],\"errors\":[\"ioilqukrydxtq\",\"ieoxorggufhyaomt\"]},\"id\":\"hhavgrvkffovjz\",\"name\":\"pjbi\",\"type\":\"gjmfxumvfcl\"}") .toObject(ScriptExecutionInner.class); - Assertions.assertEquals("izsh", model.scriptCmdletId()); - Assertions.assertEquals("impevf", model.parameters().get(0).name()); - Assertions.assertEquals("icc", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("thjoxoism", model.failureReason()); - Assertions.assertEquals("ksbpimlqoljx", model.timeout()); - Assertions.assertEquals("gxxlxsffgcvizq", model.retention()); - Assertions.assertEquals("fgfb", model.output().get(0)); + Assertions.assertEquals("bnujrywvtylbf", model.scriptCmdletId()); + Assertions.assertEquals("urdoi", model.parameters().get(0).name()); + Assertions.assertEquals("fdntwjchrdgoih", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("mwctondzjluudfd", model.failureReason()); + Assertions.assertEquals("wggytsbwtovvt", model.timeout()); + Assertions.assertEquals("einqf", model.retention()); + Assertions.assertEquals("nepttwqmsni", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("izsh") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("impevf"), - new ScriptExecutionParameter().withName("mblrrilbywd"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("icc"), - new ScriptExecutionParameter().withName("rwfscjfnynszquj"), - new ScriptExecutionParameter().withName("zdvoqytibyowbb"), - new ScriptExecutionParameter().withName("gyavu"))) - .withFailureReason("thjoxoism") - .withTimeout("ksbpimlqoljx") - .withRetention("gxxlxsffgcvizq") - .withOutput(Arrays.asList("fgfb", "jub", "yhgk")) - .withNamedOutputs(mapOf("ktlahbqa", "datansgowzfttst")); + ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("bnujrywvtylbf") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("urdoi"), + new ScriptExecutionParameter().withName("iithtywu"), new ScriptExecutionParameter().withName("xcbihw"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("fdntwjchrdgoih"))) + .withFailureReason("mwctondzjluudfd") + .withTimeout("wggytsbwtovvt") + .withRetention("einqf") + .withOutput(Arrays.asList("nepttwqmsni", "fcdmqnrojlpijn", "rxfrddhc")) + .withNamedOutputs( + mapOf("hftwesgog", "dataizzronasxiftozqy", "sxkkg", "datazhonnxkrlgnyhmo", "rghxjb", "datah")); model = BinaryData.fromObject(model).toObject(ScriptExecutionInner.class); - Assertions.assertEquals("izsh", model.scriptCmdletId()); - Assertions.assertEquals("impevf", model.parameters().get(0).name()); - Assertions.assertEquals("icc", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("thjoxoism", model.failureReason()); - Assertions.assertEquals("ksbpimlqoljx", model.timeout()); - Assertions.assertEquals("gxxlxsffgcvizq", model.retention()); - Assertions.assertEquals("fgfb", model.output().get(0)); + Assertions.assertEquals("bnujrywvtylbf", model.scriptCmdletId()); + Assertions.assertEquals("urdoi", model.parameters().get(0).name()); + Assertions.assertEquals("fdntwjchrdgoih", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("mwctondzjluudfd", model.failureReason()); + Assertions.assertEquals("wggytsbwtovvt", model.timeout()); + Assertions.assertEquals("einqf", model.retention()); + Assertions.assertEquals("nepttwqmsni", model.output().get(0)); } // Use "Map.of" if available 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 index e0a7c1a752b89..40fa91549dd47 100644 --- 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 @@ -12,15 +12,15 @@ public final class ScriptExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionParameter model - = BinaryData.fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"zkdnc\"}") + = BinaryData.fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"zjxvydfcea\"}") .toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("zkdnc", model.name()); + Assertions.assertEquals("zjxvydfcea", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionParameter model = new ScriptExecutionParameter().withName("zkdnc"); + ScriptExecutionParameter model = new ScriptExecutionParameter().withName("zjxvydfcea"); model = BinaryData.fromObject(model).toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("zkdnc", model.name()); + Assertions.assertEquals("zjxvydfcea", 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 index f6da7bf542477..1f37d365eb420 100644 --- 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 @@ -16,38 +16,39 @@ public final class ScriptExecutionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionProperties model = BinaryData.fromString( - "{\"scriptCmdletId\":\"eoybfhjxakvvjgs\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dilmyww\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"kxn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"edabgyvudtjue\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"bcihxuuwhc\"}],\"failureReason\":\"xccybvpa\",\"timeout\":\"akkud\",\"retention\":\"xgwjplmagstcyoh\",\"submittedAt\":\"2021-07-05T16:33:29Z\",\"startedAt\":\"2021-11-14T02:06:38Z\",\"finishedAt\":\"2021-05-12T18:54:52Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"ogsjkmnwqjno\",\"aiy\",\"ddviacegfnmntfpm\"],\"namedOutputs\":{\"vvbalx\":\"datamfnczd\",\"chp\":\"datal\",\"evwrdnhfuk\":\"datadb\",\"fcvlerch\":\"datavsjcswsmystuluqy\"},\"information\":[\"mfpjbabw\"],\"warnings\":[\"cxsspuunnoxyh\",\"xgqddrih\",\"fhoqca\",\"ewda\"],\"errors\":[\"jvlpjxxkzbr\",\"sgeivsiy\"]}") + "{\"scriptCmdletId\":\"ovwxnbkfezzxsc\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"zdgiruj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"zbomvzzbtdcqvpni\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ujviylwdshfs\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"bgye\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rymsgaojfmw\"}],\"failureReason\":\"otmrfhir\",\"timeout\":\"tymoxoftp\",\"retention\":\"iwyczuh\",\"submittedAt\":\"2021-09-05T19:51:12Z\",\"startedAt\":\"2021-11-29T08:27:09Z\",\"finishedAt\":\"2021-01-05T07:46:41Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"usps\",\"asdvl\"],\"namedOutputs\":{\"uzvx\":\"datadgzxulucvpamrsr\",\"xmrhu\":\"datarisjnhnytxifqjz\",\"cesutrgjupauut\":\"datalw\"},\"information\":[\"qhih\"],\"warnings\":[\"g\"],\"errors\":[\"nfqn\",\"cypsxjv\",\"oimwkslirc\"]}") .toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("eoybfhjxakvvjgs", model.scriptCmdletId()); - Assertions.assertEquals("dilmyww", model.parameters().get(0).name()); - Assertions.assertEquals("kxn", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("xccybvpa", model.failureReason()); - Assertions.assertEquals("akkud", model.timeout()); - Assertions.assertEquals("xgwjplmagstcyoh", model.retention()); - Assertions.assertEquals("ogsjkmnwqjno", model.output().get(0)); + Assertions.assertEquals("ovwxnbkfezzxsc", model.scriptCmdletId()); + Assertions.assertEquals("zdgiruj", model.parameters().get(0).name()); + Assertions.assertEquals("bgye", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("otmrfhir", model.failureReason()); + Assertions.assertEquals("tymoxoftp", model.timeout()); + Assertions.assertEquals("iwyczuh", model.retention()); + Assertions.assertEquals("usps", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("eoybfhjxakvvjgs") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("dilmyww"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("kxn"), - new ScriptExecutionParameter().withName("edabgyvudtjue"), - new ScriptExecutionParameter().withName("bcihxuuwhc"))) - .withFailureReason("xccybvpa") - .withTimeout("akkud") - .withRetention("xgwjplmagstcyoh") - .withOutput(Arrays.asList("ogsjkmnwqjno", "aiy", "ddviacegfnmntfpm")) - .withNamedOutputs(mapOf("vvbalx", "datamfnczd", "chp", "datal", "evwrdnhfuk", "datadb", "fcvlerch", - "datavsjcswsmystuluqy")); + ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("ovwxnbkfezzxsc") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("zdgiruj"), + new ScriptExecutionParameter().withName("zbomvzzbtdcqvpni"), + new ScriptExecutionParameter().withName("ujviylwdshfs"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("bgye"), + new ScriptExecutionParameter().withName("rymsgaojfmw"))) + .withFailureReason("otmrfhir") + .withTimeout("tymoxoftp") + .withRetention("iwyczuh") + .withOutput(Arrays.asList("usps", "asdvl")) + .withNamedOutputs( + mapOf("uzvx", "datadgzxulucvpamrsr", "xmrhu", "datarisjnhnytxifqjz", "cesutrgjupauut", "datalw")); model = BinaryData.fromObject(model).toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("eoybfhjxakvvjgs", model.scriptCmdletId()); - Assertions.assertEquals("dilmyww", model.parameters().get(0).name()); - Assertions.assertEquals("kxn", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("xccybvpa", model.failureReason()); - Assertions.assertEquals("akkud", model.timeout()); - Assertions.assertEquals("xgwjplmagstcyoh", model.retention()); - Assertions.assertEquals("ogsjkmnwqjno", model.output().get(0)); + Assertions.assertEquals("ovwxnbkfezzxsc", model.scriptCmdletId()); + Assertions.assertEquals("zdgiruj", model.parameters().get(0).name()); + Assertions.assertEquals("bgye", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("otmrfhir", model.failureReason()); + Assertions.assertEquals("tymoxoftp", model.timeout()); + Assertions.assertEquals("iwyczuh", model.retention()); + Assertions.assertEquals("usps", model.output().get(0)); } // Use "Map.of" if available 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 index e5e3898a5b56f..4082dc3b927ca 100644 --- 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 @@ -25,7 +25,7 @@ public final class ScriptExecutionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"wzfgbrttuiaclkie\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jlfnthiq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"yuttdiygbpvnwswm\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xkyctwwgzwx\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ecvo\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ygzyvneezaifght\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"oqqtl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fhzbkr\"}],\"failureReason\":\"jjavfq\",\"timeout\":\"vhnqo\",\"retention\":\"dogiyetesyp\",\"submittedAt\":\"2021-10-20T02:22:42Z\",\"startedAt\":\"2021-07-21T20:44:49Z\",\"finishedAt\":\"2021-08-24T04:40:21Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"b\"],\"namedOutputs\":{\"p\":\"dataynkbwetnju\",\"piaccxnafb\":\"dataprkzya\"},\"information\":[\"oohtuovmaonurjtu\"],\"warnings\":[\"ihpvecmslclblyj\",\"lt\",\"sjuscvsfxigctmg\"],\"errors\":[\"pbezqccydrtceu\",\"d\",\"kkyihzt\"]},\"id\":\"qm\",\"name\":\"qzgwldoychil\",\"type\":\"cecfehuwaoaguh\"}"; + = "{\"properties\":{\"scriptCmdletId\":\"ycxnmskw\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jyslurl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"shhkvpedw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"slsrhmpq\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"skondcbrwimu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qejo\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ovyrrleaesinu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"tljqobbpih\"}],\"failureReason\":\"cecybmrqbrjbbmpx\",\"timeout\":\"lvykfrex\",\"retention\":\"s\",\"submittedAt\":\"2021-03-29T05:59:10Z\",\"startedAt\":\"2021-04-17T14:29:37Z\",\"finishedAt\":\"2021-05-27T00:32:10Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"zhxogjggsvo\",\"jkxibda\"],\"namedOutputs\":{\"y\":\"datakmdyomkxfbvfbh\",\"gddeimaw\":\"datarhpw\"},\"information\":[\"gkkumuikjcj\"],\"warnings\":[\"tbw\",\"nsq\"],\"errors\":[\"wcoml\"]},\"id\":\"ytwvczcswkacve\",\"name\":\"yfdvlvhbwrnfxtgd\",\"type\":\"pqthehnmnaoya\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,26 +35,29 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptExecution response = manager.scriptExecutions() - .define("xameblydyvkfkm") - .withExistingPrivateCloud("zfrgqhaohcm", "uocnjrohmbpyr") - .withScriptCmdletId("xne") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("mtodl"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("apucygvo"), - new ScriptExecutionParameter().withName("vyuns"), new ScriptExecutionParameter().withName("xlghieegj"))) - .withFailureReason("vvpa") - .withTimeout("eksgbuxantuygd") - .withRetention("aq") - .withOutput(Arrays.asList("ulopmjnlexwhcb", "pibkephuu", "erctatoyin", "qpbrlc")) - .withNamedOutputs(mapOf("crrpcjttbstvje", "datauczkgofxyfsruc", "mlghktuidvrmazlp", "dataqnrmvvfko")) + .define("vlwyzg") + .withExistingPrivateCloud("idqlvhu", "oveofizrvjfnmj") + .withScriptCmdletId("kujrllfojui") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("uuyjucejikz"), + new ScriptExecutionParameter().withName("eovvtzej"), + new ScriptExecutionParameter().withName("tjklntikyjuzk"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("zolxrzvhqjwtr"), + new ScriptExecutionParameter().withName("tgvgzp"), + new ScriptExecutionParameter().withName("rrkolawjmjs"))) + .withFailureReason("rokcdxfzzzwyjaf") + .withTimeout("tlhguynuchl") + .withRetention("ltxdwhmozu") + .withOutput(Arrays.asList("fpafolpymwamxq", "rag", "gdphtvdula", "vl")) + .withNamedOutputs(mapOf("nrupdwvnphcnzqtp", "datahcsrlzknmzl")) .create(); - Assertions.assertEquals("wzfgbrttuiaclkie", response.scriptCmdletId()); - Assertions.assertEquals("jlfnthiq", response.parameters().get(0).name()); - Assertions.assertEquals("ecvo", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("jjavfq", response.failureReason()); - Assertions.assertEquals("vhnqo", response.timeout()); - Assertions.assertEquals("dogiyetesyp", response.retention()); - Assertions.assertEquals("b", response.output().get(0)); + Assertions.assertEquals("ycxnmskw", response.scriptCmdletId()); + Assertions.assertEquals("jyslurl", response.parameters().get(0).name()); + Assertions.assertEquals("skondcbrwimu", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("cecybmrqbrjbbmpx", response.failureReason()); + Assertions.assertEquals("lvykfrex", response.timeout()); + Assertions.assertEquals("s", response.retention()); + Assertions.assertEquals("zhxogjggsvo", response.output().get(0)); } // Use "Map.of" if available 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 index cc7fd67054c67..e54011f5ae00e 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.scriptExecutions().delete("bqqqagwwrxa", "mz", "sgl", com.azure.core.util.Context.NONE); + manager.scriptExecutions().delete("ydsx", "efoh", "cbvopwndyqleallk", 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 index ebecbca21329f..8f85967511f52 100644 --- 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 @@ -23,7 +23,7 @@ public final class ScriptExecutionsGetExecutionLogsWithResponseMockTests { @Test public void testGetExecutionLogsWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"qthwmgnmbscbb\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dhxiidlopedbwd\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"yqyybxubmdna\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"qwremjel\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qacigeleo\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"d\"}],\"failureReason\":\"qvwzkjopwbeonrl\",\"timeout\":\"wzdqybxceakxcpts\",\"retention\":\"fyiaseqch\",\"submittedAt\":\"2021-11-05T11:59:35Z\",\"startedAt\":\"2021-08-04T17:40:23Z\",\"finishedAt\":\"2021-01-20T16:29:41Z\",\"provisioningState\":\"Deleting\",\"output\":[\"ykiue\"],\"namedOutputs\":{\"klinhmdptysprq\":\"datanbwzohmnrxxbso\",\"pli\":\"datagnzxojpslsvj\",\"qvapcohhoucq\":\"datafiqwoy\",\"jxcx\":\"dataq\"},\"information\":[\"dcgdzbenribca\",\"etzqd\",\"tjwfljhznamtua\"],\"warnings\":[\"wcjjncqt\",\"z\",\"izvg\"],\"errors\":[\"tzuuvb\",\"ngrebwg\"]},\"id\":\"httzlswvajqfutlx\",\"name\":\"oqza\",\"type\":\"unwqr\"}"; + = "{\"properties\":{\"scriptCmdletId\":\"szhv\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"c\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hvtrrmhwrbfdpyf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ubhvj\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ocu\"}],\"failureReason\":\"lw\",\"timeout\":\"hmem\",\"retention\":\"oclu\",\"submittedAt\":\"2021-08-23T19:22:29Z\",\"startedAt\":\"2021-11-26T19:05Z\",\"finishedAt\":\"2021-08-15T12:03:46Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"mmyky\",\"jxsglhsr\",\"rye\",\"ylmbkzudni\"],\"namedOutputs\":{\"refqy\":\"dataihotjewlpxuzzjg\",\"kwpzdqtvh\":\"dataqotoihiqakydiwfb\"},\"information\":[\"odaqaxsi\",\"ietgbebjfu\"],\"warnings\":[\"oichdlpnfpubnt\",\"batzviqsows\",\"aelcat\",\"cjuhplrvkm\"],\"errors\":[\"mjvlgfgg\"]},\"id\":\"kyylizr\",\"name\":\"bjpsfxsfuztlvtm\",\"type\":\"agb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,18 +33,17 @@ public void testGetExecutionLogsWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptExecution response = manager.scriptExecutions() - .getExecutionLogsWithResponse("rczezkhhlt", "jadhqoawj", "oyueayfbpcmsp", - Arrays.asList(ScriptOutputStreamType.WARNING, ScriptOutputStreamType.OUTPUT, - ScriptOutputStreamType.WARNING), + .getExecutionLogsWithResponse("mtkhlowkxxpvbr", "fjmzsyzfho", "lhikcyychunsj", + Arrays.asList(ScriptOutputStreamType.WARNING, ScriptOutputStreamType.INFORMATION), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qthwmgnmbscbb", response.scriptCmdletId()); - Assertions.assertEquals("dhxiidlopedbwd", response.parameters().get(0).name()); - Assertions.assertEquals("qwremjel", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("qvwzkjopwbeonrl", response.failureReason()); - Assertions.assertEquals("wzdqybxceakxcpts", response.timeout()); - Assertions.assertEquals("fyiaseqch", response.retention()); - Assertions.assertEquals("ykiue", response.output().get(0)); + Assertions.assertEquals("szhv", response.scriptCmdletId()); + Assertions.assertEquals("c", response.parameters().get(0).name()); + Assertions.assertEquals("ocu", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("lw", response.failureReason()); + Assertions.assertEquals("hmem", response.timeout()); + Assertions.assertEquals("oclu", response.retention()); + Assertions.assertEquals("mmyky", 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 index 77ccbbe0b488b..17512103047a6 100644 --- 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 @@ -21,7 +21,7 @@ public final class ScriptExecutionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"wxeiqbpsmgomg\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ljdlrgmspl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gaufcs\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hvn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"wgnxkympqanxrj\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"tw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"taoypnyghshxc\"}],\"failureReason\":\"hkgmnsg\",\"timeout\":\"pxycphdr\",\"retention\":\"jkhvyomacluzvxnq\",\"submittedAt\":\"2021-05-26T18:55:49Z\",\"startedAt\":\"2021-08-18T08:28:39Z\",\"finishedAt\":\"2021-05-17T11:48:53Z\",\"provisioningState\":\"Pending\",\"output\":[\"oi\"],\"namedOutputs\":{\"ypobkdqzr\":\"datassffxuifmc\"},\"information\":[\"ylollgtrczzydmxz\",\"ijpvuaurkihc\",\"rldefxrdcox\"],\"warnings\":[\"kjanur\",\"nqbnqb\",\"izxqltgrd\",\"gypxrxvbfihwuhvc\"],\"errors\":[\"s\"]},\"id\":\"xrblmliowxihs\",\"name\":\"nxw\",\"type\":\"agnepzwaklsb\"}"; + = "{\"properties\":{\"scriptCmdletId\":\"wffplfmuvapc\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"rrvwey\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xoy\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"phaimmoi\"}],\"failureReason\":\"qboshbra\",\"timeout\":\"apyyrmfsvbpavbo\",\"retention\":\"ppdbwnupgahxkum\",\"submittedAt\":\"2021-11-16T21:33:34Z\",\"startedAt\":\"2021-05-10T22:23:02Z\",\"finishedAt\":\"2021-10-15T01:30:32Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"cpugm\"],\"namedOutputs\":{\"oqhnlb\":\"dataepvufhbzehew\",\"krsrrmoucs\":\"datanbldxeaclgschori\",\"abeolhbhlvbm\":\"datafldpuviyfc\"},\"information\":[\"ibsxtkcud\"],\"warnings\":[\"farfs\"],\"errors\":[\"lkjxnqpvwgf\",\"tmhqykiz\"]},\"id\":\"ksaoafcluqvox\",\"name\":\"ycjimryvwgcwwpbm\",\"type\":\"gwe\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptExecution response = manager.scriptExecutions() - .getWithResponse("wtoaukhfk", "cisiz", "oaedsxjwuivedwcg", com.azure.core.util.Context.NONE) + .getWithResponse("yuicdhzbdy", "wwgbdv", "bid", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wxeiqbpsmgomg", response.scriptCmdletId()); - Assertions.assertEquals("ljdlrgmspl", response.parameters().get(0).name()); - Assertions.assertEquals("tw", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("hkgmnsg", response.failureReason()); - Assertions.assertEquals("pxycphdr", response.timeout()); - Assertions.assertEquals("jkhvyomacluzvxnq", response.retention()); - Assertions.assertEquals("oi", response.output().get(0)); + Assertions.assertEquals("wffplfmuvapc", response.scriptCmdletId()); + Assertions.assertEquals("rrvwey", response.parameters().get(0).name()); + Assertions.assertEquals("phaimmoi", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("qboshbra", response.failureReason()); + Assertions.assertEquals("apyyrmfsvbpavbo", response.timeout()); + Assertions.assertEquals("ppdbwnupgahxkum", response.retention()); + Assertions.assertEquals("cpugm", 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 index 3474050e700ba..7c1da6beb05b1 100644 --- 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 @@ -22,7 +22,7 @@ public final class ScriptExecutionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"hxepmrutzna\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"bnslujdjltym\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"guihywar\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"spphk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xkykxdssjp\"}],\"failureReason\":\"mucfxhikkf\",\"timeout\":\"rmymyincqlhr\",\"retention\":\"wslmiiiovgqcg\",\"submittedAt\":\"2021-03-09T10:20:04Z\",\"startedAt\":\"2021-07-06T10:58:26Z\",\"finishedAt\":\"2021-03-05T05:58:38Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"owlxte\",\"dptjgwdtgukranb\",\"wphqlkccuzgygqw\"],\"namedOutputs\":{\"gniiprglvaw\":\"dataiul\",\"pmcubkmifoxxkub\":\"datawzdufypivlsbb\",\"gvgovpbbttefjo\":\"dataphavpmhbrb\"},\"information\":[\"sqyzqedikdfr\",\"biqmrjgei\",\"fqlggw\"],\"warnings\":[\"zcxmjpbyep\",\"mgtvlj\",\"rc\",\"yfqi\"],\"errors\":[\"hnp\",\"myqwcab\"]},\"id\":\"ui\",\"name\":\"eeyaswl\",\"type\":\"augmrmfjlr\"}]}"; + = "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"pdulon\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"np\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"w\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ehtuevrhr\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"oogwxhnsduugwb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"reur\"}],\"failureReason\":\"kfuarenlv\",\"timeout\":\"htkln\",\"retention\":\"afvvk\",\"submittedAt\":\"2021-04-06T11:17:07Z\",\"startedAt\":\"2021-01-30T13:56:43Z\",\"finishedAt\":\"2021-11-11T21:24:27Z\",\"provisioningState\":\"Failed\",\"output\":[\"cqxypokkhminq\",\"ymc\",\"ngnbdxxew\"],\"namedOutputs\":{\"ct\":\"datanvudbchaqdtvqecr\",\"ytxzvtznapxbanno\":\"dataxxdtddmflh\"},\"information\":[\"xc\",\"ytprwnwvroev\"],\"warnings\":[\"yo\",\"rrrouuxvnsa\",\"bcrymodizrx\"],\"errors\":[\"bdxnaz\",\"mkmlmvevfx\",\"op\",\"hbzxli\"]},\"id\":\"rdddtfgxqbawpcb\",\"name\":\"nzqcy\",\"type\":\"napqo\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.scriptExecutions().list("sxze", "paxwkufyk", com.azure.core.util.Context.NONE); + = manager.scriptExecutions().list("xddbhfhpfpaz", "zoyw", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hxepmrutzna", response.iterator().next().scriptCmdletId()); - Assertions.assertEquals("bnslujdjltym", response.iterator().next().parameters().get(0).name()); - Assertions.assertEquals("guihywar", response.iterator().next().hiddenParameters().get(0).name()); - Assertions.assertEquals("mucfxhikkf", response.iterator().next().failureReason()); - Assertions.assertEquals("rmymyincqlhr", response.iterator().next().timeout()); - Assertions.assertEquals("wslmiiiovgqcg", response.iterator().next().retention()); - Assertions.assertEquals("owlxte", response.iterator().next().output().get(0)); + Assertions.assertEquals("pdulon", response.iterator().next().scriptCmdletId()); + Assertions.assertEquals("np", response.iterator().next().parameters().get(0).name()); + Assertions.assertEquals("oogwxhnsduugwb", response.iterator().next().hiddenParameters().get(0).name()); + Assertions.assertEquals("kfuarenlv", response.iterator().next().failureReason()); + Assertions.assertEquals("htkln", response.iterator().next().timeout()); + Assertions.assertEquals("afvvk", response.iterator().next().retention()); + Assertions.assertEquals("cqxypokkhminq", 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 new file mode 100644 index 0000000000000..f198c861818e6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.ScriptExecutionsList; +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\":\"dvypgikdgsz\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"birryuzhl\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"oqrvqqaatjin\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"vgoup\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fiibfggjioolvr\"}],\"failureReason\":\"kvtkkg\",\"timeout\":\"lqwjygvjayvblm\",\"retention\":\"k\",\"submittedAt\":\"2021-12-10T06:42:49Z\",\"startedAt\":\"2020-12-21T03:49:07Z\",\"finishedAt\":\"2021-08-14T02:32:59Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"pbyrqufegxu\",\"wz\",\"bnhlmc\"],\"namedOutputs\":{\"itvgbmhrixkwm\":\"datadn\"},\"information\":[\"ejvegrhbpnaixex\",\"cbdreaxhcexd\"],\"warnings\":[\"qahqkghtpwijn\",\"yjsvfyc\",\"z\"],\"errors\":[\"oowvrv\",\"t\"]},\"id\":\"qp\",\"name\":\"y\",\"type\":\"s\"},{\"properties\":{\"scriptCmdletId\":\"nzm\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"fipns\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"kmcwaekrrjreafx\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"umh\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"glikkxwslolb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"pvuzlmv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"elfk\"}],\"failureReason\":\"plcrpwjxeznoig\",\"timeout\":\"rnjwmw\",\"retention\":\"nbsazejjoqkag\",\"submittedAt\":\"2021-03-05T04:18:27Z\",\"startedAt\":\"2021-09-12T22:34:01Z\",\"finishedAt\":\"2021-03-18T10:35:55Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"nfaazpxdtnkdmkq\",\"jlwuenvrkp\",\"ou\"],\"namedOutputs\":{\"xqtnq\":\"datarebqaaysjk\"},\"information\":[\"zlwfffiakp\"],\"warnings\":[\"qmt\",\"d\",\"tmmjihyeozph\"],\"errors\":[\"uyqncygupkvipmd\",\"cwxqu\",\"evzhfsto\"]},\"id\":\"hojujbypelmcuv\",\"name\":\"ixbjx\",\"type\":\"fw\"}],\"nextLink\":\"lrcoolsttpki\"}") + .toObject(ScriptExecutionsList.class); + Assertions.assertEquals("dvypgikdgsz", model.value().get(0).scriptCmdletId()); + Assertions.assertEquals("birryuzhl", model.value().get(0).parameters().get(0).name()); + Assertions.assertEquals("oqrvqqaatjin", model.value().get(0).hiddenParameters().get(0).name()); + Assertions.assertEquals("kvtkkg", model.value().get(0).failureReason()); + Assertions.assertEquals("lqwjygvjayvblm", model.value().get(0).timeout()); + Assertions.assertEquals("k", model.value().get(0).retention()); + Assertions.assertEquals("pbyrqufegxu", model.value().get(0).output().get(0)); + Assertions.assertEquals("lrcoolsttpki", model.nextLink()); + } +} 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 index ac88ecd563181..ebf1513c85539 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptPackageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"khtj\",\"version\":\"i\",\"company\":\"wfqatmtd\",\"uri\":\"mdvy\"},\"id\":\"ikdgszywkbir\",\"name\":\"yuzhlhkjoqrvq\",\"type\":\"aatjinrvgoupmfi\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ibdeibq\",\"version\":\"qkgh\",\"company\":\"ndzwmkrefa\",\"uri\":\"jorwkqnyhgbij\"},\"id\":\"ivfxzsjabibsyst\",\"name\":\"wfsdjpvkvpbj\",\"type\":\"bkzbzkd\"}") .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 index 774954182e505..527d80dd6da4d 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptPackagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"description\":\"gjio\",\"version\":\"vrwxkv\",\"company\":\"k\",\"uri\":\"lqwjygvjayvblm\"}") + "{\"provisioningState\":\"Canceled\",\"description\":\"abudurgk\",\"version\":\"mokzhjjklf\",\"company\":\"mouwqlgzrfzeey\",\"uri\":\"izikayuhq\"}") .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 index 6b549d633a151..f29767f50688c 100644 --- 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 @@ -20,7 +20,7 @@ public final class ScriptPackagesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"qjjyslurl\",\"version\":\"hhkvpedwqs\",\"company\":\"rhmpqvwwsk\",\"uri\":\"dcbrwimuvq\"},\"id\":\"osovyrrleaesin\",\"name\":\"qtljqobbpihehc\",\"type\":\"cy\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"buhhlkyqlt\",\"version\":\"rogtuwkf\",\"company\":\"jk\",\"uri\":\"ysidfvclgl\"},\"id\":\"fuijtkbus\",\"name\":\"ogsf\",\"type\":\"kayi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptPackage response = manager.scriptPackages() - .getWithResponse("ua", "htomflrytswfp", "mdgycxn", com.azure.core.util.Context.NONE) + .getWithResponse("vcjkgd", "razftxejwabmdujt", "vcopex", 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 index 10f77fa002ff7..62ef62c4c2c41 100644 --- 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 @@ -21,7 +21,7 @@ public final class ScriptPackagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"afiqgeaarbgjekg\",\"version\":\"lbyulidwcwvmze\",\"company\":\"o\",\"uri\":\"hj\"},\"id\":\"wgdnqzbr\",\"name\":\"kspzhzmtksjcit\",\"type\":\"igsxcdgljplk\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"antkwcegyamlbns\",\"version\":\"ac\",\"company\":\"vpilg\",\"uri\":\"oq\"},\"id\":\"gmditgueiookjbs\",\"name\":\"hrtdtpdelq\",\"type\":\"cslmotoebnfxo\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.scriptPackages().list("gydlhqv", "n", com.azure.core.util.Context.NONE); + = manager.scriptPackages().list("ctqhamzjrwdk", "zeqyjleziun", 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 new file mode 100644 index 0000000000000..f57ed436104fe --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.ScriptPackagesList; +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\":\"dw\",\"version\":\"tswiby\",\"company\":\"dl\",\"uri\":\"shfwpracstwity\"},\"id\":\"evxccedcp\",\"name\":\"md\",\"type\":\"odn\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"jc\",\"version\":\"hlt\",\"company\":\"gcxn\",\"uri\":\"vwxqibyqunyo\"},\"id\":\"wlmdjrkv\",\"name\":\"g\",\"type\":\"vfvpdbodaciz\"}],\"nextLink\":\"q\"}") + .toObject(ScriptPackagesList.class); + Assertions.assertEquals("q", 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 index 9272af3f9af7e..3ae8c767b79ca 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptParameter model = BinaryData.fromString( - "{\"type\":\"Bool\",\"name\":\"kffovjzhpjbibgjm\",\"description\":\"umvfclu\",\"visibility\":\"Visible\",\"optional\":\"Required\"}") + "{\"type\":\"Int\",\"name\":\"tjsyin\",\"description\":\"fq\",\"visibility\":\"Visible\",\"optional\":\"Required\"}") .toObject(ScriptParameter.class); - Assertions.assertEquals("kffovjzhpjbibgjm", model.name()); + Assertions.assertEquals("tjsyin", 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 index 12709eabe799e..032f311acefa7 100644 --- 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 @@ -11,19 +11,19 @@ public final class ScriptSecureStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptSecureStringExecutionParameter model - = BinaryData.fromString("{\"type\":\"SecureValue\",\"secureValue\":\"xonbzoggculapz\",\"name\":\"y\"}") - .toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("y", model.name()); - Assertions.assertEquals("xonbzoggculapz", model.secureValue()); + ScriptSecureStringExecutionParameter model = BinaryData + .fromString("{\"type\":\"SecureValue\",\"secureValue\":\"lhvygdyftu\",\"name\":\"rtwnawjslbi\"}") + .toObject(ScriptSecureStringExecutionParameter.class); + Assertions.assertEquals("rtwnawjslbi", model.name()); + Assertions.assertEquals("lhvygdyftu", model.secureValue()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScriptSecureStringExecutionParameter model - = new ScriptSecureStringExecutionParameter().withName("y").withSecureValue("xonbzoggculapz"); + = new ScriptSecureStringExecutionParameter().withName("rtwnawjslbi").withSecureValue("lhvygdyftu"); model = BinaryData.fromObject(model).toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("y", model.name()); - Assertions.assertEquals("xonbzoggculapz", model.secureValue()); + Assertions.assertEquals("rtwnawjslbi", model.name()); + Assertions.assertEquals("lhvygdyftu", 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 index f7cbf720f4872..7f091137fd91d 100644 --- 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 @@ -12,18 +12,18 @@ public final class ScriptStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptStringExecutionParameter model - = BinaryData.fromString("{\"type\":\"Value\",\"value\":\"gogtqxepnylbf\",\"name\":\"ajlyjtlvofqzhv\"}") + = BinaryData.fromString("{\"type\":\"Value\",\"value\":\"ojgcyzt\",\"name\":\"fmznba\"}") .toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("ajlyjtlvofqzhv", model.name()); - Assertions.assertEquals("gogtqxepnylbf", model.value()); + Assertions.assertEquals("fmznba", model.name()); + Assertions.assertEquals("ojgcyzt", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScriptStringExecutionParameter model - = new ScriptStringExecutionParameter().withName("ajlyjtlvofqzhv").withValue("gogtqxepnylbf"); + = new ScriptStringExecutionParameter().withName("fmznba").withValue("ojgcyzt"); model = BinaryData.fromObject(model).toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("ajlyjtlvofqzhv", model.name()); - Assertions.assertEquals("gogtqxepnylbf", model.value()); + Assertions.assertEquals("fmznba", model.name()); + Assertions.assertEquals("ojgcyzt", model.value()); } } 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 index 7e48374e45668..1d156729303d0 100644 --- 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 @@ -11,7 +11,7 @@ public final class VirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"uslfead\",\"moRefId\":\"gq\",\"folderPath\":\"yhejhzisxgfp\",\"restrictMovement\":\"Disabled\"},\"id\":\"p\",\"name\":\"vk\",\"type\":\"r\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"v\",\"moRefId\":\"pzfoqoui\",\"folderPath\":\"bxarzgszufoxci\",\"restrictMovement\":\"Enabled\"},\"id\":\"doamciodhkha\",\"name\":\"xkhnzbonlwnto\",\"type\":\"gokdwbwhks\"}") .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 index 3ddcb278d5ca7..862c0d7469fd4 100644 --- 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 @@ -11,7 +11,7 @@ public final class VirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"displayName\":\"jzraehtwdwrf\",\"moRefId\":\"wib\",\"folderPath\":\"cdl\",\"restrictMovement\":\"Disabled\"}") + "{\"provisioningState\":\"Failed\",\"displayName\":\"rvexztvb\",\"moRefId\":\"gsfraoyzkoow\",\"folderPath\":\"mnguxawqaldsyu\",\"restrictMovement\":\"Disabled\"}") .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 index 38137b2b78ded..ea199a37c62ba 100644 --- 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 @@ -12,16 +12,16 @@ public final class VirtualMachineRestrictMovementTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Disabled\"}") + VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Enabled\"}") .toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); + Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, model.restrictMovement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineRestrictMovement model - = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.DISABLED); + = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED); model = BinaryData.fromObject(model).toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); + 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 index 47a6a25d7555e..911c966737153 100644 --- 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 @@ -20,7 +20,7 @@ public final class VirtualMachinesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"ihiqakydiw\",\"moRefId\":\"rkwpzdqtvhcspod\",\"folderPath\":\"axsipietgb\",\"restrictMovement\":\"Disabled\"},\"id\":\"ulbmoichdlp\",\"name\":\"fpubntnbatz\",\"type\":\"iqsowsaaelc\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"chnmna\",\"moRefId\":\"nxhkxjqi\",\"folderPath\":\"rweooxffifhx\",\"restrictMovement\":\"Disabled\"},\"id\":\"ewmozqvbu\",\"name\":\"qmamhsycxhxzga\",\"type\":\"ttaboidvmfqh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); VirtualMachine response = manager.virtualMachines() - .getWithResponse("rryejylmbkzudnig", "fihotj", "wlpxuzzjg", "refqy", com.azure.core.util.Context.NONE) + .getWithResponse("jwpfilkm", "kholvd", "dviauogp", "uartvti", 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 index 287ce3efc8c28..7d815f9b9f145 100644 --- 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 @@ -21,7 +21,7 @@ public final class VirtualMachinesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"hvtrrmhwrbfdpyf\",\"moRefId\":\"bhvjglr\",\"folderPath\":\"uyzlw\",\"restrictMovement\":\"Disabled\"},\"id\":\"mhoocl\",\"name\":\"tnpqmemczjk\",\"type\":\"mykyujxsglhs\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"ipq\",\"moRefId\":\"edmurrxxge\",\"folderPath\":\"ktvqylkmqpzoy\",\"restrictMovement\":\"Disabled\"},\"id\":\"cgwgcloxoebqinji\",\"name\":\"nwjfu\",\"type\":\"qlafcbahhpzpofoi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.virtualMachines().list("lhikcyychunsj", "pjrtws", "hv", com.azure.core.util.Context.NONE); + PagedIterable response = manager.virtualMachines() + .list("gfabuiyjibuzphdu", "neiknpg", "xgjiuqh", 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 new file mode 100644 index 0000000000000..9eece92dc090f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.VirtualMachinesList; +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\":\"Succeeded\",\"displayName\":\"f\",\"moRefId\":\"eyvpnqicvinvkj\",\"folderPath\":\"dxrbuukzcle\",\"restrictMovement\":\"Disabled\"},\"id\":\"lw\",\"name\":\"aztz\",\"type\":\"ofncckwyfzqwhxxb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"zfeqztppri\",\"moRefId\":\"xorjaltolmncwsob\",\"folderPath\":\"csdbnwdcfhuc\",\"restrictMovement\":\"Disabled\"},\"id\":\"uvglsbjjcanvx\",\"name\":\"vtvudutncormr\",\"type\":\"xqtvcofu\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"gj\",\"moRefId\":\"gdknnqv\",\"folderPath\":\"znqntoru\",\"restrictMovement\":\"Disabled\"},\"id\":\"a\",\"name\":\"mkycgra\",\"type\":\"wjue\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ruvdmov\",\"moRefId\":\"zlxwabmqoefkifr\",\"folderPath\":\"puqujmqlgkfbtn\",\"restrictMovement\":\"Enabled\"},\"id\":\"n\",\"name\":\"bjcntujitc\",\"type\":\"ed\"}],\"nextLink\":\"wwa\"}") + .toObject(VirtualMachinesList.class); + Assertions.assertEquals("wwa", 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 index 8877a3837c95d..cf5482ae4d22e 100644 --- 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 @@ -17,13 +17,13 @@ public final class VmHostPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmHostPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmHost\",\"vmMembers\":[\"smwutwbdsrezpd\"],\"hostMembers\":[\"neuyow\",\"kdw\",\"t\"],\"affinityType\":\"AntiAffinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"ikpzimejza\",\"provisioningState\":\"Failed\"}") + "{\"type\":\"VmHost\",\"vmMembers\":[\"icslfaoq\",\"piyylhalnswhccsp\"],\"hostMembers\":[\"aivwitqscywu\",\"gwol\"],\"affinityType\":\"Affinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"ai\",\"provisioningState\":\"Succeeded\"}") .toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("ikpzimejza", model.displayName()); - Assertions.assertEquals("smwutwbdsrezpd", model.vmMembers().get(0)); - Assertions.assertEquals("neuyow", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); + Assertions.assertEquals("ai", model.displayName()); + Assertions.assertEquals("icslfaoq", model.vmMembers().get(0)); + Assertions.assertEquals("aivwitqscywu", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } @@ -32,18 +32,18 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { VmHostPlacementPolicyProperties model = new VmHostPlacementPolicyProperties().withState(PlacementPolicyState.DISABLED) - .withDisplayName("ikpzimejza") - .withVmMembers(Arrays.asList("smwutwbdsrezpd")) - .withHostMembers(Arrays.asList("neuyow", "kdw", "t")) - .withAffinityType(AffinityType.ANTI_AFFINITY) + .withDisplayName("ai") + .withVmMembers(Arrays.asList("icslfaoq", "piyylhalnswhccsp")) + .withHostMembers(Arrays.asList("aivwitqscywu", "gwol")) + .withAffinityType(AffinityType.AFFINITY) .withAffinityStrength(AffinityStrength.SHOULD) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("ikpzimejza", model.displayName()); - Assertions.assertEquals("smwutwbdsrezpd", model.vmMembers().get(0)); - Assertions.assertEquals("neuyow", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); + Assertions.assertEquals("ai", model.displayName()); + Assertions.assertEquals("icslfaoq", model.vmMembers().get(0)); + Assertions.assertEquals("aivwitqscywu", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java index ec774707adc47..80c50dd45481f 100644 --- 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 @@ -15,24 +15,24 @@ public final class VmPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmVm\",\"vmMembers\":[\"fp\",\"vm\"],\"affinityType\":\"AntiAffinity\",\"state\":\"Enabled\",\"displayName\":\"ltha\",\"provisioningState\":\"Building\"}") + "{\"type\":\"VmVm\",\"vmMembers\":[\"uhhziuiefozbhdm\",\"mlmz\"],\"affinityType\":\"Affinity\",\"state\":\"Enabled\",\"displayName\":\"rmaequ\",\"provisioningState\":\"Deleting\"}") .toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("ltha", model.displayName()); - Assertions.assertEquals("fp", model.vmMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); + Assertions.assertEquals("rmaequ", model.displayName()); + Assertions.assertEquals("uhhziuiefozbhdm", model.vmMembers().get(0)); + Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VmPlacementPolicyProperties model = new VmPlacementPolicyProperties().withState(PlacementPolicyState.ENABLED) - .withDisplayName("ltha") - .withVmMembers(Arrays.asList("fp", "vm")) - .withAffinityType(AffinityType.ANTI_AFFINITY); + .withDisplayName("rmaequ") + .withVmMembers(Arrays.asList("uhhziuiefozbhdm", "mlmz")) + .withAffinityType(AffinityType.AFFINITY); model = BinaryData.fromObject(model).toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("ltha", model.displayName()); - Assertions.assertEquals("fp", model.vmMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); + Assertions.assertEquals("rmaequ", model.displayName()); + Assertions.assertEquals("uhhziuiefozbhdm", model.vmMembers().get(0)); + Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java index efc7872d93674..8a42ae51fb5e5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkDhcpConfigurationsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ivmxyasfl\",\"segments\":[\"gzwywak\",\"ihknsmjbl\",\"ljhlnymzotq\",\"ryuzcbmqqv\"],\"provisioningState\":\"Succeeded\",\"revision\":2672748922256801426},\"id\":\"ayxonsupeujl\",\"name\":\"qnhcvsqltnzoibg\",\"type\":\"xgnxfyqonmpqoxwd\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"zexrxzbujrt\",\"segments\":[\"vwrevkhgnlnzon\",\"lrpiqywnc\"],\"provisioningState\":\"Succeeded\",\"revision\":695830285026637390},\"id\":\"fizehtdhgbjk\",\"name\":\"reljeamur\",\"type\":\"zmlovuanash\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,13 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDhcp response = manager.workloadNetworkDhcpConfigurations() - .define("ickpz") - .withExistingPrivateCloud("aglkafhon", "juj") - .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("opmx").withRevision(1149822936606293846L)) + .define("eqw") + .withExistingPrivateCloud("qcttadijaeukmrsi", "ekpndzaapmudq") + .withProperties( + new WorkloadNetworkDhcpEntity().withDisplayName("ibudqwy").withRevision(3020354173137847735L)) .create(); - Assertions.assertEquals("ivmxyasfl", response.properties().displayName()); - Assertions.assertEquals(2672748922256801426L, response.properties().revision()); + Assertions.assertEquals("zexrxzbujrt", response.properties().displayName()); + Assertions.assertEquals(695830285026637390L, response.properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java index d6e7b8631107a..a0dc3710e550e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworkDhcpConfigurations() - .delete("lxecwcrojphslh", "awjutifd", "fmvigorqjbttzh", com.azure.core.util.Context.NONE); + .delete("jpahlxvea", "f", "xnmwmqtibxyijddt", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java index c20d26c4ff37b..edad216ea6b03 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"glcfhmlrqryxyn\",\"segments\":[\"rd\",\"sovwxznptgoeiyb\",\"abpfhvfs\",\"kvntjlrigjkskyri\"],\"provisioningState\":\"Succeeded\",\"revision\":6697301089417631797},\"id\":\"xwaabzmifrygznmm\",\"name\":\"xrizkzobgop\",\"type\":\"lhslnelxieixyn\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ankjpdnjzh\",\"segments\":[\"ylhjlm\",\"oyxprimr\",\"opteecj\",\"eislstvasylwx\"],\"provisioningState\":\"Building\",\"revision\":8207738955383308872},\"id\":\"oohgu\",\"name\":\"fuzboyjathwtzolb\",\"type\":\"emwmdxmebwjs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDhcp response = manager.workloadNetworkDhcpConfigurations() - .getWithResponse("sf", "svtui", "zh", com.azure.core.util.Context.NONE) + .getWithResponse("wsldrizetpwbr", "lllibph", "qzmiza", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("glcfhmlrqryxyn", response.properties().displayName()); - Assertions.assertEquals(6697301089417631797L, response.properties().revision()); + Assertions.assertEquals("ankjpdnjzh", response.properties().displayName()); + Assertions.assertEquals(8207738955383308872L, response.properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTests.java index a3f98ada655f5..fff7c44975876 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkDhcpConfigurationsListByWorkloadNetworkMockTes @Test public void testListByWorkloadNetwork() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"xa\",\"segments\":[\"yaipidsda\"],\"provisioningState\":\"Updating\",\"revision\":7630151299469052576},\"id\":\"um\",\"name\":\"qwazlnqnmcjngzq\",\"type\":\"qxtbjwgnyf\"}]}"; + = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"fhpfeoajvgcxtx\",\"segments\":[\"heafidlt\",\"gsresmkssj\"],\"provisioningState\":\"Canceled\",\"revision\":8087831620363185447},\"id\":\"kfwegprhptillu\",\"name\":\"biqtgdq\",\"type\":\"hm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByWorkloadNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworkDhcpConfigurations() - .listByWorkloadNetwork("qwpwyawbzasqbuc", "jg", com.azure.core.util.Context.NONE); + .listByWorkloadNetwork("bwnhhtql", "ehgpp", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xa", response.iterator().next().properties().displayName()); - Assertions.assertEquals(7630151299469052576L, response.iterator().next().properties().revision()); + Assertions.assertEquals("fhpfeoajvgcxtx", response.iterator().next().properties().displayName()); + Assertions.assertEquals(8087831620363185447L, response.iterator().next().properties().revision()); } } 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 index c1b5859b01dc1..b0e37493d43aa 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkDhcpEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpEntity model = BinaryData.fromString( - "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"hjkbegibtnmxieb\",\"segments\":[\"loayqcgw\",\"tzjuzgwyzmhtxo\",\"gmtsavjcbpwxqpsr\",\"nftguvriuhpr\"],\"provisioningState\":\"Deleting\",\"revision\":8091606100814503434}") + "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"kv\",\"segments\":[\"lmqkrhahvlj\",\"ahaquh\"],\"provisioningState\":\"Failed\",\"revision\":4716171323603349027}") .toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("hjkbegibtnmxieb", model.displayName()); - Assertions.assertEquals(8091606100814503434L, model.revision()); + Assertions.assertEquals("kv", model.displayName()); + Assertions.assertEquals(4716171323603349027L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkDhcpEntity model - = new WorkloadNetworkDhcpEntity().withDisplayName("hjkbegibtnmxieb").withRevision(8091606100814503434L); + = new WorkloadNetworkDhcpEntity().withDisplayName("kv").withRevision(4716171323603349027L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("hjkbegibtnmxieb", model.displayName()); - Assertions.assertEquals(8091606100814503434L, model.revision()); + Assertions.assertEquals("kv", model.displayName()); + Assertions.assertEquals(4716171323603349027L, 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 index 6d77282ed74f4..5f5137d2db097 100644 --- 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 @@ -13,18 +13,18 @@ public final class WorkloadNetworkDhcpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpInner model = BinaryData.fromString( - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"h\",\"segments\":[\"znbmpowuwprzq\"],\"provisioningState\":\"Updating\",\"revision\":6373733976515318396},\"id\":\"pjmkhfxobbc\",\"name\":\"wsrtjriplrbpbe\",\"type\":\"tghfgblcgwxzvl\"}") + "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"uwbc\",\"segments\":[\"bmehh\"],\"provisioningState\":\"Deleting\",\"revision\":2958870513291350994},\"id\":\"rts\",\"name\":\"hspkdeemao\",\"type\":\"mx\"}") .toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("h", model.properties().displayName()); - Assertions.assertEquals(6373733976515318396L, model.properties().revision()); + Assertions.assertEquals("uwbc", model.properties().displayName()); + Assertions.assertEquals(2958870513291350994L, model.properties().revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner() - .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("h").withRevision(6373733976515318396L)); + .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("uwbc").withRevision(2958870513291350994L)); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("h", model.properties().displayName()); - Assertions.assertEquals(6373733976515318396L, model.properties().revision()); + Assertions.assertEquals("uwbc", model.properties().displayName()); + Assertions.assertEquals(2958870513291350994L, 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 new file mode 100644 index 0000000000000..2524648dd187c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpList; +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\":\"mgyudxytlmoyrxv\",\"segments\":[\"dw\"],\"provisioningState\":\"Building\",\"revision\":6478150774243714531},\"id\":\"zhlrqjb\",\"name\":\"ck\",\"type\":\"rlhrxs\"}],\"nextLink\":\"yvpycanuzbpzk\"}") + .toObject(WorkloadNetworkDhcpList.class); + Assertions.assertEquals("mgyudxytlmoyrxv", model.value().get(0).properties().displayName()); + Assertions.assertEquals(6478150774243714531L, model.value().get(0).properties().revision()); + Assertions.assertEquals("yvpycanuzbpzk", 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 index c21f6c8fa8554..ae22f0c35bcd6 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkDhcpRelayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpRelay model = BinaryData.fromString( - "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"cjrvxdjzlmwlxkv\",\"gfhzovawjvzunlut\",\"nnprn\",\"i\"],\"displayName\":\"ilpjzuaejxdult\",\"segments\":[\"bbtdzumvee\",\"gpw\",\"zuhkfpbsjyof\"],\"provisioningState\":\"Building\",\"revision\":1294807089782778037}") + "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"isgwbnbbeldawkz\",\"ali\"],\"displayName\":\"rqhakauha\",\"segments\":[\"fwxosowzxcu\",\"i\",\"jooxdjebw\"],\"provisioningState\":\"Succeeded\",\"revision\":7246200145127571189}") .toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("ilpjzuaejxdult", model.displayName()); - Assertions.assertEquals(1294807089782778037L, model.revision()); - Assertions.assertEquals("cjrvxdjzlmwlxkv", model.serverAddresses().get(0)); + Assertions.assertEquals("rqhakauha", model.displayName()); + Assertions.assertEquals(7246200145127571189L, model.revision()); + Assertions.assertEquals("isgwbnbbeldawkz", model.serverAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("ilpjzuaejxdult") - .withRevision(1294807089782778037L) - .withServerAddresses(Arrays.asList("cjrvxdjzlmwlxkv", "gfhzovawjvzunlut", "nnprn", "i")); + WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("rqhakauha") + .withRevision(7246200145127571189L) + .withServerAddresses(Arrays.asList("isgwbnbbeldawkz", "ali")); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("ilpjzuaejxdult", model.displayName()); - Assertions.assertEquals(1294807089782778037L, model.revision()); - Assertions.assertEquals("cjrvxdjzlmwlxkv", model.serverAddresses().get(0)); + Assertions.assertEquals("rqhakauha", model.displayName()); + Assertions.assertEquals(7246200145127571189L, model.revision()); + Assertions.assertEquals("isgwbnbbeldawkz", 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 index 5927824fdf33d..8517c0d6855b9 100644 --- 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 @@ -12,24 +12,24 @@ public final class WorkloadNetworkDhcpServerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpServer model = BinaryData.fromString( - "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"tayriwwroyqbex\",\"leaseTime\":398335028,\"displayName\":\"ibycno\",\"segments\":[\"nmefqsgzvahapj\"],\"provisioningState\":\"Failed\",\"revision\":1752139018010177019}") + "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"laexqp\",\"leaseTime\":3403871146459803360,\"displayName\":\"ws\",\"segments\":[\"gvxp\"],\"provisioningState\":\"Deleting\",\"revision\":7205793596406177755}") .toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("ibycno", model.displayName()); - Assertions.assertEquals(1752139018010177019L, model.revision()); - Assertions.assertEquals("tayriwwroyqbex", model.serverAddress()); - Assertions.assertEquals(398335028, model.leaseTime()); + Assertions.assertEquals("ws", model.displayName()); + Assertions.assertEquals(7205793596406177755L, model.revision()); + Assertions.assertEquals("laexqp", model.serverAddress()); + Assertions.assertEquals(3403871146459803360L, model.leaseTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("ibycno") - .withRevision(1752139018010177019L) - .withServerAddress("tayriwwroyqbex") - .withLeaseTime(398335028); + WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("ws") + .withRevision(7205793596406177755L) + .withServerAddress("laexqp") + .withLeaseTime(3403871146459803360L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("ibycno", model.displayName()); - Assertions.assertEquals(1752139018010177019L, model.revision()); - Assertions.assertEquals("tayriwwroyqbex", model.serverAddress()); - Assertions.assertEquals(398335028, model.leaseTime()); + Assertions.assertEquals("ws", model.displayName()); + Assertions.assertEquals(7205793596406177755L, model.revision()); + Assertions.assertEquals("laexqp", model.serverAddress()); + Assertions.assertEquals(3403871146459803360L, 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 index d75a9d6cbc0cc..da403e9b2681e 100644 --- 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 @@ -14,30 +14,30 @@ public final class WorkloadNetworkDnsServiceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"vvqfovljxyws\",\"dnsServiceIp\":\"syrsndsytgadgvra\",\"defaultDnsZone\":\"en\",\"fqdnZones\":[\"zar\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":4399358999277003826},\"id\":\"acewiipfpubjibw\",\"name\":\"iftohqkvpu\",\"type\":\"ksgplsa\"}") + "{\"properties\":{\"displayName\":\"utiiswacf\",\"dnsServiceIp\":\"dkzzewkfvhqcrail\",\"defaultDnsZone\":\"n\",\"fqdnZones\":[\"uflrwd\",\"hdlxyjrxsagafcn\",\"hgw\"],\"logLevel\":\"WARNING\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3702419407947008695},\"id\":\"kcvqvpke\",\"name\":\"dcvd\",\"type\":\"hvoodsotbobzd\"}") .toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("vvqfovljxyws", model.displayName()); - Assertions.assertEquals("syrsndsytgadgvra", model.dnsServiceIp()); - Assertions.assertEquals("en", model.defaultDnsZone()); - Assertions.assertEquals("zar", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(4399358999277003826L, model.revision()); + Assertions.assertEquals("utiiswacf", model.displayName()); + Assertions.assertEquals("dkzzewkfvhqcrail", model.dnsServiceIp()); + Assertions.assertEquals("n", model.defaultDnsZone()); + Assertions.assertEquals("uflrwd", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); + Assertions.assertEquals(3702419407947008695L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("vvqfovljxyws") - .withDnsServiceIp("syrsndsytgadgvra") - .withDefaultDnsZone("en") - .withFqdnZones(Arrays.asList("zar")) - .withLogLevel(DnsServiceLogLevelEnum.DEBUG) - .withRevision(4399358999277003826L); + WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("utiiswacf") + .withDnsServiceIp("dkzzewkfvhqcrail") + .withDefaultDnsZone("n") + .withFqdnZones(Arrays.asList("uflrwd", "hdlxyjrxsagafcn", "hgw")) + .withLogLevel(DnsServiceLogLevelEnum.WARNING) + .withRevision(3702419407947008695L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("vvqfovljxyws", model.displayName()); - Assertions.assertEquals("syrsndsytgadgvra", model.dnsServiceIp()); - Assertions.assertEquals("en", model.defaultDnsZone()); - Assertions.assertEquals("zar", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(4399358999277003826L, model.revision()); + Assertions.assertEquals("utiiswacf", model.displayName()); + Assertions.assertEquals("dkzzewkfvhqcrail", model.dnsServiceIp()); + Assertions.assertEquals("n", model.defaultDnsZone()); + Assertions.assertEquals("uflrwd", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); + Assertions.assertEquals(3702419407947008695L, 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 index 4ad62e576e23d..18344793c00e5 100644 --- 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 @@ -14,30 +14,30 @@ public final class WorkloadNetworkDnsServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceProperties model = BinaryData.fromString( - "{\"displayName\":\"ynfs\",\"dnsServiceIp\":\"ljphuopxodl\",\"defaultDnsZone\":\"ynt\",\"fqdnZones\":[\"ihleos\",\"swsrms\",\"yzrpzbchckqqzq\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":335810871861495992}") + "{\"displayName\":\"cjwvn\",\"dnsServiceIp\":\"ld\",\"defaultDnsZone\":\"gx\",\"fqdnZones\":[\"slpmutwuo\",\"grpkhjwniyqs\",\"uicpd\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":2377355799268639179}") .toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("ynfs", model.displayName()); - Assertions.assertEquals("ljphuopxodl", model.dnsServiceIp()); - Assertions.assertEquals("ynt", model.defaultDnsZone()); - Assertions.assertEquals("ihleos", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); - Assertions.assertEquals(335810871861495992L, model.revision()); + Assertions.assertEquals("cjwvn", model.displayName()); + Assertions.assertEquals("ld", model.dnsServiceIp()); + Assertions.assertEquals("gx", model.defaultDnsZone()); + Assertions.assertEquals("slpmutwuo", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); + Assertions.assertEquals(2377355799268639179L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("ynfs") - .withDnsServiceIp("ljphuopxodl") - .withDefaultDnsZone("ynt") - .withFqdnZones(Arrays.asList("ihleos", "swsrms", "yzrpzbchckqqzq")) - .withLogLevel(DnsServiceLogLevelEnum.ERROR) - .withRevision(335810871861495992L); + WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("cjwvn") + .withDnsServiceIp("ld") + .withDefaultDnsZone("gx") + .withFqdnZones(Arrays.asList("slpmutwuo", "grpkhjwniyqs", "uicpd")) + .withLogLevel(DnsServiceLogLevelEnum.DEBUG) + .withRevision(2377355799268639179L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("ynfs", model.displayName()); - Assertions.assertEquals("ljphuopxodl", model.dnsServiceIp()); - Assertions.assertEquals("ynt", model.defaultDnsZone()); - Assertions.assertEquals("ihleos", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); - Assertions.assertEquals(335810871861495992L, model.revision()); + Assertions.assertEquals("cjwvn", model.displayName()); + Assertions.assertEquals("ld", model.dnsServiceIp()); + Assertions.assertEquals("gx", model.defaultDnsZone()); + Assertions.assertEquals("slpmutwuo", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); + Assertions.assertEquals(2377355799268639179L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java index 903486f050d26..d5f926af9c810 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworkDnsServicesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"lafcbahh\",\"dnsServiceIp\":\"pofoi\",\"defaultDnsZone\":\"w\",\"fqdnZones\":[\"lkmkkholvdndvi\",\"uogphuartvtiuky\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2106546841040847875},\"id\":\"xhk\",\"name\":\"jqirwrw\",\"type\":\"ooxf\"}"; + = "{\"properties\":{\"displayName\":\"yqo\",\"dnsServiceIp\":\"p\",\"defaultDnsZone\":\"xwdofdb\",\"fqdnZones\":[\"xeiiq\",\"imht\",\"wwinhehf\",\"pofvwb\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":511267805093926522},\"id\":\"qvxkd\",\"name\":\"vqihebwtswbzuwf\",\"type\":\"duragegizvc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,21 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsService response = manager.workloadNetworkDnsServices() - .define("cvclxynpdk") - .withExistingPrivateCloud("zcugswvxwlmzqw", "vtxnjmxmcuqud") - .withDisplayName("abuiy") - .withDnsServiceIp("buzphdugn") - .withDefaultDnsZone("knpgoxgjiuq") - .withFqdnZones(Arrays.asList("tozipqwj", "d", "urrxxgewpktv")) - .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(112541729358028808L) + .define("xm") + .withExistingPrivateCloud("cpopmxel", "wcltyjede") + .withDisplayName("kqscazuawxtzx") + .withDnsServiceIp("amwabzxrvxcushsp") + .withDefaultDnsZone("ivmxyasfl") + .withFqdnZones(Arrays.asList("gzwywak", "ihknsmjbl", "ljhlnymzotq", "ryuzcbmqqv")) + .withLogLevel(DnsServiceLogLevelEnum.INFO) + .withRevision(8142549908216654108L) .create(); - Assertions.assertEquals("lafcbahh", response.displayName()); - Assertions.assertEquals("pofoi", response.dnsServiceIp()); - Assertions.assertEquals("w", response.defaultDnsZone()); - Assertions.assertEquals("lkmkkholvdndvi", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, response.logLevel()); - Assertions.assertEquals(2106546841040847875L, response.revision()); + Assertions.assertEquals("yqo", response.displayName()); + Assertions.assertEquals("p", response.dnsServiceIp()); + Assertions.assertEquals("xwdofdb", response.defaultDnsZone()); + Assertions.assertEquals("xeiiq", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.logLevel()); + Assertions.assertEquals(511267805093926522L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java index 882e51a096dfa..c25b37e0e11ff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworkDnsServices() - .delete("mmkjsvthnwpztek", "vmribiat", "gplucfotangcfhny", com.azure.core.util.Context.NONE); + manager.workloadNetworkDnsServices().delete("aglkafhon", "juj", "ickpz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java index 2b0c15e325c79..6c3ed0f04057f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkDnsServicesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"lxxhljfp\",\"dnsServiceIp\":\"icrmnzh\",\"defaultDnsZone\":\"mqgjsxvpq\",\"fqdnZones\":[\"rmbodt\",\"s\",\"qgvriibakcla\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":8318985222878155880},\"id\":\"uzlwvsgmw\",\"name\":\"hqf\",\"type\":\"izvu\"}"; + = "{\"properties\":{\"displayName\":\"zid\",\"dnsServiceIp\":\"waabzmifrygzn\",\"defaultDnsZone\":\"axri\",\"fqdnZones\":[\"obgop\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":4400312787392536250},\"id\":\"ixynllxecwcrojp\",\"name\":\"slhcawjutifd\",\"type\":\"fmvigorqjbttzh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsService response = manager.workloadNetworkDnsServices() - .getWithResponse("vxcnqmxqps", "okmvkhlggd", "bemzqkzszuwi", com.azure.core.util.Context.NONE) + .getWithResponse("sovwxznptgoeiyb", "abpfhvfs", "kvntjlrigjkskyri", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lxxhljfp", response.displayName()); - Assertions.assertEquals("icrmnzh", response.dnsServiceIp()); - Assertions.assertEquals("mqgjsxvpq", response.defaultDnsZone()); - Assertions.assertEquals("rmbodt", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, response.logLevel()); - Assertions.assertEquals(8318985222878155880L, response.revision()); + Assertions.assertEquals("zid", response.displayName()); + Assertions.assertEquals("waabzmifrygzn", response.dnsServiceIp()); + Assertions.assertEquals("axri", response.defaultDnsZone()); + Assertions.assertEquals("obgop", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, response.logLevel()); + Assertions.assertEquals(4400312787392536250L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests.java index d1d2e58085dde..3706610e2304d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworkDnsServicesListByWorkloadNetworkMockTests { @Test public void testListByWorkloadNetwork() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"qivbgkcvkh\",\"dnsServiceIp\":\"vuqd\",\"defaultDnsZone\":\"voniypfp\",\"fqdnZones\":[\"pzgpxtivhj\",\"nidibgqjxg\",\"n\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":2222279634211271133},\"id\":\"mhha\",\"name\":\"wjrmzvuporqzd\",\"type\":\"uydzvk\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"sdaultxij\",\"dnsServiceIp\":\"mfqwa\",\"defaultDnsZone\":\"nqnm\",\"fqdnZones\":[\"gzqdqxtbjwgn\"],\"logLevel\":\"FATAL\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":1005110077026259439},\"id\":\"kzhajqglcfhm\",\"name\":\"rqryxynqn\",\"type\":\"rd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testListByWorkloadNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworkDnsServices() - .listByWorkloadNetwork("yxrxmunj", "xvglnkvxlxp", com.azure.core.util.Context.NONE); + .listByWorkloadNetwork("yexaoguy", "i", com.azure.core.util.Context.NONE); - Assertions.assertEquals("qivbgkcvkh", response.iterator().next().displayName()); - Assertions.assertEquals("vuqd", response.iterator().next().dnsServiceIp()); - Assertions.assertEquals("voniypfp", response.iterator().next().defaultDnsZone()); - Assertions.assertEquals("pzgpxtivhj", response.iterator().next().fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.iterator().next().logLevel()); - Assertions.assertEquals(2222279634211271133L, response.iterator().next().revision()); + Assertions.assertEquals("sdaultxij", response.iterator().next().displayName()); + Assertions.assertEquals("mfqwa", response.iterator().next().dnsServiceIp()); + Assertions.assertEquals("nqnm", response.iterator().next().defaultDnsZone()); + Assertions.assertEquals("gzqdqxtbjwgn", response.iterator().next().fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.iterator().next().logLevel()); + Assertions.assertEquals(1005110077026259439L, response.iterator().next().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 new file mode 100644 index 0000000000000..6b536cdc00c87 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServicesList; +import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; +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\":\"xe\",\"dnsServiceIp\":\"nzbtbhj\",\"defaultDnsZone\":\"lkfg\",\"fqdnZones\":[\"neuelfphsdyhtoz\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":5092229497552336172},\"id\":\"xzxcl\",\"name\":\"ithhqzon\",\"type\":\"sg\"}],\"nextLink\":\"hcohfwdsjnk\"}") + .toObject(WorkloadNetworkDnsServicesList.class); + Assertions.assertEquals("xe", model.value().get(0).displayName()); + Assertions.assertEquals("nzbtbhj", model.value().get(0).dnsServiceIp()); + Assertions.assertEquals("lkfg", model.value().get(0).defaultDnsZone()); + Assertions.assertEquals("neuelfphsdyhtoz", model.value().get(0).fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.value().get(0).logLevel()); + Assertions.assertEquals(5092229497552336172L, model.value().get(0).revision()); + Assertions.assertEquals("hcohfwdsjnk", 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 index 9d06e7514f5d1..595d674a2b4b8 100644 --- 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 @@ -13,30 +13,30 @@ public final class WorkloadNetworkDnsZoneInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"osphyoul\",\"domain\":[\"v\",\"ag\",\"rvimjwosytxitcsk\",\"cktqumiekkezzi\"],\"dnsServerIps\":[\"yf\"],\"sourceIp\":\"dgqggebdu\",\"dnsServices\":253317009,\"provisioningState\":\"Deleting\",\"revision\":2683403328100371700},\"id\":\"qfatpxllrxcyjm\",\"name\":\"a\",\"type\":\"su\"}") + "{\"properties\":{\"displayName\":\"smypyynpc\",\"domain\":[\"mnzgmwznmabi\",\"nsorgjhxbldt\",\"wwrlkdmtncv\",\"kotl\"],\"dnsServerIps\":[\"yhgsy\"],\"sourceIp\":\"ogjltdtbnnhad\",\"dnsServices\":2230966046874594524,\"provisioningState\":\"Canceled\",\"revision\":5398551830021510565},\"id\":\"nvpamq\",\"name\":\"x\",\"type\":\"queziky\"}") .toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("osphyoul", model.displayName()); - Assertions.assertEquals("v", model.domain().get(0)); - Assertions.assertEquals("yf", model.dnsServerIps().get(0)); - Assertions.assertEquals("dgqggebdu", model.sourceIp()); - Assertions.assertEquals(253317009, model.dnsServices()); - Assertions.assertEquals(2683403328100371700L, model.revision()); + Assertions.assertEquals("smypyynpc", model.displayName()); + Assertions.assertEquals("mnzgmwznmabi", model.domain().get(0)); + Assertions.assertEquals("yhgsy", model.dnsServerIps().get(0)); + Assertions.assertEquals("ogjltdtbnnhad", model.sourceIp()); + Assertions.assertEquals(2230966046874594524L, model.dnsServices()); + Assertions.assertEquals(5398551830021510565L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("osphyoul") - .withDomain(Arrays.asList("v", "ag", "rvimjwosytxitcsk", "cktqumiekkezzi")) - .withDnsServerIps(Arrays.asList("yf")) - .withSourceIp("dgqggebdu") - .withDnsServices(253317009) - .withRevision(2683403328100371700L); + WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("smypyynpc") + .withDomain(Arrays.asList("mnzgmwznmabi", "nsorgjhxbldt", "wwrlkdmtncv", "kotl")) + .withDnsServerIps(Arrays.asList("yhgsy")) + .withSourceIp("ogjltdtbnnhad") + .withDnsServices(2230966046874594524L) + .withRevision(5398551830021510565L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("osphyoul", model.displayName()); - Assertions.assertEquals("v", model.domain().get(0)); - Assertions.assertEquals("yf", model.dnsServerIps().get(0)); - Assertions.assertEquals("dgqggebdu", model.sourceIp()); - Assertions.assertEquals(253317009, model.dnsServices()); - Assertions.assertEquals(2683403328100371700L, model.revision()); + Assertions.assertEquals("smypyynpc", model.displayName()); + Assertions.assertEquals("mnzgmwznmabi", model.domain().get(0)); + Assertions.assertEquals("yhgsy", model.dnsServerIps().get(0)); + Assertions.assertEquals("ogjltdtbnnhad", model.sourceIp()); + Assertions.assertEquals(2230966046874594524L, model.dnsServices()); + Assertions.assertEquals(5398551830021510565L, 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 index df885a5a7156c..024e18631d993 100644 --- 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 @@ -13,30 +13,30 @@ public final class WorkloadNetworkDnsZonePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneProperties model = BinaryData.fromString( - "{\"displayName\":\"r\",\"domain\":[\"dmjsjqb\",\"hhyxxrw\",\"yc\",\"duhpk\"],\"dnsServerIps\":[\"ymareqnajxqugj\",\"ky\"],\"sourceIp\":\"beddgssofw\",\"dnsServices\":1153520576,\"provisioningState\":\"Deleting\",\"revision\":7998631817770989072}") + "{\"displayName\":\"gxk\",\"domain\":[\"atmelwui\"],\"dnsServerIps\":[\"cjzkzivgvvcna\",\"rhyrnxxmueed\",\"drd\"],\"sourceIp\":\"tkwqqtchealm\",\"dnsServices\":2875480604821792642,\"provisioningState\":\"Canceled\",\"revision\":2951445315314991952}") .toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("r", model.displayName()); - Assertions.assertEquals("dmjsjqb", model.domain().get(0)); - Assertions.assertEquals("ymareqnajxqugj", model.dnsServerIps().get(0)); - Assertions.assertEquals("beddgssofw", model.sourceIp()); - Assertions.assertEquals(1153520576, model.dnsServices()); - Assertions.assertEquals(7998631817770989072L, model.revision()); + Assertions.assertEquals("gxk", model.displayName()); + Assertions.assertEquals("atmelwui", model.domain().get(0)); + Assertions.assertEquals("cjzkzivgvvcna", model.dnsServerIps().get(0)); + Assertions.assertEquals("tkwqqtchealm", model.sourceIp()); + Assertions.assertEquals(2875480604821792642L, model.dnsServices()); + Assertions.assertEquals(2951445315314991952L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("r") - .withDomain(Arrays.asList("dmjsjqb", "hhyxxrw", "yc", "duhpk")) - .withDnsServerIps(Arrays.asList("ymareqnajxqugj", "ky")) - .withSourceIp("beddgssofw") - .withDnsServices(1153520576) - .withRevision(7998631817770989072L); + WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("gxk") + .withDomain(Arrays.asList("atmelwui")) + .withDnsServerIps(Arrays.asList("cjzkzivgvvcna", "rhyrnxxmueed", "drd")) + .withSourceIp("tkwqqtchealm") + .withDnsServices(2875480604821792642L) + .withRevision(2951445315314991952L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("r", model.displayName()); - Assertions.assertEquals("dmjsjqb", model.domain().get(0)); - Assertions.assertEquals("ymareqnajxqugj", model.dnsServerIps().get(0)); - Assertions.assertEquals("beddgssofw", model.sourceIp()); - Assertions.assertEquals(1153520576, model.dnsServices()); - Assertions.assertEquals(7998631817770989072L, model.revision()); + Assertions.assertEquals("gxk", model.displayName()); + Assertions.assertEquals("atmelwui", model.domain().get(0)); + Assertions.assertEquals("cjzkzivgvvcna", model.dnsServerIps().get(0)); + Assertions.assertEquals("tkwqqtchealm", model.sourceIp()); + Assertions.assertEquals(2875480604821792642L, model.dnsServices()); + Assertions.assertEquals(2951445315314991952L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java index 1a2f3302aa3cd..18c351eebba25 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkDnsZonesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"ilguooqjagmditg\",\"domain\":[\"ookjbsahrtdtpde\",\"qacsl\",\"otoebnfxofv\"],\"dnsServerIps\":[\"gdirazf\"],\"sourceIp\":\"ejwabmdujtmvco\",\"dnsServices\":2125473384,\"provisioningState\":\"Succeeded\",\"revision\":5623594261073250912},\"id\":\"u\",\"name\":\"hlkyqltqsrog\",\"type\":\"uwkffdjktsysid\"}"; + = "{\"properties\":{\"displayName\":\"aohdjh\",\"domain\":[\"z\"],\"dnsServerIps\":[\"coxpelnjeta\",\"ltsxoatf\",\"g\"],\"sourceIp\":\"npbs\",\"dnsServices\":887167575780894772,\"provisioningState\":\"Succeeded\",\"revision\":1298535123525566512},\"id\":\"mozi\",\"name\":\"m\",\"type\":\"pgawtxxpkyjcxcjx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,21 +32,21 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsZone response = manager.workloadNetworkDnsZones() - .define("o") - .withExistingPrivateCloud("dohzjq", "tu") - .withDisplayName("bxncnwfepbnw") - .withDomain(Arrays.asList("xjg")) - .withDnsServerIps(Arrays.asList("jbgdlfgtdysnaquf")) - .withSourceIp("bctqhamzjrwd") - .withDnsServices(605506053) - .withRevision(842034853108788587L) + .define("xgvelfclduccbird") + .withExistingPrivateCloud("onsts", "i") + .withDisplayName("wcobie") + .withDomain(Arrays.asList("mninwjizcilng", "gshejjtbxqmulux")) + .withDnsServerIps(Arrays.asList("zvners", "ycucrwnamikzeb", "qbsms", "ziqgfuh")) + .withSourceIp("zruswh") + .withDnsServices(5481092572149258052L) + .withRevision(6898352302048368719L) .create(); - Assertions.assertEquals("ilguooqjagmditg", response.displayName()); - Assertions.assertEquals("ookjbsahrtdtpde", response.domain().get(0)); - Assertions.assertEquals("gdirazf", response.dnsServerIps().get(0)); - Assertions.assertEquals("ejwabmdujtmvco", response.sourceIp()); - Assertions.assertEquals(2125473384, response.dnsServices()); - Assertions.assertEquals(5623594261073250912L, response.revision()); + Assertions.assertEquals("aohdjh", response.displayName()); + Assertions.assertEquals("z", response.domain().get(0)); + Assertions.assertEquals("coxpelnjeta", response.dnsServerIps().get(0)); + Assertions.assertEquals("npbs", response.sourceIp()); + Assertions.assertEquals(887167575780894772L, response.dnsServices()); + Assertions.assertEquals(1298535123525566512L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java index 2543a421a2669..09d8a85841991 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworkDnsZones() - .delete("cbuewmrswnjlxuz", "hwpusxj", "aqehg", com.azure.core.util.Context.NONE); + .delete("gehkfkimrtixokff", "yinljqe", "qwhix", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java index 034a4149e3f0f..8cbcc43f6bbfb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworkDnsZonesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"zonwpngajinnixj\",\"domain\":[\"tmjfjmyccxlzhcox\",\"vnekhenlusfnrdtj\"],\"dnsServerIps\":[\"r\",\"cq\"],\"sourceIp\":\"vidttgepuslvyjt\",\"dnsServices\":1750462834,\"provisioningState\":\"Deleting\",\"revision\":784595038382816064},\"id\":\"iesfuug\",\"name\":\"tuqfecjxeygtu\",\"type\":\"xu\"}"; + = "{\"properties\":{\"displayName\":\"wetnpsihc\",\"domain\":[\"zvaylptrsqqw\",\"tcmwqkchc\",\"waxfewzjkj\"],\"dnsServerIps\":[\"deqvhp\",\"ylkkshkbffmbm\",\"zjrgyww\"],\"sourceIp\":\"jx\",\"dnsServices\":7942160744300622603,\"provisioningState\":\"Failed\",\"revision\":4816022177216444981},\"id\":\"gaao\",\"name\":\"pttaqutd\",\"type\":\"wemxswvruunzz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsZone response = manager.workloadNetworkDnsZones() - .getWithResponse("rjvzuyt", "rmlmuowo", "bauiropi", com.azure.core.util.Context.NONE) + .getWithResponse("sgcrpfbcunezzce", "elfwy", "wl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zonwpngajinnixj", response.displayName()); - Assertions.assertEquals("tmjfjmyccxlzhcox", response.domain().get(0)); - Assertions.assertEquals("r", response.dnsServerIps().get(0)); - Assertions.assertEquals("vidttgepuslvyjt", response.sourceIp()); - Assertions.assertEquals(1750462834, response.dnsServices()); - Assertions.assertEquals(784595038382816064L, response.revision()); + Assertions.assertEquals("wetnpsihc", response.displayName()); + Assertions.assertEquals("zvaylptrsqqw", response.domain().get(0)); + Assertions.assertEquals("deqvhp", response.dnsServerIps().get(0)); + Assertions.assertEquals("jx", response.sourceIp()); + Assertions.assertEquals(7942160744300622603L, response.dnsServices()); + Assertions.assertEquals(4816022177216444981L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests.java index d77080298c123..ebbcfc84f3785 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkDnsZonesListByWorkloadNetworkMockTests { @Test public void testListByWorkloadNetwork() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"newmozqvb\",\"domain\":[\"ma\",\"hsycxhxzgaz\",\"taboidvmf\",\"hppubowsepdfgkmt\"],\"dnsServerIps\":[\"rngbtcjuahokqtob\",\"auxofshfph\",\"pnulaiywzej\",\"whslwkoj\"],\"sourceIp\":\"l\",\"dnsServices\":1259433506,\"provisioningState\":\"Failed\",\"revision\":5299549137810832231},\"id\":\"afgfugsnn\",\"name\":\"hyet\",\"type\":\"fypococtfjgti\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"kbsazgak\",\"domain\":[\"yrcmjdmspofap\",\"uhrylniofr\",\"gbzjedmstkv\"],\"dnsServerIps\":[\"xbcuiiznkt\"],\"sourceIp\":\"ansnvp\",\"dnsServices\":6971042774632852022,\"provisioningState\":\"Succeeded\",\"revision\":4456554415141615101},\"id\":\"z\",\"name\":\"kiwbuqnyoph\",\"type\":\"fy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testListByWorkloadNetwork() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworkDnsZones().listByWorkloadNetwork("i", "hx", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworkDnsZones() + .listByWorkloadNetwork("felisdjub", "gbqi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("newmozqvb", response.iterator().next().displayName()); - Assertions.assertEquals("ma", response.iterator().next().domain().get(0)); - Assertions.assertEquals("rngbtcjuahokqtob", response.iterator().next().dnsServerIps().get(0)); - Assertions.assertEquals("l", response.iterator().next().sourceIp()); - Assertions.assertEquals(1259433506, response.iterator().next().dnsServices()); - Assertions.assertEquals(5299549137810832231L, response.iterator().next().revision()); + Assertions.assertEquals("kbsazgak", response.iterator().next().displayName()); + Assertions.assertEquals("yrcmjdmspofap", response.iterator().next().domain().get(0)); + Assertions.assertEquals("xbcuiiznkt", response.iterator().next().dnsServerIps().get(0)); + Assertions.assertEquals("ansnvp", response.iterator().next().sourceIp()); + Assertions.assertEquals(6971042774632852022L, response.iterator().next().dnsServices()); + Assertions.assertEquals(4456554415141615101L, response.iterator().next().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 new file mode 100644 index 0000000000000..e774e2d7a96ba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZonesList; +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\":\"modfvuefywsbpfvm\",\"domain\":[\"rfouyftaakcpw\",\"yzvqt\"],\"dnsServerIps\":[\"bexkpzksmondj\"],\"sourceIp\":\"uxvypomgkopkwh\",\"dnsServices\":47183864428618035,\"provisioningState\":\"Canceled\",\"revision\":6027886219408436897},\"id\":\"smocmbq\",\"name\":\"qvmkcxo\",\"type\":\"apvhelxprgly\"},{\"properties\":{\"displayName\":\"dckcbc\",\"domain\":[\"rjxgciqib\",\"hos\",\"sdqrhzoymibmrq\",\"ibahwflus\"],\"dnsServerIps\":[\"mhrkwofyyvoqacp\",\"expbtg\",\"wbwo\",\"nwashrtd\"],\"sourceIp\":\"cnqxwbpokulpi\",\"dnsServices\":6830630218833714201,\"provisioningState\":\"Deleting\",\"revision\":1202571290361403211},\"id\":\"iobyu\",\"name\":\"erpqlpqwcciuqg\",\"type\":\"dbutauvfbtkuwhh\"},{\"properties\":{\"displayName\":\"k\",\"domain\":[\"xafnndlpichko\",\"mkcdyhbpkkpwdre\"],\"dnsServerIps\":[\"vvqfovljxyws\",\"w\",\"yrs\",\"dsytgadgvr\"],\"sourceIp\":\"aeneqnzarrwl\",\"dnsServices\":6003700384655384876,\"provisioningState\":\"Updating\",\"revision\":1802422075284970664},\"id\":\"e\",\"name\":\"iipfpubj\",\"type\":\"bwwift\"},{\"properties\":{\"displayName\":\"kvpuvksgplsaknyn\",\"domain\":[\"n\"],\"dnsServerIps\":[\"huopxodlqiynto\"],\"sourceIp\":\"ihleos\",\"dnsServices\":1042560535262747024,\"provisioningState\":\"Failed\",\"revision\":9060898955426619734},\"id\":\"rpzbchckqqzqi\",\"name\":\"xiy\",\"type\":\"uiizynke\"}],\"nextLink\":\"atrwyhqmibzyh\"}") + .toObject(WorkloadNetworkDnsZonesList.class); + Assertions.assertEquals("modfvuefywsbpfvm", model.value().get(0).displayName()); + Assertions.assertEquals("rfouyftaakcpw", model.value().get(0).domain().get(0)); + Assertions.assertEquals("bexkpzksmondj", model.value().get(0).dnsServerIps().get(0)); + Assertions.assertEquals("uxvypomgkopkwh", model.value().get(0).sourceIp()); + Assertions.assertEquals(47183864428618035L, model.value().get(0).dnsServices()); + Assertions.assertEquals(6027886219408436897L, model.value().get(0).revision()); + Assertions.assertEquals("atrwyhqmibzyh", 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 index 998a3a99afc6e..c2f559508cd7a 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkGatewayInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"ceopzfqrhhuaopp\",\"path\":\"qeqxo\"},\"id\":\"dahzxctobg\",\"name\":\"kdmoi\",\"type\":\"postmgrcfbunrm\"}") + "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"auwhvylwzbtdhx\",\"path\":\"znbmpowuwprzq\"},\"id\":\"eualupjmkhf\",\"name\":\"obbc\",\"type\":\"wsrtjriplrbpbe\"}") .toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("ceopzfqrhhuaopp", model.displayName()); + Assertions.assertEquals("auwhvylwzbtdhx", 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 new file mode 100644 index 0000000000000..d263d1eb89651 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayList; +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\":\"Failed\",\"displayName\":\"meue\",\"path\":\"vyhzceuojgjrwj\"},\"id\":\"iotwmcdytdxwit\",\"name\":\"nrjawgqwg\",\"type\":\"hniskxfbkpyc\"}],\"nextLink\":\"lwn\"}") + .toObject(WorkloadNetworkGatewayList.class); + Assertions.assertEquals("meue", model.value().get(0).displayName()); + Assertions.assertEquals("lwn", 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 index 023f04e0d34a7..8dcb6adc036ab 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkGatewayPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayProperties model - = BinaryData.fromString("{\"provisioningState\":\"Deleting\",\"displayName\":\"hkxbpv\",\"path\":\"mjh\"}") + = BinaryData.fromString("{\"provisioningState\":\"Updating\",\"displayName\":\"fgb\",\"path\":\"gw\"}") .toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("hkxbpv", model.displayName()); + Assertions.assertEquals("fgb", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java index c5a19991d2001..321e1a514438e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworkGatewaysGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"of\",\"path\":\"vuhrylni\"},\"id\":\"rz\",\"name\":\"bzjedmstk\",\"type\":\"nlvxbcuii\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"bfhfovvacqp\",\"path\":\"uodxesza\"},\"id\":\"elawumu\",\"name\":\"slzkwrrwoycqu\",\"type\":\"wyh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkGateway response = manager.workloadNetworkGateways() - .getWithResponse("gbqi", "kxkbsazgakgacyr", "m", com.azure.core.util.Context.NONE) + .getWithResponse("zhmkdasvflyh", "xcudchxgsr", "oldforobw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("of", response.displayName()); + Assertions.assertEquals("bfhfovvacqp", response.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkMockTests.java index ddc035ffc7012..139b24be66174 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListByWorkloadNetworkMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkGatewaysListByWorkloadNetworkMockTests { @Test public void testListByWorkloadNetwork() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"qpofvwbc\",\"path\":\"embnkbw\"},\"id\":\"vxkdivqihebwtswb\",\"name\":\"uwfmduragegizvc\",\"type\":\"felisdjub\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"izozsd\",\"path\":\"cxjmonfdgnwncyp\"},\"id\":\"w\",\"name\":\"ltv\",\"type\":\"qjctzenkeif\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByWorkloadNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworkGateways() - .listByWorkloadNetwork("fdbxiqxeiiqbim", "tmwwi", com.azure.core.util.Context.NONE); + .listByWorkloadNetwork("xlpm", "erbdk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("qpofvwbc", response.iterator().next().displayName()); + Assertions.assertEquals("izozsd", response.iterator().next().displayName()); } } 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 new file mode 100644 index 0000000000000..abe447675fb70 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkList; +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\":\"Building\"},\"id\":\"xzpuzycisp\",\"name\":\"qzahmgkbrp\",\"type\":\"y\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"uqqkpik\",\"name\":\"drgvtqagn\",\"type\":\"uynhijg\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"siarbutrcvpn\",\"name\":\"zzmhjrunmpxttd\",\"type\":\"hrbnlankxmyskpbh\"}],\"nextLink\":\"btkcxywnytnrsyn\"}") + .toObject(WorkloadNetworkList.class); + Assertions.assertEquals("btkcxywnytnrsyn", 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 index 0a51c4f358310..ba2f8da9bad0b 100644 --- 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 @@ -13,27 +13,27 @@ public final class WorkloadNetworkPortMirroringInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"d\",\"direction\":\"EGRESS\",\"source\":\"gnayqigynduh\",\"destination\":\"hqlkthumaqo\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":3264624170163981005},\"id\":\"r\",\"name\":\"gccymvaolpssl\",\"type\":\"lfmmdnbbglzpswi\"}") + "{\"properties\":{\"displayName\":\"xknalaulppg\",\"direction\":\"INGRESS\",\"source\":\"napnyiropuhpigv\",\"destination\":\"ylgqgitxmedjvcsl\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":1214544725492398973},\"id\":\"zhxgktrmgucn\",\"name\":\"pkteo\",\"type\":\"llwptfdy\"}") .toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("d", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); - Assertions.assertEquals("gnayqigynduh", model.source()); - Assertions.assertEquals("hqlkthumaqo", model.destination()); - Assertions.assertEquals(3264624170163981005L, model.revision()); + Assertions.assertEquals("xknalaulppg", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("napnyiropuhpigv", model.source()); + Assertions.assertEquals("ylgqgitxmedjvcsl", model.destination()); + Assertions.assertEquals(1214544725492398973L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("d") - .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("gnayqigynduh") - .withDestination("hqlkthumaqo") - .withRevision(3264624170163981005L); + WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("xknalaulppg") + .withDirection(PortMirroringDirectionEnum.INGRESS) + .withSource("napnyiropuhpigv") + .withDestination("ylgqgitxmedjvcsl") + .withRevision(1214544725492398973L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("d", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); - Assertions.assertEquals("gnayqigynduh", model.source()); - Assertions.assertEquals("hqlkthumaqo", model.destination()); - Assertions.assertEquals(3264624170163981005L, model.revision()); + Assertions.assertEquals("xknalaulppg", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("napnyiropuhpigv", model.source()); + Assertions.assertEquals("ylgqgitxmedjvcsl", model.destination()); + Assertions.assertEquals(1214544725492398973L, 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 new file mode 100644 index 0000000000000..dc6928bc6a1bd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringList; +import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; +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\":\"v\",\"direction\":\"EGRESS\",\"source\":\"begibtnmxiebwwa\",\"destination\":\"ayqcgw\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":4790866258005538380},\"id\":\"zmh\",\"name\":\"xongmtsavjcbpwxq\",\"type\":\"srknftguv\"},{\"properties\":{\"displayName\":\"hprwmdyv\",\"direction\":\"INGRESS\",\"source\":\"yriwwroyqb\",\"destination\":\"rmcqiby\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":6160997583833316786},\"id\":\"fqsgzvahapjy\",\"name\":\"hpvgqz\",\"type\":\"j\"},{\"properties\":{\"displayName\":\"djzlmwlx\",\"direction\":\"EGRESS\",\"source\":\"fhzovawjvzunluth\",\"destination\":\"prnxipeil\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":7642090703106785822},\"id\":\"ultskzbbtdz\",\"name\":\"mv\",\"type\":\"ekg\"},{\"properties\":{\"displayName\":\"zuhkfpbsjyof\",\"direction\":\"INGRESS\",\"source\":\"us\",\"destination\":\"touwaboekqv\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":2434745920403430654},\"id\":\"wyjsflhhcaalnjix\",\"name\":\"sxyawjoyaqcs\",\"type\":\"yjpkiidzyexz\"}],\"nextLink\":\"lixhnrztfol\"}") + .toObject(WorkloadNetworkPortMirroringList.class); + Assertions.assertEquals("v", model.value().get(0).displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.value().get(0).direction()); + Assertions.assertEquals("begibtnmxiebwwa", model.value().get(0).source()); + Assertions.assertEquals("ayqcgw", model.value().get(0).destination()); + Assertions.assertEquals(4790866258005538380L, model.value().get(0).revision()); + Assertions.assertEquals("lixhnrztfol", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java index 823d86da59682..aa6ccab44c2d6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkPortMirroringProfilesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"mxqhndvnoamldse\",\"direction\":\"EGRESS\",\"source\":\"djh\",\"destination\":\"lzok\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":947940587713808603},\"id\":\"eta\",\"name\":\"ltsxoatf\",\"type\":\"g\"}"; + = "{\"properties\":{\"displayName\":\"nkrrf\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"btijvacvbm\",\"destination\":\"bqqxlaj\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":4124520510189226193},\"id\":\"h\",\"name\":\"kuyxoafg\",\"type\":\"oqltfae\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,19 +32,19 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPortMirroring response = manager.workloadNetworkPortMirroringProfiles() - .define("gshejjtbxqmulux") - .withExistingPrivateCloud("wcobie", "stmninwjizcilng") - .withDisplayName("zvners") + .define("fnmdxotn") + .withExistingPrivateCloud("lzo", "hpc") + .withDisplayName("gugey") .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("crwnamikz") - .withDestination("rqbsmswziq") - .withRevision(6886133591151042666L) + .withSource("rkyui") + .withDestination("bsnmfpph") + .withRevision(3280820966134981534L) .create(); - Assertions.assertEquals("mxqhndvnoamldse", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); - Assertions.assertEquals("djh", response.source()); - Assertions.assertEquals("lzok", response.destination()); - Assertions.assertEquals(947940587713808603L, response.revision()); + Assertions.assertEquals("nkrrf", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.direction()); + Assertions.assertEquals("btijvacvbm", response.source()); + Assertions.assertEquals("bqqxlaj", response.destination()); + Assertions.assertEquals(4124520510189226193L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java index 76b5bdf848979..76f87478a1bdb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworkPortMirroringProfiles() - .delete("jqepqwhi", "monstshiyxgve", "fclduccbirdsv", com.azure.core.util.Context.NONE); + .delete("rzpasccbiuimzdly", "dfqwmkyoq", "fdvruz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java index e7fbb1d8b2de4..3b4bcba55d42c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"rgywwp\",\"direction\":\"INGRESS\",\"source\":\"nptfujgi\",\"destination\":\"aaoepttaqut\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":3740922293737514976},\"id\":\"ruunzzjgehkf\",\"name\":\"imrt\",\"type\":\"xokffqyin\"}"; + = "{\"properties\":{\"displayName\":\"qn\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"chrqb\",\"destination\":\"jrcg\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":8975438467720263747},\"id\":\"jumvqqolihrraio\",\"name\":\"aubrjtloq\",\"type\":\"fuojrngif\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPortMirroring response = manager.workloadNetworkPortMirroringProfiles() - .getWithResponse("cxwaxfewz", "kjexfdeqvhp", "ylkkshkbffmbm", com.azure.core.util.Context.NONE) + .getWithResponse("ttexoqqpwcyyufmh", "uncuw", "qspkcdqzhlctd", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("rgywwp", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.direction()); - Assertions.assertEquals("nptfujgi", response.source()); - Assertions.assertEquals("aaoepttaqut", response.destination()); - Assertions.assertEquals(3740922293737514976L, response.revision()); + Assertions.assertEquals("qn", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.direction()); + Assertions.assertEquals("chrqb", response.source()); + Assertions.assertEquals("jrcg", response.destination()); + Assertions.assertEquals(8975438467720263747L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMockTests.java index 4b4c1a1551242..7957f879cf914 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworkPortMirroringProfilesListByWorkloadNetworkMock @Test public void testListByWorkloadNetwork() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"yophz\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"gcrpfbcun\",\"destination\":\"zcezelfwyfwl\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":979869830822712459},\"id\":\"ihclafzv\",\"name\":\"ylptrsqqwztcm\",\"type\":\"qkc\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"iexzsrzpge\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"bb\",\"destination\":\"pgdakchzyvli\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":1136926754194157082},\"id\":\"ibn\",\"name\":\"mysu\",\"type\":\"swqrntvlwijp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testListByWorkloadNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworkPortMirroringProfiles() - .listByWorkloadNetwork("nktwfansnvpdibmi", "ostbzbkiwb", com.azure.core.util.Context.NONE); + .listByWorkloadNetwork("hnomdrkywuh", "svfuurutlwexxwl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yophz", response.iterator().next().displayName()); + Assertions.assertEquals("iexzsrzpge", response.iterator().next().displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.iterator().next().direction()); - Assertions.assertEquals("gcrpfbcun", response.iterator().next().source()); - Assertions.assertEquals("zcezelfwyfwl", response.iterator().next().destination()); - Assertions.assertEquals(979869830822712459L, response.iterator().next().revision()); + Assertions.assertEquals("bb", response.iterator().next().source()); + Assertions.assertEquals("pgdakchzyvli", response.iterator().next().destination()); + Assertions.assertEquals(1136926754194157082L, response.iterator().next().revision()); } } 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 index 5220f9af3fe52..62efeb475301b 100644 --- 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 @@ -13,28 +13,28 @@ public final class WorkloadNetworkPortMirroringPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringProperties model = BinaryData.fromString( - "{\"displayName\":\"mcwyhzdxssadb\",\"direction\":\"EGRESS\",\"source\":\"dfznudaodv\",\"destination\":\"bncblylpstdbhhx\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":4128477649983650964}") + "{\"displayName\":\"fqbuaceopzf\",\"direction\":\"INGRESS\",\"source\":\"uaopppcqeq\",\"destination\":\"lzdahzxctobgbkdm\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":753837388632017239}") .toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("mcwyhzdxssadb", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); - Assertions.assertEquals("dfznudaodv", model.source()); - Assertions.assertEquals("bncblylpstdbhhx", model.destination()); - Assertions.assertEquals(4128477649983650964L, model.revision()); + Assertions.assertEquals("fqbuaceopzf", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("uaopppcqeq", model.source()); + Assertions.assertEquals("lzdahzxctobgbkdm", model.destination()); + Assertions.assertEquals(753837388632017239L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPortMirroringProperties model - = new WorkloadNetworkPortMirroringProperties().withDisplayName("mcwyhzdxssadb") - .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("dfznudaodv") - .withDestination("bncblylpstdbhhx") - .withRevision(4128477649983650964L); + = new WorkloadNetworkPortMirroringProperties().withDisplayName("fqbuaceopzf") + .withDirection(PortMirroringDirectionEnum.INGRESS) + .withSource("uaopppcqeq") + .withDestination("lzdahzxctobgbkdm") + .withRevision(753837388632017239L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("mcwyhzdxssadb", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); - Assertions.assertEquals("dfznudaodv", model.source()); - Assertions.assertEquals("bncblylpstdbhhx", model.destination()); - Assertions.assertEquals(4128477649983650964L, model.revision()); + Assertions.assertEquals("fqbuaceopzf", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("uaopppcqeq", model.source()); + Assertions.assertEquals("lzdahzxctobgbkdm", model.destination()); + Assertions.assertEquals(753837388632017239L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java new file mode 100644 index 0000000000000..1284594ed1830 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPsList; +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\":\"gpiohgwxrtfudxe\",\"numberOfPublicIPs\":6514858021429691884,\"publicIPBlock\":\"agvrvmnpkuk\",\"provisioningState\":\"Building\"},\"id\":\"dblx\",\"name\":\"wi\",\"type\":\"fnjhfjxwmszkkfo\"}],\"nextLink\":\"eyfkzikfja\"}") + .toObject(WorkloadNetworkPublicIPsList.class); + Assertions.assertEquals("gpiohgwxrtfudxe", model.value().get(0).displayName()); + Assertions.assertEquals(6514858021429691884L, model.value().get(0).numberOfPublicIPs()); + Assertions.assertEquals("eyfkzikfja", 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 index 743c0574942d8..eae414653df60 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"ckw\",\"numberOfPublicIPs\":8886702787587006414,\"publicIPBlock\":\"hxx\",\"provisioningState\":\"Succeeded\"},\"id\":\"a\",\"name\":\"zfeqztppri\",\"type\":\"lxorjaltolmncws\"}") + "{\"properties\":{\"displayName\":\"a\",\"numberOfPublicIPs\":2753110503115800438,\"publicIPBlock\":\"zel\",\"provisioningState\":\"Canceled\"},\"id\":\"elsfeaen\",\"name\":\"abfatkl\",\"type\":\"dxbjhwuaanozj\"}") .toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("ckw", model.displayName()); - Assertions.assertEquals(8886702787587006414L, model.numberOfPublicIPs()); + Assertions.assertEquals("a", model.displayName()); + Assertions.assertEquals(2753110503115800438L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPublicIpInner model - = new WorkloadNetworkPublicIpInner().withDisplayName("ckw").withNumberOfPublicIPs(8886702787587006414L); + = new WorkloadNetworkPublicIpInner().withDisplayName("a").withNumberOfPublicIPs(2753110503115800438L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("ckw", model.displayName()); - Assertions.assertEquals(8886702787587006414L, model.numberOfPublicIPs()); + Assertions.assertEquals("a", model.displayName()); + Assertions.assertEquals(2753110503115800438L, 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 index e9e989ac76197..ec8cfb0dbb53f 100644 --- 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 @@ -12,19 +12,18 @@ public final class WorkloadNetworkPublicIpPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpProperties model = BinaryData.fromString( - "{\"displayName\":\"qwcsdbnwdcfhuc\",\"numberOfPublicIPs\":3846405596035643939,\"publicIPBlock\":\"vglsbjjca\",\"provisioningState\":\"Building\"}") + "{\"displayName\":\"ph\",\"numberOfPublicIPs\":5037944209655699604,\"publicIPBlock\":\"jrvxaglrv\",\"provisioningState\":\"Canceled\"}") .toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("qwcsdbnwdcfhuc", model.displayName()); - Assertions.assertEquals(3846405596035643939L, model.numberOfPublicIPs()); + Assertions.assertEquals("ph", model.displayName()); + Assertions.assertEquals(5037944209655699604L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPublicIpProperties model - = new WorkloadNetworkPublicIpProperties().withDisplayName("qwcsdbnwdcfhuc") - .withNumberOfPublicIPs(3846405596035643939L); + = new WorkloadNetworkPublicIpProperties().withDisplayName("ph").withNumberOfPublicIPs(5037944209655699604L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("qwcsdbnwdcfhuc", model.displayName()); - Assertions.assertEquals(3846405596035643939L, model.numberOfPublicIPs()); + Assertions.assertEquals("ph", model.displayName()); + Assertions.assertEquals(5037944209655699604L, model.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java index 388bc7b28d7d7..44c90ad83b04d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworkPublicIpsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"gbrouxddbh\",\"numberOfPublicIPs\":8860682105425516466,\"publicIPBlock\":\"azjzo\",\"provisioningState\":\"Succeeded\"},\"id\":\"hpdulon\",\"name\":\"acn\",\"type\":\"qwtehtuevr\"}"; + = "{\"properties\":{\"displayName\":\"asi\",\"numberOfPublicIPs\":9025506804447933074,\"publicIPBlock\":\"zjvkviirhgfgrws\",\"provisioningState\":\"Succeeded\"},\"id\":\"atzv\",\"name\":\"bglbyvict\",\"type\":\"tbrxkjz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPublicIp response = manager.workloadNetworkPublicIps() - .define("kzmkwklsnoxaxmqe") - .withExistingPrivateCloud("ucftbyrp", "rohkpigqfusu") - .withDisplayName("h") - .withNumberOfPublicIPs(2801708471199882926L) + .define("hdenxaulk") + .withExistingPrivateCloud("snkq", "hsyrqunj") + .withDisplayName("d") + .withNumberOfPublicIPs(2001869363644606291L) .create(); - Assertions.assertEquals("gbrouxddbh", response.displayName()); - Assertions.assertEquals(8860682105425516466L, response.numberOfPublicIPs()); + Assertions.assertEquals("asi", response.displayName()); + Assertions.assertEquals(9025506804447933074L, response.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java index 8cf1bed18d8fa..54aedce5313a8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworkPublicIps().delete("g", "lnlg", "trwahzj", com.azure.core.util.Context.NONE); + manager.workloadNetworkPublicIps().delete("baxk", "eytu", "lbfjkwr", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java index c94ea8661c1d5..de0980506034b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworkPublicIpsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"xhlw\",\"numberOfPublicIPs\":1003428665455506608,\"publicIPBlock\":\"qrsxyp\",\"provisioningState\":\"Canceled\"},\"id\":\"y\",\"name\":\"nchrszizoyu\",\"type\":\"lyetndnbfqygg\"}"; + = "{\"properties\":{\"displayName\":\"bwln\",\"numberOfPublicIPs\":6785534445230421786,\"publicIPBlock\":\"e\",\"provisioningState\":\"Deleting\"},\"id\":\"qavbpdqmj\",\"name\":\"lyyzglgouwtlmjj\",\"type\":\"uojqt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPublicIp response = manager.workloadNetworkPublicIps() - .getWithResponse("axpunjqikczvv", "tacgxmfc", "serxht", com.azure.core.util.Context.NONE) + .getWithResponse("hjm", "nnbsoqeqa", "arvlagunbt", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xhlw", response.displayName()); - Assertions.assertEquals(1003428665455506608L, response.numberOfPublicIPs()); + Assertions.assertEquals("bwln", response.displayName()); + Assertions.assertEquals(6785534445230421786L, response.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests.java index 787645e89c44b..1b35f54e6e291 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkPublicIpsListByWorkloadNetworkMockTests { @Test public void testListByWorkloadNetwork() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"ikayiansharuj\",\"numberOfPublicIPs\":4425702641866794545,\"publicIPBlock\":\"fzyjqt\",\"provisioningState\":\"Building\"},\"id\":\"pqhjpenuygbqeqq\",\"name\":\"kewvnqv\",\"type\":\"dlguaucmfdjwn\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"oxuztrksx\",\"numberOfPublicIPs\":6940085023434351835,\"publicIPBlock\":\"cpfnznthjtwkja\",\"provisioningState\":\"Deleting\"},\"id\":\"uzvoamktcqiosm\",\"name\":\"bzahgxqd\",\"type\":\"yrtltlaprltzkat\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByWorkloadNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworkPublicIps() - .listByWorkloadNetwork("vclglxnfuij", "kbusqo", com.azure.core.util.Context.NONE); + .listByWorkloadNetwork("rytfmpcycil", "mcayk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ikayiansharuj", response.iterator().next().displayName()); - Assertions.assertEquals(4425702641866794545L, response.iterator().next().numberOfPublicIPs()); + Assertions.assertEquals("oxuztrksx", response.iterator().next().displayName()); + Assertions.assertEquals(6940085023434351835L, response.iterator().next().numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java index d56abb7ae2b85..04ca5b8e767a6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworkSegmentsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"ejnhlbkpb\",\"connectedGateway\":\"cpilj\",\"subnet\":{\"dhcpRanges\":[\"vechndbnwiehole\"],\"gatewayAddress\":\"wiuub\"},\"portVif\":[{\"portName\":\"sfapaqtferrq\"},{\"portName\":\"x\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":1053026358378114507},\"id\":\"og\",\"name\":\"qnobp\",\"type\":\"dcdab\"}"; + = "{\"properties\":{\"displayName\":\"lcdisd\",\"connectedGateway\":\"fj\",\"subnet\":{\"dhcpRanges\":[\"g\",\"rwhryvycytd\"],\"gatewayAddress\":\"xgccknfnw\"},\"portVif\":[{\"portName\":\"vpdvjdhttzae\"},{\"portName\":\"dxihc\"},{\"portName\":\"phkmcrjdqnsdfz\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":1112930021934577453},\"id\":\"dgh\",\"name\":\"jeuut\",\"type\":\"wxezwzhok\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,20 +33,19 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkSegment response = manager.workloadNetworkSegments() - .define("pcvhdbevwqqxeys") - .withExistingPrivateCloud("dhohsdtmcdzsuf", "ohdxbzlmcmu") - .withDisplayName("qzinkfkbg") - .withConnectedGateway("bowxe") - .withSubnet(new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("jmygvk", "qkjjeokbz", "fezrx", "czurtlei")) - .withGatewayAddress("xbkwv")) - .withRevision(7609604165307370108L) + .define("tnsi") + .withExistingPrivateCloud("slhhxudbxv", "d") + .withDisplayName("hzmme") + .withConnectedGateway("kdlpa") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("x", "a", "lc", "xwmdboxd")) + .withGatewayAddress("sftufqobrjlna")) + .withRevision(7910183506498938441L) .create(); - Assertions.assertEquals("ejnhlbkpb", response.displayName()); - Assertions.assertEquals("cpilj", response.connectedGateway()); - Assertions.assertEquals("vechndbnwiehole", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("wiuub", response.subnet().gatewayAddress()); - Assertions.assertEquals(1053026358378114507L, response.revision()); + Assertions.assertEquals("lcdisd", response.displayName()); + Assertions.assertEquals("fj", response.connectedGateway()); + Assertions.assertEquals("g", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("xgccknfnw", response.subnet().gatewayAddress()); + Assertions.assertEquals(1112930021934577453L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java index ca616dd56d29b..b0df9ee9dbaff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java @@ -27,8 +27,7 @@ public void testDeleteSegment() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworkSegments() - .deleteSegment("bdb", "qgqqihedsvqwthmk", "ibcysihsgqc", com.azure.core.util.Context.NONE); + manager.workloadNetworkSegments().deleteSegment("ecdmdqbwpy", "q", "gsfjac", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java index eb12ae795dc3d..20f93d17ce03d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworkSegmentsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"qdsmexiit\",\"connectedGateway\":\"uxtyasiibmi\",\"subnet\":{\"dhcpRanges\":[\"ustgnljhnmgixhc\",\"avmqfoudor\",\"cgyypro\"],\"gatewayAddress\":\"ypundmbxhugc\"},\"portVif\":[{\"portName\":\"vlgo\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":4613723734586965909},\"id\":\"zfjltfvnzcyjto\",\"name\":\"p\",\"type\":\"opv\"}"; + = "{\"properties\":{\"displayName\":\"erteeammxqiekk\",\"connectedGateway\":\"ddrtkgdojb\",\"subnet\":{\"dhcpRanges\":[\"vrefdeesv\"],\"gatewayAddress\":\"uij\"},\"portVif\":[{\"portName\":\"s\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":4136420798110514219},\"id\":\"awddjibab\",\"name\":\"vit\",\"type\":\"tvtzeexavoxtfg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkSegment response = manager.workloadNetworkSegments() - .getWithResponse("linmfgv", "irpghriypoqeyh", "qhykprlpyzn", com.azure.core.util.Context.NONE) + .getWithResponse("svxeizzgwklnsr", "ffeycx", "ktp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qdsmexiit", response.displayName()); - Assertions.assertEquals("uxtyasiibmi", response.connectedGateway()); - Assertions.assertEquals("ustgnljhnmgixhc", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("ypundmbxhugc", response.subnet().gatewayAddress()); - Assertions.assertEquals(4613723734586965909L, response.revision()); + Assertions.assertEquals("erteeammxqiekk", response.displayName()); + Assertions.assertEquals("ddrtkgdojb", response.connectedGateway()); + Assertions.assertEquals("vrefdeesv", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("uij", response.subnet().gatewayAddress()); + Assertions.assertEquals(4136420798110514219L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkMockTests.java index 86673a6fcd9ba..c8fb4c12d90ca 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListByWorkloadNetworkMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkSegmentsListByWorkloadNetworkMockTests { @Test public void testListByWorkloadNetwork() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"phojeevyhy\",\"connectedGateway\":\"gzfc\",\"subnet\":{\"dhcpRanges\":[\"mfg\",\"eglqgleohibetn\",\"uankrrfxeeeb\",\"ij\"],\"gatewayAddress\":\"cvbmqzb\"},\"portVif\":[{\"portName\":\"aj\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":4124520510189226193},\"id\":\"h\",\"name\":\"kuyxoafg\",\"type\":\"oqltfae\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"kjsqzhzbezkgi\",\"connectedGateway\":\"idxas\",\"subnet\":{\"dhcpRanges\":[\"yvvjskgfmo\",\"wa\",\"pqg\",\"tjeaahhvjhh\"],\"gatewayAddress\":\"kzyb\"},\"portVif\":[{\"portName\":\"dj\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":8248669428764587059},\"id\":\"evblbje\",\"name\":\"nljlageuaulx\",\"type\":\"nsmjbnkppxynen\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testListByWorkloadNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworkSegments() - .listByWorkloadNetwork("dgug", "yzihgrkyuizabsn", com.azure.core.util.Context.NONE); + .listByWorkloadNetwork("omfaj", "wasqvdaeyyg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("phojeevyhy", response.iterator().next().displayName()); - Assertions.assertEquals("gzfc", response.iterator().next().connectedGateway()); - Assertions.assertEquals("mfg", response.iterator().next().subnet().dhcpRanges().get(0)); - Assertions.assertEquals("cvbmqzb", response.iterator().next().subnet().gatewayAddress()); - Assertions.assertEquals(4124520510189226193L, response.iterator().next().revision()); + Assertions.assertEquals("kjsqzhzbezkgi", response.iterator().next().displayName()); + Assertions.assertEquals("idxas", response.iterator().next().connectedGateway()); + Assertions.assertEquals("yvvjskgfmo", response.iterator().next().subnet().dhcpRanges().get(0)); + Assertions.assertEquals("kzyb", response.iterator().next().subnet().gatewayAddress()); + Assertions.assertEquals(8248669428764587059L, response.iterator().next().revision()); } } 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 new file mode 100644 index 0000000000000..e0d5505ca2cad --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentsList; +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\":\"ybyxc\",\"connectedGateway\":\"clha\",\"subnet\":{\"dhcpRanges\":[\"abphlw\",\"qlfktsths\",\"cocmnyyaztt\"],\"gatewayAddress\":\"wwrq\"},\"portVif\":[{\"portName\":\"ckzywbiexzfeyue\"},{\"portName\":\"ibx\"},{\"portName\":\"wbhqwal\"},{\"portName\":\"zyoxaepdkzjan\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3067424612233139925},\"id\":\"v\",\"name\":\"bniwdj\",\"type\":\"wz\"},{\"properties\":{\"displayName\":\"bpg\",\"connectedGateway\":\"ytxhp\",\"subnet\":{\"dhcpRanges\":[\"pfza\",\"glcuhxwtctyqi\",\"lbbovplw\"],\"gatewayAddress\":\"hvgyuguosvmk\"},\"portVif\":[{\"portName\":\"qukkfp\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":6280051526633281163},\"id\":\"zkd\",\"name\":\"slpvlop\",\"type\":\"i\"}],\"nextLink\":\"ghxpkdw\"}") + .toObject(WorkloadNetworkSegmentsList.class); + Assertions.assertEquals("ybyxc", model.value().get(0).displayName()); + Assertions.assertEquals("clha", model.value().get(0).connectedGateway()); + Assertions.assertEquals("abphlw", model.value().get(0).subnet().dhcpRanges().get(0)); + Assertions.assertEquals("wwrq", model.value().get(0).subnet().gatewayAddress()); + Assertions.assertEquals(3067424612233139925L, model.value().get(0).revision()); + Assertions.assertEquals("ghxpkdw", 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 index ff9bb4be22f70..d59b437cb8cf1 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkVMGroupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"bmnzbtbhjpgl\",\"members\":[\"ohdneuel\",\"phsdyhto\",\"fikdowwqu\",\"v\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":9091677111595049669},\"id\":\"hqzonosggbhcoh\",\"name\":\"wdsjnkalju\",\"type\":\"iiswacffgdkzze\"}") + "{\"properties\":{\"displayName\":\"fqqnvwpmqtaruo\",\"members\":[\"kcjhwqytjrybnwj\",\"wgdrjervnaenqp\",\"hin\",\"oygmift\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":1265885080326792756},\"id\":\"nayqi\",\"name\":\"ynduha\",\"type\":\"hqlkthumaqo\"}") .toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("bmnzbtbhjpgl", model.displayName()); - Assertions.assertEquals("ohdneuel", model.members().get(0)); - Assertions.assertEquals(9091677111595049669L, model.revision()); + Assertions.assertEquals("fqqnvwpmqtaruo", model.displayName()); + Assertions.assertEquals("kcjhwqytjrybnwj", model.members().get(0)); + Assertions.assertEquals(1265885080326792756L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("bmnzbtbhjpgl") - .withMembers(Arrays.asList("ohdneuel", "phsdyhto", "fikdowwqu", "v")) - .withRevision(9091677111595049669L); + WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("fqqnvwpmqtaruo") + .withMembers(Arrays.asList("kcjhwqytjrybnwj", "wgdrjervnaenqp", "hin", "oygmift")) + .withRevision(1265885080326792756L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("bmnzbtbhjpgl", model.displayName()); - Assertions.assertEquals("ohdneuel", model.members().get(0)); - Assertions.assertEquals(9091677111595049669L, model.revision()); + Assertions.assertEquals("fqqnvwpmqtaruo", model.displayName()); + Assertions.assertEquals("kcjhwqytjrybnwj", model.members().get(0)); + Assertions.assertEquals(1265885080326792756L, 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 index f1b40cfe70a9c..dfed30858cd42 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkVMGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupProperties model = BinaryData.fromString( - "{\"displayName\":\"fvhqc\",\"members\":[\"lvpnpp\",\"uflrwd\",\"hdlxyjrxsagafcn\",\"hgw\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":8610358802606955668}") + "{\"displayName\":\"gycdu\",\"members\":[\"tgccymvaolpss\"],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":940610692718193227}") .toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("fvhqc", model.displayName()); - Assertions.assertEquals("lvpnpp", model.members().get(0)); - Assertions.assertEquals(8610358802606955668L, model.revision()); + Assertions.assertEquals("gycdu", model.displayName()); + Assertions.assertEquals("tgccymvaolpss", model.members().get(0)); + Assertions.assertEquals(940610692718193227L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("fvhqc") - .withMembers(Arrays.asList("lvpnpp", "uflrwd", "hdlxyjrxsagafcn", "hgw")) - .withRevision(8610358802606955668L); + WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("gycdu") + .withMembers(Arrays.asList("tgccymvaolpss")) + .withRevision(940610692718193227L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("fvhqc", model.displayName()); - Assertions.assertEquals("lvpnpp", model.members().get(0)); - Assertions.assertEquals(8610358802606955668L, model.revision()); + Assertions.assertEquals("gycdu", model.displayName()); + Assertions.assertEquals("tgccymvaolpss", model.members().get(0)); + Assertions.assertEquals(940610692718193227L, 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 new file mode 100644 index 0000000000000..2f8d1b6195561 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupsList; +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\":\"fbunrmfqjhhk\",\"members\":[\"vjymjhxxjyngud\",\"vkr\",\"swbxqz\",\"szjfauvjfdxxivet\"],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":3137986994872936614},\"id\":\"qmcbxvwvxyslqbhs\",\"name\":\"xoblytkbl\",\"type\":\"pe\"},{\"properties\":{\"displayName\":\"fbkrvrnsvs\",\"members\":[\"ohxcrsbfova\",\"rruvwbhsq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":2319304863641210663},\"id\":\"rxbpyb\",\"name\":\"rfbjf\",\"type\":\"twss\"}],\"nextLink\":\"ftpvjzbexil\"}") + .toObject(WorkloadNetworkVMGroupsList.class); + Assertions.assertEquals("fbunrmfqjhhk", model.value().get(0).displayName()); + Assertions.assertEquals("vjymjhxxjyngud", model.value().get(0).members().get(0)); + Assertions.assertEquals(3137986994872936614L, model.value().get(0).revision()); + Assertions.assertEquals("ftpvjzbexil", 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 index a72b433411828..a167d2907bd09 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"dckcbc\",\"vmType\":\"REGULAR\"},\"id\":\"jxgciqibrh\",\"name\":\"sxsdqrhzoymibm\",\"type\":\"qyib\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xunkbebxmubyynt\",\"vmType\":\"SERVICE\"},\"id\":\"qtkoievs\",\"name\":\"otgqrlltmu\",\"type\":\"lauwzizxbmpgcjef\"}") .toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("dckcbc", model.displayName()); + Assertions.assertEquals("xunkbebxmubyynt", 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 index 4d351716af0ec..a87f6c2b74998 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineProperties model = BinaryData - .fromString("{\"provisioningState\":\"Failed\",\"displayName\":\"luszdtmhrkwof\",\"vmType\":\"REGULAR\"}") + .fromString("{\"provisioningState\":\"Building\",\"displayName\":\"vpbttd\",\"vmType\":\"REGULAR\"}") .toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("luszdtmhrkwof", model.displayName()); + Assertions.assertEquals("vpbttd", model.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java index 736bb08283a65..bce08f426d694 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworkVirtualMachinesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"kfkyjp\",\"vmType\":\"EDGE\"},\"id\":\"pssdfppyogtie\",\"name\":\"ujtv\",\"type\":\"zkc\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"gqqnobpudcda\",\"vmType\":\"EDGE\"},\"id\":\"pwyawbz\",\"name\":\"sqbuc\",\"type\":\"jg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVirtualMachine response = manager.workloadNetworkVirtualMachines() - .getWithResponse("iwhxqszdtmaajq", "huxy", "rjvmtygjbmzyosp", com.azure.core.util.Context.NONE) + .getWithResponse("efqsfapaqtferrqw", "x", "kmfx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("kfkyjp", response.displayName()); + Assertions.assertEquals("gqqnobpudcda", response.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests.java index 2cf2e2dc3167b..18e6d81ad59f1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkVirtualMachinesListByWorkloadNetworkMockTests @Test public void testListByWorkloadNetwork() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"zytqjtwhauunfpr\",\"vmType\":\"SERVICE\"},\"id\":\"tlxs\",\"name\":\"rpddouifamo\",\"type\":\"aziynknlqwzdv\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"prsnmokayzejn\",\"vmType\":\"REGULAR\"},\"id\":\"pbzpcpiljhahz\",\"name\":\"echndbnwieholew\",\"type\":\"wiuub\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByWorkloadNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworkVirtualMachines() - .listByWorkloadNetwork("smfcttuxuuyilfl", "oiquvrehmrnjhvs", com.azure.core.util.Context.NONE); + .listByWorkloadNetwork("utmzlbiojlvfhrbb", "neqvcwwyyurmo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zytqjtwhauunfpr", response.iterator().next().displayName()); + Assertions.assertEquals("prsnmokayzejn", response.iterator().next().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 new file mode 100644 index 0000000000000..ab236e256490a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachinesList; +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\":\"Canceled\",\"displayName\":\"pswiydmcwyh\",\"vmType\":\"EDGE\"},\"id\":\"sadbz\",\"name\":\"nvdfznuda\",\"type\":\"dvxzbncblylpst\"},{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"srzdzucerscdn\",\"vmType\":\"EDGE\"},\"id\":\"fiwjmygtdssls\",\"name\":\"tmweriofzpyq\",\"type\":\"emwabnet\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"h\",\"vmType\":\"SERVICE\"},\"id\":\"vwiwubmwmbesld\",\"name\":\"k\",\"type\":\"wtppjflcxogaoko\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ikvmkqzeqqk\",\"vmType\":\"EDGE\"},\"id\":\"zxmhhvhgu\",\"name\":\"eodkwobda\",\"type\":\"xtibqdxbxwakbog\"}],\"nextLink\":\"ndlkzgxhurip\"}") + .toObject(WorkloadNetworkVirtualMachinesList.class); + Assertions.assertEquals("pswiydmcwyh", model.value().get(0).displayName()); + Assertions.assertEquals("ndlkzgxhurip", model.nextLink()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java index ceeaa34347225..dc96456a3cbe4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkVmGroupsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"ctbrxkjzwrgxffm\",\"members\":[\"wfbkgozxwo\",\"dby\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":8453153522791825173},\"id\":\"apxbi\",\"name\":\"gn\",\"type\":\"gjkn\"}"; + = "{\"properties\":{\"displayName\":\"xcczurtl\",\"members\":[\"q\",\"bkwvzg\",\"zvd\",\"bzdixzmq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":2317307583598027540},\"id\":\"hewjptmcgsbost\",\"name\":\"eln\",\"type\":\"la\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVMGroup response = manager.workloadNetworkVmGroups() - .define("xuckpggqoweyir") - .withExistingPrivateCloud("hdenxaulk", "akdkifmjnnawtqab") - .withDisplayName("isngwflqqmpizru") - .withMembers(Arrays.asList("qxpxiwfcngjsaa", "iixtmkzj")) - .withRevision(8321849396779286295L) + .define("vhdbevwqqxey") + .withExistingPrivateCloud("sufco", "dxbzlmcmuap") + .withDisplayName("nqzi") + .withMembers(Arrays.asList("kbg")) + .withRevision(2772661107055529324L) .create(); - Assertions.assertEquals("ctbrxkjzwrgxffm", response.displayName()); - Assertions.assertEquals("wfbkgozxwo", response.members().get(0)); - Assertions.assertEquals(8453153522791825173L, response.revision()); + Assertions.assertEquals("xcczurtl", response.displayName()); + Assertions.assertEquals("q", response.members().get(0)); + Assertions.assertEquals(2317307583598027540L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java index 39c77b84dcd7f..127839ed43657 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworkVmGroups().delete("ytunlbfjkwr", "snkq", "hsyrqunj", com.azure.core.util.Context.NONE); + manager.workloadNetworkVmGroups().delete("cysihs", "qcwdhoh", "dtmcd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java index 7613cee371dd2..25bbd0ef643d7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class WorkloadNetworkVmGroupsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"qeqala\",\"members\":[\"agunbtgfebw\",\"nbmhyree\"],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":1466138960999741534},\"id\":\"qmjxlyyzglgouwtl\",\"name\":\"jjyuojqtobax\",\"type\":\"j\"}"; + = "{\"properties\":{\"displayName\":\"ftpmdtzfjltfv\",\"members\":[\"yj\",\"otp\",\"opv\"],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":3940441182690359236},\"id\":\"ihed\",\"name\":\"vqwt\",\"type\":\"mkyi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVMGroup response = manager.workloadNetworkVmGroups() - .getWithResponse("xqdlyrtltlapr", "tz", "atbhjmznn", com.azure.core.util.Context.NONE) + .getWithResponse("xhugcm", "k", "vlgo", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qeqala", response.displayName()); - Assertions.assertEquals("agunbtgfebw", response.members().get(0)); - Assertions.assertEquals(1466138960999741534L, response.revision()); + Assertions.assertEquals("ftpmdtzfjltfv", response.displayName()); + Assertions.assertEquals("yj", response.members().get(0)); + Assertions.assertEquals(3940441182690359236L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests.java index 67cca8c08652b..6301ad872b63e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests.java @@ -22,7 +22,7 @@ public final class WorkloadNetworkVmGroupsListByWorkloadNetworkMockTests { @Test public void testListByWorkloadNetwork() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"ky\",\"members\":[\"cjxgrytf\",\"pcycilrmcaykg\",\"noxuztrksx\",\"pndfcpfnznt\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":7745207921111221845},\"id\":\"rxuzvoam\",\"name\":\"tcqiosmg\",\"type\":\"zah\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"ykprlpyznu\",\"members\":[\"dsmexiitdfux\",\"yasiibmiy\",\"nnust\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":5871871887515703016},\"id\":\"xhcmavmqfoudo\",\"name\":\"hcgyyprotwyp\",\"type\":\"ndm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListByWorkloadNetwork() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworkVmGroups() - .listByWorkloadNetwork("pnpbswveflocc", "rmozihmipgawt", com.azure.core.util.Context.NONE); + .listByWorkloadNetwork("linmfgv", "irpghriypoqeyh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ky", response.iterator().next().displayName()); - Assertions.assertEquals("cjxgrytf", response.iterator().next().members().get(0)); - Assertions.assertEquals(7745207921111221845L, response.iterator().next().revision()); + Assertions.assertEquals("ykprlpyznu", response.iterator().next().displayName()); + Assertions.assertEquals("dsmexiitdfux", response.iterator().next().members().get(0)); + Assertions.assertEquals(5871871887515703016L, response.iterator().next().revision()); } } 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 index b549f0458ede3..e2bd5a1187dfe 100644 --- 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 @@ -20,7 +20,7 @@ public final class WorkloadNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"wboxjumvqqo\",\"name\":\"ihrraiouaub\",\"type\":\"jtlo\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"pmyyefrpmpdnqq\",\"name\":\"ka\",\"type\":\"ao\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetwork response = manager.workloadNetworks() - .getWithResponse("pchrqbn", "jrcg", com.azure.core.util.Context.NONE) + .getWithResponse("vcpwpgclrc", "vtsoxf", com.azure.core.util.Context.NONE) .getValue(); } 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 index c6859bf73891e..b22e288cdd161 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"yjdfqwmky\",\"name\":\"qufdvruzslzojh\",\"type\":\"ctfnmdxotng\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"kxlzyqdrfeg\",\"name\":\"ealzxwhcansymoyq\",\"type\":\"lwigdivbkbx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().list("xfuojrn", "iflrzpasccbiu", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().list("vmm", "npqfrtqlkzmeg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml index 41093bc2e4833..e31b897831d6c 100644 --- a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/vmware/Microsoft.AVS -commit: 3f33367d2e6ed2a236d85c2a43c1c151c325f232 +commit: bfb56fe1e31413f8f4cd4a2fd476748d96c93ea8 repo: Azure/azure-rest-api-specs additionalDirectories: From e621a3c9dba7853280bd5432d873b7ea94fb88b8 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 22 Jul 2024 11:18:02 +0800 Subject: [PATCH 10/17] version --- sdk/avs/azure-resourcemanager-avs/README.md | 2 +- sdk/avs/azure-resourcemanager-avs/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/avs/azure-resourcemanager-avs/README.md b/sdk/avs/azure-resourcemanager-avs/README.md index 21bbc2f30ffd9..5a84283b99c27 100644 --- a/sdk/avs/azure-resourcemanager-avs/README.md +++ b/sdk/avs/azure-resourcemanager-avs/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-avs - 1.0.0-beta.1 + 1.2.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml index 28843351477fc..177f618b24bbc 100644 --- a/sdk/avs/azure-resourcemanager-avs/pom.xml +++ b/sdk/avs/azure-resourcemanager-avs/pom.xml @@ -14,7 +14,7 @@ Code generated by Microsoft (R) TypeSpec Code Generator. com.azure.resourcemanager azure-resourcemanager-avs - 1.3.0 + 1.2.0 jar Microsoft Azure SDK for Avs Management From 6dcd8f5f659915e1eec1749449fb54d14b570876 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 22 Jul 2024 12:09:35 +0800 Subject: [PATCH 11/17] clean up --- .../azure-resourcemanager-avs/CHANGELOG.md | 585 ------------------ 1 file changed, 585 deletions(-) diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index 64aa83a02d5c5..a46cdf75fb6b8 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -4,591 +4,6 @@ - Azure Resource Manager Avs client library for Java. This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). -### Breaking Changes - -* `models.DatastoreList` was removed - -* `models.ClusterList` was removed - -* `models.GlobalReachConnectionList` was removed - -* `models.ServiceSpecification` was removed - -* `models.MetricSpecification` was removed - -* `models.AddonList` was removed - -* `models.WorkloadNetworkName` was removed - -* `models.VirtualMachinesList` was removed - -* `models.WorkloadNetworkDhcpList` was removed - -* `models.ScriptCmdletsList` was removed - -* `models.CloudLinkList` was removed - -* `models.WorkloadNetworkVMGroupsList` was removed - -* `models.MetricDimension` was removed - -* `models.ScriptExecutionsList` was removed - -* `models.HcxEnterpriseSiteList` was removed - -* `models.WorkloadNetworkPortMirroringList` was removed - -* `models.WorkloadNetworkVirtualMachinesList` was removed - -* `models.OperationList` was removed - -* `models.LogSpecification` was removed - -* `models.WorkloadNetworkList` was removed - -* `models.PlacementPoliciesList` was removed - -* `models.WorkloadNetworkPublicIPsList` was removed - -* `models.WorkloadNetworkSegmentsList` was removed - -* `models.WorkloadNetworkDnsServicesList` was removed - -* `models.PrivateCloudList` was removed - -* `models.ExpressRouteAuthorizationList` was removed - -* `models.OperationProperties` was removed - -* `models.WorkloadNetworkDnsZonesList` was removed - -* `models.WorkloadNetworkGatewayList` was removed - -* `models.ScriptPackagesList` was removed - -* `models.CommonClusterProperties` was removed - -#### `models.WorkloadNetworkSegmentPortVif` was modified - -* `withPortName(java.lang.String)` was removed - -#### `models.WorkloadNetworkDnsZone$Update` was modified - -* `withDnsServices(java.lang.Long)` was removed - -#### `models.WorkloadNetworks` was modified - -* `listDnsZones(java.lang.String,java.lang.String)` was removed -* `getDnsZoneById(java.lang.String)` was removed -* `listDnsServices(java.lang.String,java.lang.String)` was removed -* `getPortMirroringWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getPublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deleteVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deleteSegment(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteDnsServiceById(java.lang.String)` was removed -* `getDnsServiceById(java.lang.String)` was removed -* `listVirtualMachines(java.lang.String,java.lang.String)` was removed -* `deleteDnsZoneById(java.lang.String)` was removed -* `listVMGroups(java.lang.String,java.lang.String)` was removed -* `getVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getWithResponse(java.lang.String,java.lang.String,models.WorkloadNetworkName,com.azure.core.util.Context)` was removed -* `definePortMirroring(java.lang.String)` was removed -* `getPortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `listDhcp(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listPublicIPs(java.lang.String,java.lang.String)` was removed -* `getDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed -* `listVMGroups(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getGateway(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deletePortMirroringByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deleteSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `defineVMGroup(java.lang.String)` was removed -* `getSegmentByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getVMGroupByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deleteDnsService(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deletePublicIpById(java.lang.String)` was removed -* `deletePortMirroringById(java.lang.String)` was removed -* `listDhcp(java.lang.String,java.lang.String)` was removed -* `getVirtualMachineWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getVMGroupById(java.lang.String)` was removed -* `listDnsZones(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `listDnsServices(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deletePublicIp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getSegment(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getVMGroupWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDhcpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getGatewayWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `defineDnsService(java.lang.String)` was removed -* `listSegments(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getPublicIpWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteDnsServiceByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deleteDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deletePublicIpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsZoneByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getPublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteVMGroupById(java.lang.String)` was removed -* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsServiceWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteDhcp(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteDnsZoneByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `deletePortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getPublicIpById(java.lang.String)` was removed -* `listPortMirroring(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDnsZoneWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getVirtualMachine(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getPortMirroringById(java.lang.String)` was removed -* `listGateways(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getDhcpByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was removed -* `getSegmentWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `defineDhcp(java.lang.String)` was removed -* `getDhcpById(java.lang.String)` was removed -* `listGateways(java.lang.String,java.lang.String)` was removed -* `listPortMirroring(java.lang.String,java.lang.String)` was removed -* `listVirtualMachines(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `deleteVMGroup(java.lang.String,java.lang.String,java.lang.String)` was removed -* `getDnsService(java.lang.String,java.lang.String,java.lang.String)` was removed -* `defineDnsZone(java.lang.String)` was removed -* `get(java.lang.String,java.lang.String,models.WorkloadNetworkName)` was removed -* `getPortMirroring(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteSegment(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteDhcpById(java.lang.String)` was removed -* `deleteDnsZone(java.lang.String,java.lang.String,java.lang.String)` was removed -* `deleteSegmentById(java.lang.String)` was removed -* `listSegments(java.lang.String,java.lang.String)` was removed -* `deletePublicIp(java.lang.String,java.lang.String,java.lang.String)` was removed -* `defineSegments(java.lang.String)` was removed -* `definePublicIp(java.lang.String)` was removed -* `listPublicIPs(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed -* `getSegmentById(java.lang.String)` was removed - -#### `models.Operation` was modified - -* `java.lang.String origin()` -> `models.Origin origin()` -* `properties()` was removed - -#### `models.WorkloadNetworkDnsZone` was modified - -* `java.lang.Long dnsServices()` -> `java.lang.Integer dnsServices()` - -#### `models.ScriptParameter` was modified - -* `withName(java.lang.String)` was removed - -#### `models.WorkloadNetworkDnsZone$Definition` was modified - -* `withDnsServices(java.lang.Long)` was removed - -#### `models.ManagementCluster` was modified - -* `withHosts(java.util.List)` was removed -* `withClusterSize(java.lang.Integer)` was removed - -#### `models.Addon$Update` was modified - -* `withProperties(models.AddonProperties)` was removed - -#### `models.WorkloadNetworkDhcpServer` was modified - -* `java.lang.Long leaseTime()` -> `java.lang.Integer leaseTime()` -* `withLeaseTime(java.lang.Long)` was removed - -### Features Added - -* `models.WorkloadNetworkVMGroupUpdate` was added - -* `implementation.models.WorkloadNetworkDhcpListResult` was added - -* `models.CloudLinkProvisioningState` was added - -* `implementation.models.WorkloadNetworkVMGroupListResult` was added - -* `implementation.models.VirtualMachineListResult` was added - -* `models.ClustersUpdateResponse` was added - -* `implementation.models.ClusterListResult` was added - -* `implementation.models.WorkloadNetworkPortMirroringListResult` was added - -* `implementation.models.AddonListResult` was added - -* `models.WorkloadNetworkPortMirroringProfiles` was added - -* `implementation.models.WorkloadNetworkPublicIPListResult` was added - -* `models.IscsiPath` was added - -* `models.WorkloadNetworkDnsServiceUpdate` was added - -* `models.PlacementPoliciesUpdateResponse` was added - -* `models.PrivateCloudsUpdateResponse` was added - -* `models.ClustersUpdateHeaders` was added - -* `implementation.models.WorkloadNetworkSegmentListResult` was added - -* `implementation.models.WorkloadNetworkVirtualMachineListResult` was added - -* `implementation.models.PrivateCloudListResult` was added - -* `implementation.models.CloudLinkListResult` was added - -* `models.IscsiPaths` was added - -* `implementation.models.HcxEnterpriseSiteListResult` was added - -* `implementation.models.WorkloadNetworkDnsZoneListResult` was added - -* `models.ScriptCmdletAudience` was added - -* `models.WorkloadNetworkPublicIps` was added - -* `models.VirtualMachineProvisioningState` was added - -* `models.WorkloadNetworkDnsZoneUpdate` was added - -* `models.HcxEnterpriseSiteProvisioningState` was added - -* `implementation.models.DatastoreListResult` was added - -* `models.WorkloadNetworkGateways` was added - -* `implementation.models.PlacementPolicyListResult` was added - -* `implementation.models.WorkloadNetworkGatewayListResult` was added - -* `models.ActionType` was added - -* `models.WorkloadNetworkDnsServices` was added - -* `models.WorkloadNetworkPortMirroringUpdate` was added - -* `implementation.models.ScriptPackageListResult` was added - -* `models.WorkloadNetworkDhcpUpdate` was added - -* `implementation.models.ExpressRouteAuthorizationListResult` was added - -* `models.WorkloadNetworkProvisioningState` was added - -* `models.WorkloadNetworkSegments` was added - -* `models.SkuTier` was added - -* `models.ScriptCmdletProvisioningState` was added - -* `models.DnsZoneType` was added - -* `implementation.models.PagedOperation` was added - -* `implementation.models.WorkloadNetworkListResult` was added - -* `models.WorkloadNetworkDhcpConfigurations` was added - -* `implementation.models.ScriptCmdletListResult` was added - -* `models.ElasticSanVolume` was added - -* `models.IscsiPathProvisioningState` was added - -* `models.WorkloadNetworkVirtualMachines` was added - -* `implementation.models.WorkloadNetworkDnsServiceListResult` was added - -* `models.ScriptPackageProvisioningState` was added - -* `models.PrivateCloudsUpdateHeaders` was added - -* `implementation.models.IscsiPathListResult` was added - -* `implementation.models.ScriptExecutionListResult` was added - -* `models.PlacementPoliciesUpdateHeaders` was added - -* `models.WorkloadNetworkVmGroups` was added - -* `implementation.models.GlobalReachConnectionListResult` was added - -* `models.WorkloadNetworkDnsZones` was added - -* `models.WorkloadNetworkSegmentUpdate` was added - -* `models.Origin` was added - -#### `models.Cluster$Definition` was modified - -* `withVsanDatastoreName(java.lang.String)` was added - -#### `models.ScriptStringExecutionParameter` was modified - -* `type()` was added - -#### `models.WorkloadNetworkDhcpRelay` was modified - -* `dhcpType()` was added - -#### `models.ScriptCmdlet` was modified - -* `audience()` was added -* `provisioningState()` was added -* `systemData()` was added - -#### `models.Cluster` was modified - -* `systemData()` was added -* `vsanDatastoreName()` was added - -#### `models.GlobalReachConnection` was modified - -* `systemData()` was added - -#### `models.WorkloadNetworkDnsZone$Update` was modified - -* `withDnsServices(java.lang.Integer)` was added - -#### `models.WorkloadNetworkDhcpEntity` was modified - -* `dhcpType()` was added - -#### `models.WorkloadNetworks` was modified - -* `get(java.lang.String,java.lang.String)` was added -* `getWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added - -#### `models.Operation` was modified - -* `actionType()` was added - -#### `models.AddonArcProperties` was modified - -* `addonType()` was added - -#### `models.ExpressRouteAuthorization` was modified - -* `systemData()` was added - -#### `models.VmPlacementPolicyProperties` was modified - -* `type()` was added - -#### `models.VirtualMachine` was modified - -* `provisioningState()` was added -* `systemData()` was added - -#### `models.WorkloadNetworkDnsZone` was modified - -* `systemData()` was added - -#### `models.PlacementPolicy` was modified - -* `systemData()` was added - -#### `models.ScriptPackage` was modified - -* `provisioningState()` was added -* `systemData()` was added - -#### `models.Addon` was modified - -* `systemData()` was added - -#### `models.Datastore` was modified - -* `elasticSanVolume()` was added -* `systemData()` was added - -#### `models.WorkloadNetworkSegment` was modified - -* `systemData()` was added - -#### `models.Datastore$Definition` was modified - -* `withElasticSanVolume(models.ElasticSanVolume)` was added - -#### `models.PrivateCloud$Update` was modified - -* `withDnsZoneType(models.DnsZoneType)` was added -* `withSku(models.Sku)` was added - -#### `models.AddonVrProperties` was modified - -* `addonType()` was added - -#### `models.WorkloadNetworkVirtualMachine` was modified - -* `systemData()` was added -* `provisioningState()` was added - -#### `AvsManager` was modified - -* `workloadNetworkVirtualMachines()` was added -* `workloadNetworkSegments()` was added -* `iscsiPaths()` was added -* `workloadNetworkGateways()` was added -* `workloadNetworkPortMirroringProfiles()` was added -* `workloadNetworkDhcpConfigurations()` was added -* `workloadNetworkDnsServices()` was added -* `workloadNetworkPublicIps()` was added -* `workloadNetworkDnsZones()` was added -* `workloadNetworkVmGroups()` was added - -#### `models.AddonProperties` was modified - -* `addonType()` was added - -#### `models.CloudLink` was modified - -* `systemData()` was added -* `provisioningState()` was added - -#### `models.WorkloadNetwork` was modified - -* `provisioningState()` was added -* `systemData()` was added - -#### `models.WorkloadNetworkDnsZone$Definition` was modified - -* `withDnsServices(java.lang.Integer)` was added - -#### `models.ManagementCluster` was modified - -* `provisioningState()` was added -* `clusterId()` was added -* `clusterSize()` was added -* `vsanDatastoreName()` was added -* `hosts()` was added -* `withVsanDatastoreName(java.lang.String)` was added - -#### `models.VmHostPlacementPolicyProperties` was modified - -* `type()` was added - -#### `models.PrivateCloudUpdate` was modified - -* `dnsZoneType()` was added -* `sku()` was added -* `withDnsZoneType(models.DnsZoneType)` was added -* `withSku(models.Sku)` was added - -#### `models.ScriptSecureStringExecutionParameter` was modified - -* `type()` was added - -#### `models.WorkloadNetworkPortMirroring` was modified - -* `systemData()` was added - -#### `models.ScriptExecution` was modified - -* `systemData()` was added - -#### `models.WorkloadNetworkPublicIp` was modified - -* `systemData()` was added - -#### `models.PrivateCloud$Definition` was modified - -* `withDnsZoneType(models.DnsZoneType)` was added -* `withVirtualNetworkId(java.lang.String)` was added - -#### `models.WorkloadNetworkVMGroup` was modified - -* `systemData()` was added - -#### `models.ExpressRouteAuthorization$Definition` was modified - -* `withExpressRouteId(java.lang.String)` was added - -#### `models.ExpressRouteAuthorization$Update` was modified - -* `withExpressRouteId(java.lang.String)` was added - -#### `models.Cluster$Update` was modified - -* `withSku(models.Sku)` was added - -#### `models.AddonHcxProperties` was modified - -* `addonType()` was added - -#### `models.Endpoints` was modified - -* `nsxtManagerIp()` was added -* `vcenterIp()` was added -* `hcxCloudManagerIp()` was added - -#### `models.PlacementPolicyProperties` was modified - -* `type()` was added - -#### `models.PSCredentialExecutionParameter` was modified - -* `type()` was added - -#### `models.HcxEnterpriseSite` was modified - -* `systemData()` was added -* `provisioningState()` was added - -#### `models.Datastore$Update` was modified - -* `withElasticSanVolume(models.ElasticSanVolume)` was added - -#### `models.ClusterUpdate` was modified - -* `sku()` was added -* `withSku(models.Sku)` was added - -#### `models.Sku` was modified - -* `tier()` was added -* `withTier(models.SkuTier)` was added -* `withFamily(java.lang.String)` was added -* `withCapacity(java.lang.Integer)` was added -* `withSize(java.lang.String)` was added -* `capacity()` was added -* `family()` was added -* `size()` was added - -#### `models.ScriptExecutionParameter` was modified - -* `type()` was added - -#### `models.WorkloadNetworkGateway` was modified - -* `provisioningState()` was added -* `systemData()` was added - -#### `models.PrivateCloud` was modified - -* `virtualNetworkId()` was added -* `dnsZoneType()` was added -* `systemData()` was added - -#### `models.WorkloadNetworkDnsService` was modified - -* `systemData()` was added - -#### `models.AddonSrmProperties` was modified - -* `addonType()` was added - -#### `models.WorkloadNetworkDhcp` was modified - -* `systemData()` was added - -#### `models.WorkloadNetworkDhcpServer` was modified - -* `dhcpType()` was added -* `withLeaseTime(java.lang.Integer)` was added - ## 1.2.0-beta.1 (2024-06-25) - 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). From d1502e98294afce1490d779dabbdbf1ac38cde55 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 23 Jul 2024 12:29:19 +0800 Subject: [PATCH 12/17] regen --- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 2539 +---- .../azure/resourcemanager/avs/AvsManager.java | 200 +- .../resourcemanager/avs/fluent/AvsClient.java | 82 +- .../avs/fluent/ClustersClient.java | 40 +- .../avs/fluent/IscsiPathsClient.java | 36 +- .../avs/fluent/PlacementPoliciesClient.java | 44 +- .../avs/fluent/PrivateCloudsClient.java | 38 +- .../avs/fluent/ScriptExecutionsClient.java | 235 - ...rkloadNetworkDhcpConfigurationsClient.java | 265 - .../WorkloadNetworkDnsServicesClient.java | 273 - .../fluent/WorkloadNetworkDnsZonesClient.java | 269 - .../fluent/WorkloadNetworkGatewaysClient.java | 74 - ...oadNetworkPortMirroringProfilesClient.java | 274 - .../WorkloadNetworkPublicIpsClient.java | 205 - .../fluent/WorkloadNetworkSegmentsClient.java | 269 - .../WorkloadNetworkVirtualMachinesClient.java | 77 - .../fluent/WorkloadNetworkVmGroupsClient.java | 268 - .../avs/fluent/WorkloadNetworksClient.java | 1975 +++- .../fluent/models/ScriptExecutionInner.java | 410 - .../models/ScriptExecutionProperties.java | 442 - .../avs/implementation/AvsClientImpl.java | 186 +- .../avs/implementation/ClusterImpl.java | 6 +- .../implementation/ClustersClientImpl.java | 129 +- .../avs/implementation/IscsiPathImpl.java | 91 +- .../implementation/IscsiPathsClientImpl.java | 177 +- .../avs/implementation/IscsiPathsImpl.java | 105 +- .../PlacementPoliciesClientImpl.java | 151 +- .../implementation/PlacementPolicyImpl.java | 10 +- .../avs/implementation/PrivateCloudImpl.java | 6 +- .../PrivateCloudsClientImpl.java | 119 +- .../implementation/ScriptExecutionImpl.java | 273 - .../ScriptExecutionsClientImpl.java | 1111 -- .../implementation/ScriptExecutionsImpl.java | 183 - ...adNetworkDhcpConfigurationsClientImpl.java | 1200 --- ...WorkloadNetworkDhcpConfigurationsImpl.java | 157 - .../WorkloadNetworkDhcpImpl.java | 41 +- .../WorkloadNetworkDnsServiceImpl.java | 36 +- .../WorkloadNetworkDnsServicesClientImpl.java | 1217 --- .../WorkloadNetworkDnsServicesImpl.java | 160 - .../WorkloadNetworkDnsZoneImpl.java | 35 +- .../WorkloadNetworkDnsZonesClientImpl.java | 1207 --- .../WorkloadNetworkDnsZonesImpl.java | 159 - .../WorkloadNetworkGatewaysClientImpl.java | 423 - .../WorkloadNetworkGatewaysImpl.java | 71 - .../WorkloadNetworkPortMirroringImpl.java | 38 +- ...etworkPortMirroringProfilesClientImpl.java | 1236 --- ...kloadNetworkPortMirroringProfilesImpl.java | 162 - .../WorkloadNetworkPublicIpImpl.java | 24 +- .../WorkloadNetworkPublicIpsClientImpl.java | 940 -- .../WorkloadNetworkPublicIpsImpl.java | 159 - .../WorkloadNetworkSegmentImpl.java | 35 +- .../WorkloadNetworkSegmentsClientImpl.java | 1203 --- .../WorkloadNetworkSegmentsImpl.java | 159 - .../WorkloadNetworkVMGroupImpl.java | 35 +- ...kloadNetworkVirtualMachinesClientImpl.java | 431 - .../WorkloadNetworkVirtualMachinesImpl.java | 75 - .../WorkloadNetworkVmGroupsClientImpl.java | 1199 --- .../WorkloadNetworkVmGroupsImpl.java | 159 - .../WorkloadNetworksClientImpl.java | 9537 ++++++++++++++++- .../implementation/WorkloadNetworksImpl.java | 872 +- .../models/ScriptExecutionsList.java | 113 - .../avs/models/ClustersUpdateHeaders.java | 65 - .../avs/models/ClustersUpdateResponse.java | 39 - .../resourcemanager/avs/models/IscsiPath.java | 122 + .../avs/models/IscsiPaths.java | 64 +- .../PSCredentialExecutionParameter.java | 155 - .../PlacementPoliciesUpdateHeaders.java | 65 - .../PlacementPoliciesUpdateResponse.java | 40 - .../avs/models/PrivateCloudIdentity.java | 9 +- .../models/PrivateCloudsUpdateHeaders.java | 65 - .../models/PrivateCloudsUpdateResponse.java | 39 - .../avs/models/ResourceIdentityType.java | 51 - .../avs/models/ScriptExecution.java | 518 - .../avs/models/ScriptExecutionParameter.java | 148 - .../models/ScriptExecutionParameterType.java | 56 - .../ScriptExecutionProvisioningState.java | 81 - .../avs/models/ScriptExecutions.java | 175 - .../avs/models/ScriptOutputStreamType.java | 61 - .../ScriptSecureStringExecutionParameter.java | 127 - .../ScriptStringExecutionParameter.java | 127 - .../SystemAssignedServiceIdentityType.java | 51 + .../avs/models/WorkloadNetworkDhcp.java | 21 +- .../WorkloadNetworkDhcpConfigurations.java | 144 - .../avs/models/WorkloadNetworkDnsService.java | 6 +- .../models/WorkloadNetworkDnsServices.java | 146 - .../avs/models/WorkloadNetworkDnsZone.java | 6 +- .../avs/models/WorkloadNetworkDnsZones.java | 144 - .../avs/models/WorkloadNetworkGateways.java | 67 - .../models/WorkloadNetworkPortMirroring.java | 6 +- .../WorkloadNetworkPortMirroringProfiles.java | 147 - .../avs/models/WorkloadNetworkPublicIp.java | 6 +- .../avs/models/WorkloadNetworkPublicIps.java | 146 - .../avs/models/WorkloadNetworkSegment.java | 6 +- .../avs/models/WorkloadNetworkSegments.java | 144 - .../avs/models/WorkloadNetworkVMGroup.java | 6 +- .../WorkloadNetworkVirtualMachines.java | 70 - .../avs/models/WorkloadNetworkVmGroups.java | 144 - .../avs/models/WorkloadNetworks.java | 982 +- .../proxy-config.json | 2 +- .../AddonsCreateOrUpdateSamples.java | 30 - .../avs/generated/AddonsDeleteSamples.java | 22 - .../avs/generated/AddonsGetSamples.java | 22 - .../avs/generated/AddonsListSamples.java | 22 - .../AuthorizationsCreateOrUpdateSamples.java | 23 - .../AuthorizationsDeleteSamples.java | 22 - .../generated/AuthorizationsGetSamples.java | 23 - .../generated/AuthorizationsListSamples.java | 22 - .../CloudLinksCreateOrUpdateSamples.java | 28 - .../generated/CloudLinksDeleteSamples.java | 22 - .../avs/generated/CloudLinksGetSamples.java | 22 - .../avs/generated/CloudLinksListSamples.java | 22 - .../ClustersCreateOrUpdateSamples.java | 30 - .../avs/generated/ClustersDeleteSamples.java | 22 - .../avs/generated/ClustersGetSamples.java | 22 - .../avs/generated/ClustersListSamples.java | 22 - .../generated/ClustersListZonesSamples.java | 22 - .../avs/generated/ClustersUpdateSamples.java | 27 - .../DatastoresCreateOrUpdateSamples.java | 30 - .../generated/DatastoresDeleteSamples.java | 22 - .../avs/generated/DatastoresGetSamples.java | 23 - .../avs/generated/DatastoresListSamples.java | 22 - ...ReachConnectionsCreateOrUpdateSamples.java | 29 - .../GlobalReachConnectionsDeleteSamples.java | 23 - .../GlobalReachConnectionsGetSamples.java | 24 - .../GlobalReachConnectionsListSamples.java | 23 - ...xEnterpriseSitesCreateOrUpdateSamples.java | 23 - .../HcxEnterpriseSitesDeleteSamples.java | 23 - .../HcxEnterpriseSitesGetSamples.java | 22 - .../HcxEnterpriseSitesListSamples.java | 23 - .../IscsiPathsCreateOrUpdateSamples.java | 27 - .../generated/IscsiPathsDeleteSamples.java | 22 - .../avs/generated/IscsiPathsGetSamples.java | 22 - .../IscsiPathsListByPrivateCloudSamples.java | 22 - ...ocationsCheckQuotaAvailabilitySamples.java | 23 - ...ocationsCheckTrialAvailabilitySamples.java | 23 - .../avs/generated/OperationsListSamples.java | 22 - ...lacementPoliciesCreateOrUpdateSamples.java | 40 - .../PlacementPoliciesDeleteSamples.java | 23 - .../PlacementPoliciesGetSamples.java | 23 - .../PlacementPoliciesListSamples.java | 22 - .../PlacementPoliciesUpdateSamples.java | 41 - .../PrivateCloudsCreateOrUpdateSamples.java | 51 - .../generated/PrivateCloudsDeleteSamples.java | 22 - ...rivateCloudsGetByResourceGroupSamples.java | 22 - ...vateCloudsListAdminCredentialsSamples.java | 23 - ...ivateCloudsListByResourceGroupSamples.java | 22 - .../generated/PrivateCloudsListSamples.java | 23 - ...rivateCloudsRotateNsxtPasswordSamples.java | 23 - ...ateCloudsRotateVcenterPasswordSamples.java | 23 - .../generated/PrivateCloudsUpdateSamples.java | 40 - .../generated/ScriptCmdletsGetSamples.java | 24 - .../generated/ScriptCmdletsListSamples.java | 22 - ...ScriptExecutionsCreateOrUpdateSamples.java | 40 - .../ScriptExecutionsDeleteSamples.java | 23 - ...riptExecutionsGetExecutionLogsSamples.java | 30 - .../generated/ScriptExecutionsGetSamples.java | 23 - .../ScriptExecutionsListSamples.java | 22 - .../generated/ScriptPackagesGetSamples.java | 23 - .../generated/ScriptPackagesListSamples.java | 22 - .../generated/VirtualMachinesGetSamples.java | 23 - .../generated/VirtualMachinesListSamples.java | 22 - ...irtualMachinesRestrictMovementSamples.java | 29 - ...etworkDhcpConfigurationsUpdateSamples.java | 32 - ...=> WorkloadNetworksCreateDhcpSamples.java} | 10 +- ...kloadNetworksCreateDnsServiceSamples.java} | 10 +- ...WorkloadNetworksCreateDnsZoneSamples.java} | 10 +- ...adNetworksCreatePortMirroringSamples.java} | 10 +- ...orkloadNetworksCreatePublicIPSamples.java} | 10 +- ...WorkloadNetworksCreateSegmentSamples.java} | 10 +- ...WorkloadNetworksCreateVMGroupSamples.java} | 9 +- ...=> WorkloadNetworksDeleteDhcpSamples.java} | 7 +- ...kloadNetworksDeleteDnsServiceSamples.java} | 8 +- ...WorkloadNetworksDeleteDnsZoneSamples.java} | 6 +- ...adNetworksDeletePortMirroringSamples.java} | 8 +- ...orkloadNetworksDeletePublicIPSamples.java} | 6 +- ...WorkloadNetworksDeleteSegmentSamples.java} | 8 +- ...WorkloadNetworksDeleteVMGroupSamples.java} | 6 +- ...va => WorkloadNetworksGetDhcpSamples.java} | 7 +- ...WorkloadNetworksGetDnsServiceSamples.java} | 8 +- ...=> WorkloadNetworksGetDnsZoneSamples.java} | 8 +- ...=> WorkloadNetworksGetGatewaySamples.java} | 8 +- ...kloadNetworksGetPortMirroringSamples.java} | 8 +- ...> WorkloadNetworksGetPublicIPSamples.java} | 8 +- .../generated/WorkloadNetworksGetSamples.java | 2 +- ...=> WorkloadNetworksGetSegmentSamples.java} | 8 +- ...=> WorkloadNetworksGetVMGroupSamples.java} | 8 +- ...loadNetworksGetVirtualMachineSamples.java} | 8 +- ...a => WorkloadNetworksListDhcpSamples.java} | 6 +- ...rkloadNetworksListDnsServicesSamples.java} | 6 +- ... WorkloadNetworksListDnsZonesSamples.java} | 6 +- ... WorkloadNetworksListGatewaysSamples.java} | 6 +- ...loadNetworksListPortMirroringSamples.java} | 6 +- ...WorkloadNetworksListPublicIPsSamples.java} | 6 +- ... WorkloadNetworksListSegmentsSamples.java} | 6 +- ... WorkloadNetworksListVMGroupsSamples.java} | 6 +- ...adNetworksListVirtualMachinesSamples.java} | 6 +- ...kloadNetworksUpdateDnsServiceSamples.java} | 8 +- ...WorkloadNetworksUpdateDnsZoneSamples.java} | 8 +- ...adNetworksUpdatePortMirroringSamples.java} | 8 +- ...WorkloadNetworksUpdateSegmentSamples.java} | 8 +- ...WorkloadNetworksUpdateVMGroupSamples.java} | 8 +- .../generated/AddonArcPropertiesTests.java | 8 +- .../generated/AddonHcxPropertiesTests.java | 8 +- .../avs/generated/AddonInnerTests.java | 2 +- .../avs/generated/AddonListTests.java | 4 +- .../avs/generated/AddonPropertiesTests.java | 2 +- .../avs/generated/AddonVrPropertiesTests.java | 12 +- .../AddonsCreateOrUpdateMockTests.java | 40 - .../AddonsGetWithResponseMockTests.java | 37 - .../avs/generated/AddonsListMockTests.java | 37 - .../avs/generated/CloudLinkInnerTests.java | 8 +- .../avs/generated/CloudLinkListTests.java | 6 +- .../generated/CloudLinkPropertiesTests.java | 8 +- .../CloudLinksCreateOrUpdateMockTests.java | 41 - .../CloudLinksGetWithResponseMockTests.java | 39 - .../generated/CloudLinksListMockTests.java | 39 - .../ClustersCreateOrUpdateMockTests.java | 58 - .../ClustersGetWithResponseMockTests.java | 47 - .../avs/generated/ClustersListMockTests.java | 47 - ...lustersListZonesWithResponseMockTests.java | 37 - .../DatastoresCreateOrUpdateMockTests.java | 53 - .../generated/DatastoresDeleteMockTests.java | 33 - .../DatastoresGetWithResponseMockTests.java | 45 - .../generated/DatastoresListMockTests.java | 44 - ...GlobalReachConnectionsDeleteMockTests.java | 33 - ...priseSitesDeleteWithResponseMockTests.java | 34 - .../avs/generated/IscsiPathInnerTests.java | 8 +- .../generated/IscsiPathListResultTests.java | 6 +- .../generated/IscsiPathPropertiesTests.java | 8 +- .../IscsiPathsCreateOrUpdateMockTests.java | 40 - .../generated/IscsiPathsDeleteMockTests.java | 33 - .../IscsiPathsGetWithResponseMockTests.java | 38 - ...IscsiPathsListByPrivateCloudMockTests.java | 39 - ...uotaAvailabilityWithResponseMockTests.java | 36 - ...rialAvailabilityWithResponseMockTests.java | 44 - .../generated/OperationsListMockTests.java | 39 - ...cementPoliciesCreateOrUpdateMockTests.java | 45 - .../PlacementPoliciesDeleteMockTests.java | 34 - ...ementPoliciesGetWithResponseMockTests.java | 41 - .../PlacementPoliciesListMockTests.java | 41 - .../generated/PlacementPoliciesListTests.java | 6 +- .../generated/PlacementPolicyInnerTests.java | 12 +- .../PlacementPolicyPropertiesTests.java | 8 +- .../PlacementPolicyUpdatePropertiesTests.java | 26 +- .../generated/PlacementPolicyUpdateTests.java | 20 +- .../generated/PrivateCloudIdentityTests.java | 8 +- .../PrivateCloudsDeleteMockTests.java | 33 - .../avs/generated/ScriptCmdletInnerTests.java | 2 +- .../ScriptCmdletPropertiesTests.java | 2 +- ...ScriptCmdletsGetWithResponseMockTests.java | 38 - .../generated/ScriptCmdletsListMockTests.java | 37 - .../avs/generated/ScriptCmdletsListTests.java | 4 +- .../generated/ScriptExecutionInnerTests.java | 63 - .../ScriptExecutionParameterTests.java | 26 - .../ScriptExecutionPropertiesTests.java | 65 - ...riptExecutionsCreateOrUpdateMockTests.java | 74 - .../ScriptExecutionsDeleteMockTests.java | 33 - ...GetExecutionLogsWithResponseMockTests.java | 49 - ...iptExecutionsGetWithResponseMockTests.java | 45 - .../ScriptExecutionsListMockTests.java | 45 - .../generated/ScriptExecutionsListTests.java | 26 - .../generated/ScriptPackageInnerTests.java | 2 +- .../ScriptPackagePropertiesTests.java | 2 +- ...criptPackagesGetWithResponseMockTests.java | 37 - .../ScriptPackagesListMockTests.java | 37 - .../generated/ScriptPackagesListTests.java | 4 +- .../avs/generated/ScriptParameterTests.java | 4 +- ...ptSecureStringExecutionParameterTests.java | 29 - .../ScriptStringExecutionParameterTests.java | 29 - .../generated/VirtualMachineInnerTests.java | 2 +- .../VirtualMachinePropertiesTests.java | 2 +- .../VirtualMachineRestrictMovementTests.java | 8 +- ...rtualMachinesGetWithResponseMockTests.java | 37 - .../VirtualMachinesListMockTests.java | 37 - .../generated/VirtualMachinesListTests.java | 4 +- .../VmHostPlacementPolicyPropertiesTests.java | 26 +- .../VmPlacementPolicyPropertiesTests.java | 14 +- ...workDhcpConfigurationsDeleteMockTests.java | 34 - .../WorkloadNetworkDhcpEntityTests.java | 12 +- .../WorkloadNetworkDhcpInnerTests.java | 12 +- .../WorkloadNetworkDhcpListTests.java | 8 +- .../WorkloadNetworkDhcpRelayTests.java | 20 +- .../WorkloadNetworkDhcpServerTests.java | 26 +- .../WorkloadNetworkDnsServiceInnerTests.java | 38 +- ...kloadNetworkDnsServicePropertiesTests.java | 38 +- ...loadNetworkDnsServicesDeleteMockTests.java | 33 - .../WorkloadNetworkDnsServicesListTests.java | 16 +- .../WorkloadNetworkDnsZoneInnerTests.java | 38 +- ...WorkloadNetworkDnsZonePropertiesTests.java | 38 +- ...orkloadNetworkDnsZonesDeleteMockTests.java | 34 - .../WorkloadNetworkDnsZonesListTests.java | 16 +- .../WorkloadNetworkGatewayInnerTests.java | 4 +- .../WorkloadNetworkGatewayListTests.java | 6 +- ...WorkloadNetworkGatewayPropertiesTests.java | 8 +- .../generated/WorkloadNetworkInnerTests.java | 2 +- .../generated/WorkloadNetworkListTests.java | 4 +- ...orkloadNetworkPortMirroringInnerTests.java | 32 +- ...WorkloadNetworkPortMirroringListTests.java | 12 +- ...kPortMirroringProfilesDeleteMockTests.java | 34 - ...adNetworkPortMirroringPropertiesTests.java | 32 +- .../WorkloadNetworkPropertiesTests.java | 2 +- .../WorkloadNetworkPublicIPsListTests.java | 8 +- .../WorkloadNetworkPublicIpInnerTests.java | 14 +- ...orkloadNetworkPublicIpPropertiesTests.java | 12 +- ...rkloadNetworkPublicIpsDeleteMockTests.java | 33 - .../WorkloadNetworkSegmentInnerTests.java | 33 +- .../WorkloadNetworkSegmentPortVifTests.java | 4 +- ...WorkloadNetworkSegmentPropertiesTests.java | 32 +- .../WorkloadNetworkSegmentSubnetTests.java | 13 +- .../WorkloadNetworkSegmentsListTests.java | 14 +- .../WorkloadNetworkVMGroupInnerTests.java | 20 +- ...WorkloadNetworkVMGroupPropertiesTests.java | 20 +- .../WorkloadNetworkVMGroupsListTests.java | 10 +- ...rkloadNetworkVirtualMachineInnerTests.java | 4 +- ...dNetworkVirtualMachinePropertiesTests.java | 4 +- ...rkloadNetworkVirtualMachinesListTests.java | 6 +- ...orkloadNetworkVmGroupsDeleteMockTests.java | 33 - ... WorkloadNetworksCreateDhcpMockTests.java} | 18 +- ...oadNetworksCreateDnsServiceMockTests.java} | 34 +- ...rkloadNetworksCreateDnsZoneMockTests.java} | 36 +- ...NetworksCreatePortMirroringMockTests.java} | 32 +- ...kloadNetworksCreatePublicIPMockTests.java} | 20 +- ...rkloadNetworksCreateSegmentMockTests.java} | 32 +- ...rkloadNetworksCreateVMGroupMockTests.java} | 24 +- .../WorkloadNetworksDeleteDhcpMockTests.java | 34 + ...oadNetworksDeleteDnsServiceMockTests.java} | 6 +- ...rkloadNetworksDeleteDnsZoneMockTests.java} | 6 +- ...dNetworksDeletePortMirroringMockTests.java | 34 + ...kloadNetworksDeletePublicIPMockTests.java} | 6 +- ...rkloadNetworksDeleteSegmentMockTests.java} | 6 +- ...rkloadNetworksDeleteVMGroupMockTests.java} | 6 +- ...NetworksGetDhcpWithResponseMockTests.java} | 14 +- ...ksGetDnsServiceWithResponseMockTests.java} | 23 +- ...worksGetDnsZoneWithResponseMockTests.java} | 23 +- ...worksGetGatewayWithResponseMockTests.java} | 12 +- ...etPortMirroringWithResponseMockTests.java} | 21 +- ...orksGetPublicIPWithResponseMockTests.java} | 15 +- ...worksGetSegmentWithResponseMockTests.java} | 20 +- ...worksGetVMGroupWithResponseMockTests.java} | 16 +- ...tVirtualMachineWithResponseMockTests.java} | 13 +- ...kloadNetworksGetWithResponseMockTests.java | 4 +- ...=> WorkloadNetworksListDhcpMockTests.java} | 14 +- ...loadNetworksListDnsServicesMockTests.java} | 22 +- ...orkloadNetworksListDnsZonesMockTests.java} | 22 +- ...orkloadNetworksListGatewaysMockTests.java} | 10 +- .../WorkloadNetworksListMockTests.java | 4 +- ...adNetworksListPortMirroringMockTests.java} | 18 +- ...rkloadNetworksListPublicIPsMockTests.java} | 14 +- ...orkloadNetworksListSegmentsMockTests.java} | 20 +- ...orkloadNetworksListVMGroupsMockTests.java} | 16 +- ...NetworksListVirtualMachinesMockTests.java} | 12 +- .../tsp-location.yaml | 2 +- 352 files changed, 15718 insertions(+), 25507 deletions(-) delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkGatewaysClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPublicIpsClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVirtualMachinesClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsImpl.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateResponse.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateResponse.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateHeaders.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudsUpdateResponse.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentityType.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpConfigurations.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServices.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZones.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateways.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProfiles.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIps.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegments.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachines.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVmGroups.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDhcpConfigurationsCreateSamples.java => WorkloadNetworksCreateDhcpSamples.java} (77%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsServicesCreateSamples.java => WorkloadNetworksCreateDnsServiceSamples.java} (79%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsZonesCreateSamples.java => WorkloadNetworksCreateDnsZoneSamples.java} (77%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPortMirroringProfilesCreateSamples.java => WorkloadNetworksCreatePortMirroringSamples.java} (76%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPublicIpsCreateSamples.java => WorkloadNetworksCreatePublicIPSamples.java} (74%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkSegmentsCreateSamples.java => WorkloadNetworksCreateSegmentSamples.java} (80%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVmGroupsCreateSamples.java => WorkloadNetworksCreateVMGroupSamples.java} (69%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDhcpConfigurationsDeleteSamples.java => WorkloadNetworksDeleteDhcpSamples.java} (69%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsServicesDeleteSamples.java => WorkloadNetworksDeleteDnsServiceSamples.java} (71%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsZonesDeleteSamples.java => WorkloadNetworksDeleteDnsZoneSamples.java} (79%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPortMirroringProfilesDeleteSamples.java => WorkloadNetworksDeletePortMirroringSamples.java} (69%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPublicIpsDeleteSamples.java => WorkloadNetworksDeletePublicIPSamples.java} (79%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkSegmentsDeleteSegmentSamples.java => WorkloadNetworksDeleteSegmentSamples.java} (70%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVmGroupsDeleteSamples.java => WorkloadNetworksDeleteVMGroupSamples.java} (79%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDhcpConfigurationsGetSamples.java => WorkloadNetworksGetDhcpSamples.java} (68%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsServicesGetSamples.java => WorkloadNetworksGetDnsServiceSamples.java} (70%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsZonesGetSamples.java => WorkloadNetworksGetDnsZoneSamples.java} (71%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkGatewaysGetSamples.java => WorkloadNetworksGetGatewaySamples.java} (71%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPortMirroringProfilesGetSamples.java => WorkloadNetworksGetPortMirroringSamples.java} (68%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPublicIpsGetSamples.java => WorkloadNetworksGetPublicIPSamples.java} (70%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkSegmentsGetSamples.java => WorkloadNetworksGetSegmentSamples.java} (71%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVmGroupsGetSamples.java => WorkloadNetworksGetVMGroupSamples.java} (71%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVirtualMachinesGetSamples.java => WorkloadNetworksGetVirtualMachineSamples.java} (70%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDhcpConfigurationsListSamples.java => WorkloadNetworksListDhcpSamples.java} (71%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsServicesListSamples.java => WorkloadNetworksListDnsServicesSamples.java} (73%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsZonesListSamples.java => WorkloadNetworksListDnsZonesSamples.java} (73%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkGatewaysListSamples.java => WorkloadNetworksListGatewaysSamples.java} (73%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPortMirroringProfilesListSamples.java => WorkloadNetworksListPortMirroringSamples.java} (71%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPublicIpsListSamples.java => WorkloadNetworksListPublicIPsSamples.java} (73%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkSegmentsListSamples.java => WorkloadNetworksListSegmentsSamples.java} (73%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVmGroupsListSamples.java => WorkloadNetworksListVMGroupsSamples.java} (73%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVirtualMachinesListSamples.java => WorkloadNetworksListVirtualMachinesSamples.java} (72%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsServicesUpdateSamples.java => WorkloadNetworksUpdateDnsServiceSamples.java} (83%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsZonesUpdateSamples.java => WorkloadNetworksUpdateDnsZoneSamples.java} (82%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPortMirroringProfilesUpdateSamples.java => WorkloadNetworksUpdatePortMirroringSamples.java} (80%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkSegmentsUpdateSamples.java => WorkloadNetworksUpdateSegmentSamples.java} (78%) rename sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVmGroupsUpdateSamples.java => WorkloadNetworksUpdateVMGroupSamples.java} (80%) delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDhcpConfigurationsCreateMockTests.java => WorkloadNetworksCreateDhcpMockTests.java} (67%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsServicesCreateMockTests.java => WorkloadNetworksCreateDnsServiceMockTests.java} (54%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsZonesCreateMockTests.java => WorkloadNetworksCreateDnsZoneMockTests.java} (50%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPortMirroringProfilesCreateMockTests.java => WorkloadNetworksCreatePortMirroringMockTests.java} (53%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPublicIpsCreateMockTests.java => WorkloadNetworksCreatePublicIPMockTests.java} (65%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkSegmentsCreateMockTests.java => WorkloadNetworksCreateSegmentMockTests.java} (53%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVmGroupsCreateMockTests.java => WorkloadNetworksCreateVMGroupMockTests.java} (60%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{ClustersDeleteMockTests.java => WorkloadNetworksDeleteDnsServiceMockTests.java} (82%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{CloudLinksDeleteMockTests.java => WorkloadNetworksDeleteDnsZoneMockTests.java} (83%) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{AddonsDeleteMockTests.java => WorkloadNetworksDeletePublicIPMockTests.java} (82%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkSegmentsDeleteSegmentMockTests.java => WorkloadNetworksDeleteSegmentMockTests.java} (83%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{AuthorizationsDeleteMockTests.java => WorkloadNetworksDeleteVMGroupMockTests.java} (83%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java => WorkloadNetworksGetDhcpWithResponseMockTests.java} (64%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsServicesGetWithResponseMockTests.java => WorkloadNetworksGetDnsServiceWithResponseMockTests.java} (57%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsZonesGetWithResponseMockTests.java => WorkloadNetworksGetDnsZoneWithResponseMockTests.java} (55%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkGatewaysGetWithResponseMockTests.java => WorkloadNetworksGetGatewayWithResponseMockTests.java} (72%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java => WorkloadNetworksGetPortMirroringWithResponseMockTests.java} (58%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPublicIpsGetWithResponseMockTests.java => WorkloadNetworksGetPublicIPWithResponseMockTests.java} (67%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkSegmentsGetWithResponseMockTests.java => WorkloadNetworksGetSegmentWithResponseMockTests.java} (55%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVmGroupsGetWithResponseMockTests.java => WorkloadNetworksGetVMGroupWithResponseMockTests.java} (64%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java => WorkloadNetworksGetVirtualMachineWithResponseMockTests.java} (71%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDhcpConfigurationsListMockTests.java => WorkloadNetworksListDhcpMockTests.java} (66%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsServicesListMockTests.java => WorkloadNetworksListDnsServicesMockTests.java} (55%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkDnsZonesListMockTests.java => WorkloadNetworksListDnsZonesMockTests.java} (53%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkGatewaysListMockTests.java => WorkloadNetworksListGatewaysMockTests.java} (75%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPortMirroringProfilesListMockTests.java => WorkloadNetworksListPortMirroringMockTests.java} (62%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkPublicIpsListMockTests.java => WorkloadNetworksListPublicIPsMockTests.java} (63%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkSegmentsListMockTests.java => WorkloadNetworksListSegmentsMockTests.java} (50%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVmGroupsListMockTests.java => WorkloadNetworksListVMGroupsMockTests.java} (60%) rename sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/{WorkloadNetworkVirtualMachinesListMockTests.java => WorkloadNetworksListVirtualMachinesMockTests.java} (74%) diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index e57702d6abd60..929c4aeae732b 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -1,2481 +1,976 @@ # Code snippets and samples -## Addons - -- [CreateOrUpdate](#addons_createorupdate) -- [Delete](#addons_delete) -- [Get](#addons_get) -- [List](#addons_list) - -## Authorizations - -- [CreateOrUpdate](#authorizations_createorupdate) -- [Delete](#authorizations_delete) -- [Get](#authorizations_get) -- [List](#authorizations_list) - -## CloudLinks - -- [CreateOrUpdate](#cloudlinks_createorupdate) -- [Delete](#cloudlinks_delete) -- [Get](#cloudlinks_get) -- [List](#cloudlinks_list) - -## Clusters - -- [CreateOrUpdate](#clusters_createorupdate) -- [Delete](#clusters_delete) -- [Get](#clusters_get) -- [List](#clusters_list) -- [ListZones](#clusters_listzones) -- [Update](#clusters_update) - -## Datastores - -- [CreateOrUpdate](#datastores_createorupdate) -- [Delete](#datastores_delete) -- [Get](#datastores_get) -- [List](#datastores_list) - -## GlobalReachConnections - -- [CreateOrUpdate](#globalreachconnections_createorupdate) -- [Delete](#globalreachconnections_delete) -- [Get](#globalreachconnections_get) -- [List](#globalreachconnections_list) - -## HcxEnterpriseSites - -- [CreateOrUpdate](#hcxenterprisesites_createorupdate) -- [Delete](#hcxenterprisesites_delete) -- [Get](#hcxenterprisesites_get) -- [List](#hcxenterprisesites_list) - -## IscsiPaths - -- [CreateOrUpdate](#iscsipaths_createorupdate) -- [Delete](#iscsipaths_delete) -- [Get](#iscsipaths_get) -- [ListByPrivateCloud](#iscsipaths_listbyprivatecloud) - -## Locations - -- [CheckQuotaAvailability](#locations_checkquotaavailability) -- [CheckTrialAvailability](#locations_checktrialavailability) - -## Operations - -- [List](#operations_list) - -## PlacementPolicies - -- [CreateOrUpdate](#placementpolicies_createorupdate) -- [Delete](#placementpolicies_delete) -- [Get](#placementpolicies_get) -- [List](#placementpolicies_list) -- [Update](#placementpolicies_update) - -## PrivateClouds - -- [CreateOrUpdate](#privateclouds_createorupdate) -- [Delete](#privateclouds_delete) -- [GetByResourceGroup](#privateclouds_getbyresourcegroup) -- [List](#privateclouds_list) -- [ListAdminCredentials](#privateclouds_listadmincredentials) -- [ListByResourceGroup](#privateclouds_listbyresourcegroup) -- [RotateNsxtPassword](#privateclouds_rotatensxtpassword) -- [RotateVcenterPassword](#privateclouds_rotatevcenterpassword) -- [Update](#privateclouds_update) - -## ScriptCmdlets - -- [Get](#scriptcmdlets_get) -- [List](#scriptcmdlets_list) - -## ScriptExecutions - -- [CreateOrUpdate](#scriptexecutions_createorupdate) -- [Delete](#scriptexecutions_delete) -- [Get](#scriptexecutions_get) -- [GetExecutionLogs](#scriptexecutions_getexecutionlogs) -- [List](#scriptexecutions_list) - -## ScriptPackages - -- [Get](#scriptpackages_get) -- [List](#scriptpackages_list) - -## VirtualMachines - -- [Get](#virtualmachines_get) -- [List](#virtualmachines_list) -- [RestrictMovement](#virtualmachines_restrictmovement) - -## WorkloadNetworkDhcpConfigurations - -- [Create](#workloadnetworkdhcpconfigurations_create) -- [Delete](#workloadnetworkdhcpconfigurations_delete) -- [Get](#workloadnetworkdhcpconfigurations_get) -- [List](#workloadnetworkdhcpconfigurations_list) -- [Update](#workloadnetworkdhcpconfigurations_update) - -## WorkloadNetworkDnsServices - -- [Create](#workloadnetworkdnsservices_create) -- [Delete](#workloadnetworkdnsservices_delete) -- [Get](#workloadnetworkdnsservices_get) -- [List](#workloadnetworkdnsservices_list) -- [Update](#workloadnetworkdnsservices_update) - -## WorkloadNetworkDnsZones - -- [Create](#workloadnetworkdnszones_create) -- [Delete](#workloadnetworkdnszones_delete) -- [Get](#workloadnetworkdnszones_get) -- [List](#workloadnetworkdnszones_list) -- [Update](#workloadnetworkdnszones_update) - -## WorkloadNetworkGateways - -- [Get](#workloadnetworkgateways_get) -- [List](#workloadnetworkgateways_list) - -## WorkloadNetworkPortMirroringProfiles - -- [Create](#workloadnetworkportmirroringprofiles_create) -- [Delete](#workloadnetworkportmirroringprofiles_delete) -- [Get](#workloadnetworkportmirroringprofiles_get) -- [List](#workloadnetworkportmirroringprofiles_list) -- [Update](#workloadnetworkportmirroringprofiles_update) - -## WorkloadNetworkPublicIps - -- [Create](#workloadnetworkpublicips_create) -- [Delete](#workloadnetworkpublicips_delete) -- [Get](#workloadnetworkpublicips_get) -- [List](#workloadnetworkpublicips_list) - -## WorkloadNetworkSegments - -- [Create](#workloadnetworksegments_create) -- [DeleteSegment](#workloadnetworksegments_deletesegment) -- [Get](#workloadnetworksegments_get) -- [List](#workloadnetworksegments_list) -- [Update](#workloadnetworksegments_update) - -## WorkloadNetworkVirtualMachines - -- [Get](#workloadnetworkvirtualmachines_get) -- [List](#workloadnetworkvirtualmachines_list) - -## WorkloadNetworkVmGroups - -- [Create](#workloadnetworkvmgroups_create) -- [Delete](#workloadnetworkvmgroups_delete) -- [Get](#workloadnetworkvmgroups_get) -- [List](#workloadnetworkvmgroups_list) -- [Update](#workloadnetworkvmgroups_update) - ## WorkloadNetworks +- [CreateDhcp](#workloadnetworks_createdhcp) +- [CreateDnsService](#workloadnetworks_creatednsservice) +- [CreateDnsZone](#workloadnetworks_creatednszone) +- [CreatePortMirroring](#workloadnetworks_createportmirroring) +- [CreatePublicIP](#workloadnetworks_createpublicip) +- [CreateSegment](#workloadnetworks_createsegment) +- [CreateVMGroup](#workloadnetworks_createvmgroup) +- [DeleteDhcp](#workloadnetworks_deletedhcp) +- [DeleteDnsService](#workloadnetworks_deletednsservice) +- [DeleteDnsZone](#workloadnetworks_deletednszone) +- [DeletePortMirroring](#workloadnetworks_deleteportmirroring) +- [DeletePublicIP](#workloadnetworks_deletepublicip) +- [DeleteSegment](#workloadnetworks_deletesegment) +- [DeleteVMGroup](#workloadnetworks_deletevmgroup) - [Get](#workloadnetworks_get) +- [GetDhcp](#workloadnetworks_getdhcp) +- [GetDnsService](#workloadnetworks_getdnsservice) +- [GetDnsZone](#workloadnetworks_getdnszone) +- [GetGateway](#workloadnetworks_getgateway) +- [GetPortMirroring](#workloadnetworks_getportmirroring) +- [GetPublicIP](#workloadnetworks_getpublicip) +- [GetSegment](#workloadnetworks_getsegment) +- [GetVMGroup](#workloadnetworks_getvmgroup) +- [GetVirtualMachine](#workloadnetworks_getvirtualmachine) - [List](#workloadnetworks_list) -### Addons_CreateOrUpdate +- [ListDhcp](#workloadnetworks_listdhcp) +- [ListDnsServices](#workloadnetworks_listdnsservices) +- [ListDnsZones](#workloadnetworks_listdnszones) +- [ListGateways](#workloadnetworks_listgateways) +- [ListPortMirroring](#workloadnetworks_listportmirroring) +- [ListPublicIPs](#workloadnetworks_listpublicips) +- [ListSegments](#workloadnetworks_listsegments) +- [ListVMGroups](#workloadnetworks_listvmgroups) +- [ListVirtualMachines](#workloadnetworks_listvirtualmachines) +- [UpdateDnsService](#workloadnetworks_updatednsservice) +- [UpdateDnsZone](#workloadnetworks_updatednszone) +- [UpdatePortMirroring](#workloadnetworks_updateportmirroring) +- [UpdateSegment](#workloadnetworks_updatesegment) +- [UpdateVMGroup](#workloadnetworks_updatevmgroup) +### WorkloadNetworks_CreateDhcp ```java -import com.azure.resourcemanager.avs.models.AddonArcProperties; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; /** - * Samples for Addons CreateOrUpdate. + * Samples for WorkloadNetworks CreateDhcp. */ -public final class AddonsCreateOrUpdateSamples { +public final class WorkloadNetworksCreateDhcpSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_CreateOrUpdate_ArcReg.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDhcp.json */ /** - * Sample code: Addons_CreateOrUpdate_ArcReg. + * Sample code: WorkloadNetworks_CreateDhcp. * * @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")) + public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .defineDhcp("dhcp1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") + .withRevision(1L) + .withServerAddress("40.1.5.1/24") + .withLeaseTime(86400L)) .create(); } } ``` -### Addons_Delete +### WorkloadNetworks_CreateDnsService ```java +import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; +import java.util.Arrays; + /** - * Samples for Addons Delete. + * Samples for WorkloadNetworks CreateDnsService. */ -public final class AddonsDeleteSamples { +public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Delete.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsService.json */ /** - * Sample code: Addons_Delete. + * Sample code: WorkloadNetworks_CreateDnsService. * * @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 workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .defineDnsService("dnsService1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .withDisplayName("dnsService1") + .withDnsServiceIp("5.5.5.5") + .withDefaultDnsZone("defaultDnsZone1") + .withFqdnZones(Arrays.asList("fqdnZone1")) + .withLogLevel(DnsServiceLogLevelEnum.INFO) + .withRevision(1L) + .create(); } } ``` -### Addons_Get +### WorkloadNetworks_CreateDnsZone ```java +import java.util.Arrays; + /** - * Samples for Addons Get. + * Samples for WorkloadNetworks CreateDnsZone. */ -public final class AddonsGetSamples { +public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Get_ArcReg.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsZone.json */ /** - * Sample code: Addons_Get_ArcReg. + * Sample code: WorkloadNetworks_CreateDnsZone. * * @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 workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .defineDnsZone("dnsZone1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .withDisplayName("dnsZone1") + .withDomain(Arrays.asList()) + .withDnsServerIps(Arrays.asList("1.1.1.1")) + .withSourceIp("8.8.8.8") + .withRevision(1L) + .create(); } } ``` -### Addons_List +### WorkloadNetworks_CreatePortMirroring ```java +import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; + /** - * Samples for Addons List. + * Samples for WorkloadNetworks CreatePortMirroring. */ -public final class AddonsListSamples { +public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_List.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePortMirroring.json */ /** - * Sample code: Addons_List. + * Sample code: WorkloadNetworks_CreatePortMirroring. * * @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 workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .definePortMirroring("portMirroring1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .withDisplayName("portMirroring1") + .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) + .withSource("vmGroup1") + .withDestination("vmGroup2") + .withRevision(1L) + .create(); } } ``` -### Authorizations_CreateOrUpdate +### WorkloadNetworks_CreatePublicIP ```java /** - * Samples for Authorizations CreateOrUpdate. + * Samples for WorkloadNetworks CreatePublicIP. */ -public final class AuthorizationsCreateOrUpdateSamples { +public final class WorkloadNetworksCreatePublicIPSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_CreateOrUpdate.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePublicIP.json */ /** - * Sample code: Authorizations_CreateOrUpdate. + * Sample code: WorkloadNetworks_CreatePublicIP. * * @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 workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .definePublicIP("publicIP1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .withDisplayName("publicIP1") + .withNumberOfPublicIPs(32L) + .create(); } } ``` -### Authorizations_Delete +### WorkloadNetworks_CreateSegment ```java +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; +import java.util.Arrays; + /** - * Samples for Authorizations Delete. + * Samples for WorkloadNetworks CreateSegment. */ -public final class AuthorizationsDeleteSamples { +public final class WorkloadNetworksCreateSegmentSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_Delete.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateSegments.json */ /** - * Sample code: Authorizations_Delete. + * Sample code: WorkloadNetworks_CreateSegments. * * @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 workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .defineSegment("segment1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .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(); } } ``` -### Authorizations_Get +### WorkloadNetworks_CreateVMGroup ```java /** - * Samples for Authorizations Get. + * Samples for WorkloadNetworks CreateVMGroup. */ -public final class AuthorizationsGetSamples { +public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_Get.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateVMGroup.json */ /** - * Sample code: Authorizations_Get. + * Sample code: WorkloadNetworks_CreateVMGroup. * * @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 workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .defineVMGroup("vmGroup1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .create(); } } ``` -### Authorizations_List +### WorkloadNetworks_DeleteDhcp ```java /** - * Samples for Authorizations List. + * Samples for WorkloadNetworks DeleteDhcp. */ -public final class AuthorizationsListSamples { +public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_List.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDhcp.json */ /** - * Sample code: Authorizations_List. + * Sample code: WorkloadNetworks_DeleteDhcp. * * @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 workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().deleteDhcp("group1", "cloud1", null, "dhcp1", com.azure.core.util.Context.NONE); } } ``` -### CloudLinks_CreateOrUpdate +### WorkloadNetworks_DeleteDnsService ```java /** - * Samples for CloudLinks CreateOrUpdate. + * Samples for WorkloadNetworks DeleteDnsService. */ -public final class CloudLinksCreateOrUpdateSamples { +public final class WorkloadNetworksDeleteDnsServiceSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_CreateOrUpdate.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsService.json */ /** - * Sample code: CloudLinks_CreateOrUpdate. + * Sample code: WorkloadNetworks_DeleteDnsService. * * @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 workloadNetworksDeleteDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .deleteDnsService("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### CloudLinks_Delete +### WorkloadNetworks_DeleteDnsZone ```java /** - * Samples for CloudLinks Delete. + * Samples for WorkloadNetworks DeleteDnsZone. */ -public final class CloudLinksDeleteSamples { +public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Delete.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsZone.json */ /** - * Sample code: CloudLinks_Delete. + * Sample code: WorkloadNetworks_DeleteDnsZone. * * @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 workloadNetworksDeleteDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().deleteDnsZone("group1", "dnsZone1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### CloudLinks_Get +### WorkloadNetworks_DeletePortMirroring ```java /** - * Samples for CloudLinks Get. + * Samples for WorkloadNetworks DeletePortMirroring. */ -public final class CloudLinksGetSamples { +public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Get.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePortMirroring.json */ /** - * Sample code: CloudLinks_Get. + * Sample code: WorkloadNetworks_DeletePortMirroring. * * @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 workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .deletePortMirroring("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### CloudLinks_List +### WorkloadNetworks_DeletePublicIP ```java /** - * Samples for CloudLinks List. + * Samples for WorkloadNetworks DeletePublicIP. */ -public final class CloudLinksListSamples { +public final class WorkloadNetworksDeletePublicIPSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_List.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePublicIP.json */ /** - * Sample code: CloudLinks_List. + * Sample code: WorkloadNetworks_DeletePublicIP. * * @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 workloadNetworksDeletePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().deletePublicIP("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### Clusters_CreateOrUpdate +### WorkloadNetworks_DeleteSegment ```java -import com.azure.resourcemanager.avs.models.Sku; - /** - * Samples for Clusters CreateOrUpdate. + * Samples for WorkloadNetworks DeleteSegment. */ -public final class ClustersCreateOrUpdateSamples { +public final class WorkloadNetworksDeleteSegmentSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_CreateOrUpdate.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteSegment.json */ /** - * Sample code: Clusters_CreateOrUpdate. + * Sample code: WorkloadNetworks_DeleteSegment. * * @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 workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .deleteSegment("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); } } ``` -### Clusters_Delete +### WorkloadNetworks_DeleteVMGroup ```java /** - * Samples for Clusters Delete. + * Samples for WorkloadNetworks DeleteVMGroup. */ -public final class ClustersDeleteSamples { +public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Delete.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteVMGroup.json */ /** - * Sample code: Clusters_Delete. + * Sample code: WorkloadNetworks_DeleteVMGroup. * * @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 workloadNetworksDeleteVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().deleteVMGroup("group1", "vmGroup1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### Clusters_Get +### WorkloadNetworks_Get ```java /** - * Samples for Clusters Get. + * Samples for WorkloadNetworks Get. */ -public final class ClustersGetSamples { +public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_Get.json */ /** - * Sample code: Clusters_Get. + * Sample code: WorkloadNetworks_Get. * * @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 workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().getWithResponse("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### Clusters_List +### WorkloadNetworks_GetDhcp ```java /** - * Samples for Clusters List. + * Samples for WorkloadNetworks GetDhcp. */ -public final class ClustersListSamples { +public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_List.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDhcp.json */ /** - * Sample code: Clusters_List. + * Sample code: WorkloadNetworks_GetDhcp. * * @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 workloadNetworksGetDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### Clusters_ListZones +### WorkloadNetworks_GetDnsService ```java /** - * Samples for Clusters ListZones. + * Samples for WorkloadNetworks GetDnsService. */ -public final class ClustersListZonesSamples { +public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_ListZones.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsService.json */ /** - * Sample code: Clusters_ListZones. + * Sample code: WorkloadNetworks_GetDnsService. * * @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 workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE); } } ``` -### Clusters_Update +### WorkloadNetworks_GetDnsZone ```java -import com.azure.resourcemanager.avs.models.Cluster; - /** - * Samples for Clusters Update. + * Samples for WorkloadNetworks GetDnsZone. */ -public final class ClustersUpdateSamples { +public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Update.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsZone.json */ /** - * Sample code: Clusters_Update. + * Sample code: WorkloadNetworks_GetDnsZone. * * @param manager Entry point to AvsManager. */ - public static void clustersUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - Cluster resource = manager.clusters() - .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withClusterSize(4).apply(); + public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE); } } ``` -### Datastores_CreateOrUpdate +### WorkloadNetworks_GetGateway ```java -import com.azure.resourcemanager.avs.models.NetAppVolume; - /** - * Samples for Datastores CreateOrUpdate. + * Samples for WorkloadNetworks GetGateway. */ -public final class DatastoresCreateOrUpdateSamples { +public final class WorkloadNetworksGetGatewaySamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_CreateOrUpdate.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetGateway.json */ /** - * Sample code: Datastores_CreateOrUpdate. + * Sample code: WorkloadNetworks_GetGateway. * * @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 workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getGatewayWithResponse("group1", "cloud1", null, "gateway1", com.azure.core.util.Context.NONE); } } ``` -### Datastores_Delete +### WorkloadNetworks_GetPortMirroring ```java /** - * Samples for Datastores Delete. + * Samples for WorkloadNetworks GetPortMirroring. */ -public final class DatastoresDeleteSamples { +public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Delete.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPortMirroring.json */ /** - * Sample code: Datastores_Delete. + * Sample code: WorkloadNetworks_GetPortMirroring. * * @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 workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE); } } ``` -### Datastores_Get +### WorkloadNetworks_GetPublicIP ```java /** - * Samples for Datastores Get. + * Samples for WorkloadNetworks GetPublicIP. */ -public final class DatastoresGetSamples { +public final class WorkloadNetworksGetPublicIPSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Get.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPublicIP.json */ /** - * Sample code: Datastores_Get. + * Sample code: WorkloadNetworks_GetPublicIP. * * @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 workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getPublicIPWithResponse("group1", "cloud1", null, "publicIP1", com.azure.core.util.Context.NONE); } } ``` -### Datastores_List +### WorkloadNetworks_GetSegment ```java /** - * Samples for Datastores List. + * Samples for WorkloadNetworks GetSegment. */ -public final class DatastoresListSamples { +public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_List.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetSegment.json */ /** - * Sample code: Datastores_List. + * Sample code: WorkloadNetworks_GetSegment. * * @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 workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); } } ``` -### GlobalReachConnections_CreateOrUpdate +### WorkloadNetworks_GetVMGroup ```java /** - * Samples for GlobalReachConnections CreateOrUpdate. + * Samples for WorkloadNetworks GetVMGroup. */ -public final class GlobalReachConnectionsCreateOrUpdateSamples { +public final class WorkloadNetworksGetVMGroupSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_CreateOrUpdate.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVMGroup.json */ /** - * Sample code: GlobalReachConnections_CreateOrUpdate. + * Sample code: WorkloadNetworks_GetVMGroup. * * @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 workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE); } } ``` -### GlobalReachConnections_Delete +### WorkloadNetworks_GetVirtualMachine ```java /** - * Samples for GlobalReachConnections Delete. + * Samples for WorkloadNetworks GetVirtualMachine. */ -public final class GlobalReachConnectionsDeleteSamples { +public final class WorkloadNetworksGetVirtualMachineSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_Delete.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVirtualMachine.json */ /** - * Sample code: GlobalReachConnections_Delete. + * Sample code: WorkloadNetworks_GetVirtualMachine. * * @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 workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getVirtualMachineWithResponse("group1", "cloud1", null, "vm1", com.azure.core.util.Context.NONE); } } ``` -### GlobalReachConnections_Get +### WorkloadNetworks_List ```java /** - * Samples for GlobalReachConnections Get. + * Samples for WorkloadNetworks List. */ -public final class GlobalReachConnectionsGetSamples { +public final class WorkloadNetworksListSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_Get.json + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_List.json */ /** - * Sample code: GlobalReachConnections_Get. + * Sample code: WorkloadNetworks_List. * * @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 workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### GlobalReachConnections_List +### WorkloadNetworks_ListDhcp ```java /** - * Samples for GlobalReachConnections List. + * Samples for WorkloadNetworks ListDhcp. */ -public final class GlobalReachConnectionsListSamples { +public final class WorkloadNetworksListDhcpSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_List.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDhcp.json */ /** - * Sample code: GlobalReachConnections_List. + * Sample code: WorkloadNetworks_ListDhcp. * * @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 workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listDhcp("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### HcxEnterpriseSites_CreateOrUpdate +### WorkloadNetworks_ListDnsServices ```java /** - * Samples for HcxEnterpriseSites CreateOrUpdate. + * Samples for WorkloadNetworks ListDnsServices. */ -public final class HcxEnterpriseSitesCreateOrUpdateSamples { +public final class WorkloadNetworksListDnsServicesSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsServices.json */ /** - * Sample code: HcxEnterpriseSites_CreateOrUpdate. + * Sample code: WorkloadNetworks_ListDnsServices. * * @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 workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listDnsServices("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### HcxEnterpriseSites_Delete +### WorkloadNetworks_ListDnsZones ```java /** - * Samples for HcxEnterpriseSites Delete. + * Samples for WorkloadNetworks ListDnsZones. */ -public final class HcxEnterpriseSitesDeleteSamples { +public final class WorkloadNetworksListDnsZonesSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Delete.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsZones.json */ /** - * Sample code: HcxEnterpriseSites_Delete. + * Sample code: WorkloadNetworks_ListDnsZones. * * @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 workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listDnsZones("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### HcxEnterpriseSites_Get +### WorkloadNetworks_ListGateways ```java /** - * Samples for HcxEnterpriseSites Get. + * Samples for WorkloadNetworks ListGateways. */ -public final class HcxEnterpriseSitesGetSamples { +public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Get.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListGateways.json */ /** - * Sample code: HcxEnterpriseSites_Get. + * Sample code: WorkloadNetworks_ListGateways. * * @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 workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listGateways("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### HcxEnterpriseSites_List +### WorkloadNetworks_ListPortMirroring ```java /** - * Samples for HcxEnterpriseSites List. + * Samples for WorkloadNetworks ListPortMirroring. */ -public final class HcxEnterpriseSitesListSamples { +public final class WorkloadNetworksListPortMirroringSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_List.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPortMirroring.json */ /** - * Sample code: HcxEnterpriseSites_List. + * Sample code: WorkloadNetworks_ListPortMirroring. * * @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 workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listPortMirroring("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### IscsiPaths_CreateOrUpdate +### WorkloadNetworks_ListPublicIPs ```java -import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; - /** - * Samples for IscsiPaths CreateOrUpdate. + * Samples for WorkloadNetworks ListPublicIPs. */ -public final class IscsiPathsCreateOrUpdateSamples { +public final class WorkloadNetworksListPublicIPsSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_CreateOrUpdate.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPublicIPs.json */ /** - * Sample code: IscsiPaths_CreateOrUpdate. + * Sample code: WorkloadNetworks_ListPublicIPs. * * @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 workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listPublicIPs("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### IscsiPaths_Delete +### WorkloadNetworks_ListSegments ```java /** - * Samples for IscsiPaths Delete. + * Samples for WorkloadNetworks ListSegments. */ -public final class IscsiPathsDeleteSamples { +public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Delete.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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", null, com.azure.core.util.Context.NONE); } } ``` -### IscsiPaths_Get +### WorkloadNetworks_ListVMGroups ```java /** - * Samples for IscsiPaths Get. + * Samples for WorkloadNetworks ListVMGroups. */ -public final class IscsiPathsGetSamples { +public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Get.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVMGroups.json */ /** - * Sample code: IscsiPaths_Get. + * Sample code: WorkloadNetworks_ListVMGroups. * * @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 workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listVMGroups("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### IscsiPaths_ListByPrivateCloud +### WorkloadNetworks_ListVirtualMachines ```java /** - * Samples for IscsiPaths ListByPrivateCloud. + * Samples for WorkloadNetworks ListVirtualMachines. */ -public final class IscsiPathsListByPrivateCloudSamples { +public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_List.json + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVirtualMachines.json */ /** - * Sample code: IscsiPaths_ListByPrivateCloud. + * Sample code: WorkloadNetworks_ListVirtualMachines. * * @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 workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listVirtualMachines("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### Locations_CheckQuotaAvailability +### WorkloadNetworks_UpdateDnsService ```java +import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; +import java.util.Arrays; + /** - * Samples for Locations CheckQuotaAvailability. + * Samples for WorkloadNetworks UpdateDnsService. */ -public final class LocationsCheckQuotaAvailabilitySamples { +public final class WorkloadNetworksUpdateDnsServiceSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckQuotaAvailability.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDnsService.json */ /** - * Sample code: Locations_CheckQuotaAvailability. + * Sample code: WorkloadNetworks_UpdateDnsService. * * @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 workloadNetworksUpdateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkDnsService resource = manager.workloadNetworks() + .getDnsServiceWithResponse("group1", "cloud1", null, "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(); } } ``` -### Locations_CheckTrialAvailability +### WorkloadNetworks_UpdateDnsZone ```java +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; +import java.util.Arrays; /** - * Samples for Locations CheckTrialAvailability. + * Samples for WorkloadNetworks UpdateDnsZone. */ -public final class LocationsCheckTrialAvailabilitySamples { +public final class WorkloadNetworksUpdateDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckTrialAvailability.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDnsZone.json */ /** - * Sample code: Locations_CheckTrialAvailability. + * Sample code: WorkloadNetworks_UpdateDnsZone. * * @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); - } -} -``` - -### Operations_List - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} -``` - -### PlacementPolicies_CreateOrUpdate - -```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. - */ -public final class PlacementPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_CreateOrUpdate.json - */ - /** - * Sample code: PlacementPolicies_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void placementPoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.placementPolicies() - .define("policy1") - .withExistingCluster("group1", "cloud1", "cluster1") - .withProperties(new VmHostPlacementPolicyProperties().withVmMembers(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) - .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center")) - .withAffinityType(AffinityType.ANTI_AFFINITY) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) - .create(); - } -} -``` - -### PlacementPolicies_Delete - -```java -/** - * Samples for PlacementPolicies Delete. - */ -public final class PlacementPoliciesDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Delete.json - */ - /** - * Sample code: PlacementPolicies_Delete. - * - * @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); - } -} -``` - -### PlacementPolicies_Get - -```java -/** - * Samples for PlacementPolicies Get. - */ -public final class PlacementPoliciesGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} -``` - -### PlacementPolicies_List - -```java -/** - * Samples for PlacementPolicies List. - */ -public final class PlacementPoliciesListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_List.json - */ - /** - * Sample code: PlacementPolicies_List. - * - * @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); - } -} -``` - -### PlacementPolicies_Update - -```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; - -/** - * Samples for PlacementPolicies Update. - */ -public final class PlacementPoliciesUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Update.json - */ - /** - * Sample code: PlacementPolicies_Update. - * - * @param manager Entry point to AvsManager. - */ - public static void placementPoliciesUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PlacementPolicy resource = manager.placementPolicies() - .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withState(PlacementPolicyState.DISABLED) - .withVmMembers(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) - .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center")) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST) - .apply(); - } -} -``` - -### PrivateClouds_CreateOrUpdate - -```java -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 PrivateClouds CreateOrUpdate. - */ -public final class PrivateCloudsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_CreateOrUpdate.json - */ - /** - * Sample code: PrivateClouds_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds() - .define("cloud1") - .withRegion("eastus2") - .withExistingResourceGroup("group1") - .withSku(new Sku().withName("AV36")) - .withTags(mapOf()) - .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .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; - } -} -``` - -### PrivateClouds_Delete - -```java -/** - * Samples for PrivateClouds Delete. - */ -public final class PrivateCloudsDeleteSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Delete.json - */ - /** - * Sample code: PrivateClouds_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); - } -} -``` - -### PrivateClouds_GetByResourceGroup - -```java -/** - * Samples for PrivateClouds GetByResourceGroup. - */ -public final class PrivateCloudsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Get.json - */ - /** - * Sample code: PrivateClouds_Get. - * - * @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); - } -} -``` - -### PrivateClouds_List - -```java -/** - * Samples for PrivateClouds List. - */ -public final class PrivateCloudsListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListInSubscription.json - */ - /** - * Sample code: PrivateClouds_ListInSubscription. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().list(com.azure.core.util.Context.NONE); - } -} -``` - -### PrivateClouds_ListAdminCredentials - -```java -/** - * Samples for PrivateClouds ListAdminCredentials. - */ -public final class PrivateCloudsListAdminCredentialsSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListAdminCredentials.json - */ - /** - * Sample code: PrivateClouds_ListAdminCredentials. - * - * @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); - } -} -``` - -### PrivateClouds_ListByResourceGroup - -```java -/** - * Samples for PrivateClouds ListByResourceGroup. - */ -public final class PrivateCloudsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} -``` - -### PrivateClouds_RotateNsxtPassword - -```java -/** - * Samples for PrivateClouds RotateNsxtPassword. - */ -public final class PrivateCloudsRotateNsxtPasswordSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateNsxtPassword.json - */ - /** - * Sample code: PrivateClouds_RotateNsxtPassword. - * - * @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); - } -} -``` - -### PrivateClouds_RotateVcenterPassword - -```java -/** - * Samples for PrivateClouds RotateVcenterPassword. - */ -public final class PrivateCloudsRotateVcenterPasswordSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateVcenterPassword.json - */ - /** - * Sample code: PrivateClouds_RotateVcenterPassword. - * - * @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); - } -} -``` - -### PrivateClouds_Update - -```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. - */ -public final class PrivateCloudsUpdateSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Update.json - */ - /** - * Sample code: PrivateClouds_Update. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = manager.privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.NONE)) - .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) - .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") - .withKeyVersion("fakeTokenPlaceholder") - .withKeyVaultUrl("fakeTokenPlaceholder"))) - .apply(); - } -} -``` - -### ScriptCmdlets_Get - -```java -/** - * Samples for ScriptCmdlets Get. - */ -public final class ScriptCmdletsGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptCmdlets_Get.json - */ - /** - * Sample code: ScriptCmdlets_Get. - * - * @param manager Entry point to AvsManager. - */ - public static void scriptCmdletsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptCmdlets() - .getWithResponse("group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", - com.azure.core.util.Context.NONE); - } -} -``` - -### ScriptCmdlets_List - -```java -/** - * Samples for ScriptCmdlets List. - */ -public final class ScriptCmdletsListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} -``` - -### 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/Microsoft.AVS.Management/examples/2023-09-01/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(); - } -} -``` - -### ScriptExecutions_Delete - -```java -/** - * Samples for ScriptExecutions Delete. - */ -public final class ScriptExecutionsDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_Delete.json - */ - /** - * Sample code: ScriptExecutions_Delete. - * - * @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); - } -} -``` - -### ScriptExecutions_Get - -```java -/** - * Samples for ScriptExecutions Get. - */ -public final class ScriptExecutionsGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} -``` - -### ScriptExecutions_GetExecutionLogs - -```java -import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -import java.util.Arrays; - -/** - * Samples for ScriptExecutions GetExecutionLogs. - */ -public final class ScriptExecutionsGetExecutionLogsSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_GetExecutionLogs.json - */ - /** - * Sample code: ScriptExecutions_GetExecutionLogs. - * - * @param manager Entry point to AvsManager. - */ - public static void scriptExecutionsGetExecutionLogs(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptExecutions() - .getExecutionLogsWithResponse("group1", "cloud1", "addSsoServer", - Arrays.asList(ScriptOutputStreamType.INFORMATION, ScriptOutputStreamType.fromString("Warnings"), - ScriptOutputStreamType.fromString("Errors"), ScriptOutputStreamType.OUTPUT), - com.azure.core.util.Context.NONE); - } -} -``` - -### ScriptExecutions_List - -```java -/** - * Samples for ScriptExecutions List. - */ -public final class ScriptExecutionsListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_List.json - */ - /** - * Sample code: ScriptExecutions_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); - } -} -``` - -### ScriptPackages_Get - -```java -/** - * Samples for ScriptPackages Get. - */ -public final class ScriptPackagesGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_Get.json - */ - /** - * Sample code: ScriptPackages_Get. - * - * @param manager Entry point to AvsManager. - */ - public static void scriptPackagesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptPackages() - .getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", com.azure.core.util.Context.NONE); - } -} -``` - -### ScriptPackages_List - -```java -/** - * Samples for ScriptPackages List. - */ -public final class ScriptPackagesListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_List.json - */ - /** - * Sample code: ScriptPackages_List. - * - * @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); - } -} -``` - -### VirtualMachines_Get - -```java -/** - * Samples for VirtualMachines Get. - */ -public final class VirtualMachinesGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_Get.json - */ - /** - * Sample code: VirtualMachines_Get. - * - * @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); - } -} -``` - -### VirtualMachines_List - -```java -/** - * Samples for VirtualMachines List. - */ -public final class VirtualMachinesListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_List.json - */ - /** - * Sample code: VirtualMachines_List. - * - * @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); - } -} -``` - -### VirtualMachines_RestrictMovement - -```java -import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; -import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; - -/** - * Samples for VirtualMachines RestrictMovement. - */ -public final class VirtualMachinesRestrictMovementSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_RestrictMovement.json - */ - /** - * Sample code: VirtualMachines_RestrictMovement. - * - * @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); - } -} -``` - -### WorkloadNetworkDhcpConfigurations_Create - -```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; - -/** - * Samples for WorkloadNetworkDhcpConfigurations Create. - */ -public final class WorkloadNetworkDhcpConfigurationsCreateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDhcp.json - */ - /** - * Sample code: WorkloadNetworks_CreateDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDhcpConfigurations() - .define("dhcp1") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") - .withRevision(1L) - .withServerAddress("40.1.5.1/24") - .withLeaseTime(86400L)) - .create(); - } -} -``` - -### WorkloadNetworkDhcpConfigurations_Delete - -```java -/** - * Samples for WorkloadNetworkDhcpConfigurations Delete. - */ -public final class WorkloadNetworkDhcpConfigurationsDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDhcp.json - */ - /** - * Sample code: WorkloadNetworks_DeleteDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDhcpConfigurations() - .delete("group1", "cloud1", "dhcp1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkDhcpConfigurations_Get - -```java -/** - * Samples for WorkloadNetworkDhcpConfigurations Get. - */ -public final class WorkloadNetworkDhcpConfigurationsGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDhcp.json - */ - /** - * Sample code: WorkloadNetworks_GetDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDhcpConfigurations() - .getWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkDhcpConfigurations_List - -```java -/** - * Samples for WorkloadNetworkDhcpConfigurations List. - */ -public final class WorkloadNetworkDhcpConfigurationsListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDhcp.json - */ - /** - * Sample code: WorkloadNetworks_ListDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDhcpConfigurations().list("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkDhcpConfigurations_Update - -```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; - -/** - * Samples for WorkloadNetworkDhcpConfigurations Update. - */ -public final class WorkloadNetworkDhcpConfigurationsUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDhcp.json - */ - /** - * Sample code: WorkloadNetworks_UpdateDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDhcp resource = manager.workloadNetworkDhcpConfigurations() - .getWithResponse("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(); - } -} -``` - -### WorkloadNetworkDnsServices_Create - -```java -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import java.util.Arrays; - -/** - * Samples for WorkloadNetworkDnsServices Create. - */ -public final class WorkloadNetworkDnsServicesCreateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsService.json - */ - /** - * Sample code: WorkloadNetworks_CreateDnsService. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsServices() - .define("dnsService1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("dnsService1") - .withDnsServiceIp("5.5.5.5") - .withDefaultDnsZone("defaultDnsZone1") - .withFqdnZones(Arrays.asList("fqdnZone1")) - .withLogLevel(DnsServiceLogLevelEnum.INFO) - .withRevision(1L) - .create(); - } -} -``` - -### WorkloadNetworkDnsServices_Delete - -```java -/** - * Samples for WorkloadNetworkDnsServices Delete. - */ -public final class WorkloadNetworkDnsServicesDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsService.json - */ - /** - * Sample code: WorkloadNetworks_DeleteDnsService. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksDeleteDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsServices() - .delete("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkDnsServices_Get - -```java -/** - * Samples for WorkloadNetworkDnsServices Get. - */ -public final class WorkloadNetworkDnsServicesGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsService.json - */ - /** - * Sample code: WorkloadNetworks_GetDnsService. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsServices() - .getWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkDnsServices_List - -```java -/** - * Samples for WorkloadNetworkDnsServices List. - */ -public final class WorkloadNetworkDnsServicesListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsServices.json - */ - /** - * Sample code: WorkloadNetworks_ListDnsServices. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsServices().list("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkDnsServices_Update - -```java -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import java.util.Arrays; - -/** - * Samples for WorkloadNetworkDnsServices Update. - */ -public final class WorkloadNetworkDnsServicesUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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.workloadNetworkDnsServices() - .getWithResponse("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(); - } -} -``` - -### WorkloadNetworkDnsZones_Create - -```java -import java.util.Arrays; - -/** - * Samples for WorkloadNetworkDnsZones Create. - */ -public final class WorkloadNetworkDnsZonesCreateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsZone.json - */ - /** - * Sample code: WorkloadNetworks_CreateDnsZone. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsZones() - .define("dnsZone1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("dnsZone1") - .withDomain(Arrays.asList()) - .withDnsServerIps(Arrays.asList("1.1.1.1")) - .withSourceIp("8.8.8.8") - .withRevision(1L) - .create(); - } -} -``` - -### WorkloadNetworkDnsZones_Delete - -```java -/** - * Samples for WorkloadNetworkDnsZones Delete. - */ -public final class WorkloadNetworkDnsZonesDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsZone.json - */ - /** - * Sample code: WorkloadNetworks_DeleteDnsZone. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksDeleteDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsZones().delete("group1", "dnsZone1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkDnsZones_Get - -```java -/** - * Samples for WorkloadNetworkDnsZones Get. - */ -public final class WorkloadNetworkDnsZonesGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsZone.json - */ - /** - * Sample code: WorkloadNetworks_GetDnsZone. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsZones() - .getWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkDnsZones_List - -```java -/** - * Samples for WorkloadNetworkDnsZones List. - */ -public final class WorkloadNetworkDnsZonesListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsZones.json - */ - /** - * Sample code: WorkloadNetworks_ListDnsZones. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsZones().list("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkDnsZones_Update - -```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.util.Arrays; - -/** - * Samples for WorkloadNetworkDnsZones Update. - */ -public final class WorkloadNetworkDnsZonesUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDnsZone.json - */ - /** - * Sample code: WorkloadNetworks_UpdateDnsZone. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDnsZone resource = manager.workloadNetworkDnsZones() - .getWithResponse("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(); - } -} -``` - -### WorkloadNetworkGateways_Get - -```java -/** - * Samples for WorkloadNetworkGateways Get. - */ -public final class WorkloadNetworkGatewaysGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetGateway.json - */ - /** - * Sample code: WorkloadNetworks_GetGateway. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkGateways() - .getWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkGateways_List - -```java -/** - * Samples for WorkloadNetworkGateways List. - */ -public final class WorkloadNetworkGatewaysListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListGateways.json - */ - /** - * Sample code: WorkloadNetworks_ListGateways. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkGateways().list("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkPortMirroringProfiles_Create - -```java -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; - -/** - * Samples for WorkloadNetworkPortMirroringProfiles Create. - */ -public final class WorkloadNetworkPortMirroringProfilesCreateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePortMirroring.json - */ - /** - * Sample code: WorkloadNetworks_CreatePortMirroring. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPortMirroringProfiles() - .define("portMirroring1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("portMirroring1") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("vmGroup1") - .withDestination("vmGroup2") - .withRevision(1L) - .create(); - } -} -``` - -### WorkloadNetworkPortMirroringProfiles_Delete - -```java -/** - * Samples for WorkloadNetworkPortMirroringProfiles Delete. - */ -public final class WorkloadNetworkPortMirroringProfilesDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePortMirroring.json - */ - /** - * Sample code: WorkloadNetworks_DeletePortMirroring. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPortMirroringProfiles() - .delete("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkPortMirroringProfiles_Get - -```java -/** - * Samples for WorkloadNetworkPortMirroringProfiles Get. - */ -public final class WorkloadNetworkPortMirroringProfilesGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPortMirroring.json - */ - /** - * Sample code: WorkloadNetworks_GetPortMirroring. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPortMirroringProfiles() - .getWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkPortMirroringProfiles_List - -```java -/** - * Samples for WorkloadNetworkPortMirroringProfiles List. - */ -public final class WorkloadNetworkPortMirroringProfilesListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPortMirroring.json - */ - /** - * Sample code: WorkloadNetworks_ListPortMirroring. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPortMirroringProfiles().list("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkPortMirroringProfiles_Update - -```java -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; - -/** - * Samples for WorkloadNetworkPortMirroringProfiles Update. - */ -public final class WorkloadNetworkPortMirroringProfilesUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdatePortMirroring.json - */ - /** - * Sample code: WorkloadNetworks_UpdatePortMirroring. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkPortMirroring resource = manager.workloadNetworkPortMirroringProfiles() - .getWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("vmGroup1") - .withDestination("vmGroup2") - .withRevision(1L) - .apply(); - } -} -``` - -### WorkloadNetworkPublicIps_Create - -```java -/** - * Samples for WorkloadNetworkPublicIps Create. - */ -public final class WorkloadNetworkPublicIpsCreateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePublicIP.json - */ - /** - * Sample code: WorkloadNetworks_CreatePublicIP. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPublicIps() - .define("publicIP1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("publicIP1") - .withNumberOfPublicIPs(32L) - .create(); - } -} -``` - -### WorkloadNetworkPublicIps_Delete - -```java -/** - * Samples for WorkloadNetworkPublicIps Delete. - */ -public final class WorkloadNetworkPublicIpsDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePublicIP.json - */ - /** - * Sample code: WorkloadNetworks_DeletePublicIP. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksDeletePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPublicIps().delete("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkPublicIps_Get - -```java -/** - * Samples for WorkloadNetworkPublicIps Get. - */ -public final class WorkloadNetworkPublicIpsGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPublicIP.json - */ - /** - * Sample code: WorkloadNetworks_GetPublicIP. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPublicIps() - .getWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkPublicIps_List - -```java -/** - * Samples for WorkloadNetworkPublicIps List. - */ -public final class WorkloadNetworkPublicIpsListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPublicIPs.json - */ - /** - * Sample code: WorkloadNetworks_ListPublicIPs. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPublicIps().list("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkSegments_Create - -```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.util.Arrays; - -/** - * Samples for WorkloadNetworkSegments Create. - */ -public final class WorkloadNetworkSegmentsCreateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateSegments.json - */ - /** - * Sample code: WorkloadNetworks_CreateSegments. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkSegments() - .define("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")) + public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkDnsZone resource = manager.workloadNetworks() + .getDnsZoneWithResponse("group1", "cloud1", null, "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) - .create(); - } -} -``` - -### WorkloadNetworkSegments_DeleteSegment - -```java -/** - * Samples for WorkloadNetworkSegments DeleteSegment. - */ -public final class WorkloadNetworkSegmentsDeleteSegmentSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteSegment.json - */ - /** - * Sample code: WorkloadNetworks_DeleteSegment. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkSegments() - .deleteSegment("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + .apply(); } } ``` -### WorkloadNetworkSegments_Get +### WorkloadNetworks_UpdatePortMirroring ```java -/** - * Samples for WorkloadNetworkSegments Get. - */ -public final class WorkloadNetworkSegmentsGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetSegment.json - */ - /** - * Sample code: WorkloadNetworks_GetSegment. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkSegments() - .getWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkSegments_List +import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -```java /** - * Samples for WorkloadNetworkSegments List. + * Samples for WorkloadNetworks UpdatePortMirroring. */ -public final class WorkloadNetworkSegmentsListSamples { +public final class WorkloadNetworksUpdatePortMirroringSamples { /* * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListSegments.json + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdatePortMirroring.json */ /** - * Sample code: WorkloadNetworks_ListSegments. + * Sample code: WorkloadNetworks_UpdatePortMirroring. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkSegments().list("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkPortMirroring resource = manager.workloadNetworks() + .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) + .withSource("vmGroup1") + .withDestination("vmGroup2") + .withRevision(1L) + .apply(); } } ``` -### WorkloadNetworkSegments_Update +### WorkloadNetworks_UpdateSegment ```java import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; /** - * Samples for WorkloadNetworkSegments Update. + * Samples for WorkloadNetworks UpdateSegment. */ -public final class WorkloadNetworkSegmentsUpdateSamples { +public final class WorkloadNetworksUpdateSegmentSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateSegments.json @@ -2486,158 +981,24 @@ public final class WorkloadNetworkSegmentsUpdateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkSegment resource = manager.workloadNetworkSegments() - .getWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) + WorkloadNetworkSegment resource = manager.workloadNetworks() + .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } } ``` -### WorkloadNetworkVirtualMachines_Get - -```java -/** - * Samples for WorkloadNetworkVirtualMachines Get. - */ -public final class WorkloadNetworkVirtualMachinesGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVirtualMachine.json - */ - /** - * Sample code: WorkloadNetworks_GetVirtualMachine. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVirtualMachines() - .getWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkVirtualMachines_List - -```java -/** - * Samples for WorkloadNetworkVirtualMachines List. - */ -public final class WorkloadNetworkVirtualMachinesListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVirtualMachines.json - */ - /** - * Sample code: WorkloadNetworks_ListVirtualMachines. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVirtualMachines().list("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkVmGroups_Create - -```java -/** - * Samples for WorkloadNetworkVmGroups Create. - */ -public final class WorkloadNetworkVmGroupsCreateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateVMGroup.json - */ - /** - * Sample code: WorkloadNetworks_CreateVMGroup. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVmGroups().define("vmGroup1").withExistingPrivateCloud("group1", "cloud1").create(); - } -} -``` - -### WorkloadNetworkVmGroups_Delete - -```java -/** - * Samples for WorkloadNetworkVmGroups Delete. - */ -public final class WorkloadNetworkVmGroupsDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteVMGroup.json - */ - /** - * Sample code: WorkloadNetworks_DeleteVMGroup. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksDeleteVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVmGroups().delete("group1", "vmGroup1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkVmGroups_Get - -```java -/** - * Samples for WorkloadNetworkVmGroups Get. - */ -public final class WorkloadNetworkVmGroupsGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVMGroup.json - */ - /** - * Sample code: WorkloadNetworks_GetVMGroup. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVmGroups() - .getWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkVmGroups_List - -```java -/** - * Samples for WorkloadNetworkVmGroups List. - */ -public final class WorkloadNetworkVmGroupsListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVMGroups.json - */ - /** - * Sample code: WorkloadNetworks_ListVMGroups. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVmGroups().list("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworkVmGroups_Update +### WorkloadNetworks_UpdateVMGroup ```java import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; import java.util.Arrays; /** - * Samples for WorkloadNetworkVmGroups Update. + * Samples for WorkloadNetworks UpdateVMGroup. */ -public final class WorkloadNetworkVmGroupsUpdateSamples { +public final class WorkloadNetworksUpdateVMGroupSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateVMGroup.json @@ -2648,53 +1009,11 @@ public final class WorkloadNetworkVmGroupsUpdateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkVMGroup resource = manager.workloadNetworkVmGroups() - .getWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) + WorkloadNetworkVMGroup resource = manager.workloadNetworks() + .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } } ``` -### WorkloadNetworks_Get - -```java -/** - * Samples for WorkloadNetworks Get. - */ -public final class WorkloadNetworksGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_Get.json - */ - /** - * Sample code: WorkloadNetworks_Get. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} -``` - -### WorkloadNetworks_List - -```java -/** - * Samples for WorkloadNetworks List. - */ -public final class WorkloadNetworksListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_List.json - */ - /** - * Sample code: WorkloadNetworks_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); - } -} -``` - 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 f024e7a0fb45b..47530807472d1 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 @@ -38,19 +38,9 @@ import com.azure.resourcemanager.avs.implementation.PlacementPoliciesImpl; import com.azure.resourcemanager.avs.implementation.PrivateCloudsImpl; 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.VirtualMachinesImpl; -import com.azure.resourcemanager.avs.implementation.WorkloadNetworkDhcpConfigurationsImpl; -import com.azure.resourcemanager.avs.implementation.WorkloadNetworkDnsServicesImpl; -import com.azure.resourcemanager.avs.implementation.WorkloadNetworkDnsZonesImpl; -import com.azure.resourcemanager.avs.implementation.WorkloadNetworkGatewaysImpl; -import com.azure.resourcemanager.avs.implementation.WorkloadNetworkPortMirroringProfilesImpl; -import com.azure.resourcemanager.avs.implementation.WorkloadNetworkPublicIpsImpl; -import com.azure.resourcemanager.avs.implementation.WorkloadNetworkSegmentsImpl; import com.azure.resourcemanager.avs.implementation.WorkloadNetworksImpl; -import com.azure.resourcemanager.avs.implementation.WorkloadNetworkVirtualMachinesImpl; -import com.azure.resourcemanager.avs.implementation.WorkloadNetworkVmGroupsImpl; import com.azure.resourcemanager.avs.models.Addons; import com.azure.resourcemanager.avs.models.Authorizations; import com.azure.resourcemanager.avs.models.CloudLinks; @@ -64,19 +54,9 @@ import com.azure.resourcemanager.avs.models.PlacementPolicies; import com.azure.resourcemanager.avs.models.PrivateClouds; 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.VirtualMachines; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpConfigurations; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServices; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZones; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateways; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProfiles; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIps; import com.azure.resourcemanager.avs.models.WorkloadNetworks; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegments; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachines; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVmGroups; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -105,26 +85,6 @@ public final class AvsManager { private GlobalReachConnections globalReachConnections; - private WorkloadNetworks workloadNetworks; - - private WorkloadNetworkSegments workloadNetworkSegments; - - private WorkloadNetworkDhcpConfigurations workloadNetworkDhcpConfigurations; - - private WorkloadNetworkGateways workloadNetworkGateways; - - private WorkloadNetworkPortMirroringProfiles workloadNetworkPortMirroringProfiles; - - private WorkloadNetworkVmGroups workloadNetworkVmGroups; - - private WorkloadNetworkVirtualMachines workloadNetworkVirtualMachines; - - private WorkloadNetworkDnsServices workloadNetworkDnsServices; - - private WorkloadNetworkDnsZones workloadNetworkDnsZones; - - private WorkloadNetworkPublicIps workloadNetworkPublicIps; - private CloudLinks cloudLinks; private Addons addons; @@ -137,10 +97,10 @@ public final class AvsManager { private ScriptCmdlets scriptCmdlets; - private ScriptExecutions scriptExecutions; - private IscsiPaths iscsiPaths; + private WorkloadNetworks workloadNetworks; + private final AvsClient clientObject; private AvsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -448,136 +408,6 @@ public GlobalReachConnections globalReachConnections() { return globalReachConnections; } - /** - * Gets the resource collection API of WorkloadNetworks. - * - * @return Resource collection API of WorkloadNetworks. - */ - public WorkloadNetworks workloadNetworks() { - if (this.workloadNetworks == null) { - this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this); - } - return workloadNetworks; - } - - /** - * Gets the resource collection API of WorkloadNetworkSegments. It manages WorkloadNetworkSegment. - * - * @return Resource collection API of WorkloadNetworkSegments. - */ - public WorkloadNetworkSegments workloadNetworkSegments() { - if (this.workloadNetworkSegments == null) { - this.workloadNetworkSegments - = new WorkloadNetworkSegmentsImpl(clientObject.getWorkloadNetworkSegments(), this); - } - return workloadNetworkSegments; - } - - /** - * Gets the resource collection API of WorkloadNetworkDhcpConfigurations. It manages WorkloadNetworkDhcp. - * - * @return Resource collection API of WorkloadNetworkDhcpConfigurations. - */ - public WorkloadNetworkDhcpConfigurations workloadNetworkDhcpConfigurations() { - if (this.workloadNetworkDhcpConfigurations == null) { - this.workloadNetworkDhcpConfigurations - = new WorkloadNetworkDhcpConfigurationsImpl(clientObject.getWorkloadNetworkDhcpConfigurations(), this); - } - return workloadNetworkDhcpConfigurations; - } - - /** - * Gets the resource collection API of WorkloadNetworkGateways. - * - * @return Resource collection API of WorkloadNetworkGateways. - */ - public WorkloadNetworkGateways workloadNetworkGateways() { - if (this.workloadNetworkGateways == null) { - this.workloadNetworkGateways - = new WorkloadNetworkGatewaysImpl(clientObject.getWorkloadNetworkGateways(), this); - } - return workloadNetworkGateways; - } - - /** - * Gets the resource collection API of WorkloadNetworkPortMirroringProfiles. It manages - * WorkloadNetworkPortMirroring. - * - * @return Resource collection API of WorkloadNetworkPortMirroringProfiles. - */ - public WorkloadNetworkPortMirroringProfiles workloadNetworkPortMirroringProfiles() { - if (this.workloadNetworkPortMirroringProfiles == null) { - this.workloadNetworkPortMirroringProfiles = new WorkloadNetworkPortMirroringProfilesImpl( - clientObject.getWorkloadNetworkPortMirroringProfiles(), this); - } - return workloadNetworkPortMirroringProfiles; - } - - /** - * Gets the resource collection API of WorkloadNetworkVmGroups. It manages WorkloadNetworkVMGroup. - * - * @return Resource collection API of WorkloadNetworkVmGroups. - */ - public WorkloadNetworkVmGroups workloadNetworkVmGroups() { - if (this.workloadNetworkVmGroups == null) { - this.workloadNetworkVmGroups - = new WorkloadNetworkVmGroupsImpl(clientObject.getWorkloadNetworkVmGroups(), this); - } - return workloadNetworkVmGroups; - } - - /** - * Gets the resource collection API of WorkloadNetworkVirtualMachines. - * - * @return Resource collection API of WorkloadNetworkVirtualMachines. - */ - public WorkloadNetworkVirtualMachines workloadNetworkVirtualMachines() { - if (this.workloadNetworkVirtualMachines == null) { - this.workloadNetworkVirtualMachines - = new WorkloadNetworkVirtualMachinesImpl(clientObject.getWorkloadNetworkVirtualMachines(), this); - } - return workloadNetworkVirtualMachines; - } - - /** - * Gets the resource collection API of WorkloadNetworkDnsServices. It manages WorkloadNetworkDnsService. - * - * @return Resource collection API of WorkloadNetworkDnsServices. - */ - public WorkloadNetworkDnsServices workloadNetworkDnsServices() { - if (this.workloadNetworkDnsServices == null) { - this.workloadNetworkDnsServices - = new WorkloadNetworkDnsServicesImpl(clientObject.getWorkloadNetworkDnsServices(), this); - } - return workloadNetworkDnsServices; - } - - /** - * Gets the resource collection API of WorkloadNetworkDnsZones. It manages WorkloadNetworkDnsZone. - * - * @return Resource collection API of WorkloadNetworkDnsZones. - */ - public WorkloadNetworkDnsZones workloadNetworkDnsZones() { - if (this.workloadNetworkDnsZones == null) { - this.workloadNetworkDnsZones - = new WorkloadNetworkDnsZonesImpl(clientObject.getWorkloadNetworkDnsZones(), this); - } - return workloadNetworkDnsZones; - } - - /** - * Gets the resource collection API of WorkloadNetworkPublicIps. It manages WorkloadNetworkPublicIp. - * - * @return Resource collection API of WorkloadNetworkPublicIps. - */ - public WorkloadNetworkPublicIps workloadNetworkPublicIps() { - if (this.workloadNetworkPublicIps == null) { - this.workloadNetworkPublicIps - = new WorkloadNetworkPublicIpsImpl(clientObject.getWorkloadNetworkPublicIps(), this); - } - return workloadNetworkPublicIps; - } - /** * Gets the resource collection API of CloudLinks. It manages CloudLink. * @@ -651,27 +481,29 @@ public ScriptCmdlets scriptCmdlets() { } /** - * Gets the resource collection API of ScriptExecutions. It manages ScriptExecution. + * Gets the resource collection API of IscsiPaths. It manages IscsiPath. * - * @return Resource collection API of ScriptExecutions. + * @return Resource collection API of IscsiPaths. */ - public ScriptExecutions scriptExecutions() { - if (this.scriptExecutions == null) { - this.scriptExecutions = new ScriptExecutionsImpl(clientObject.getScriptExecutions(), this); + public IscsiPaths iscsiPaths() { + if (this.iscsiPaths == null) { + this.iscsiPaths = new IscsiPathsImpl(clientObject.getIscsiPaths(), this); } - return scriptExecutions; + return iscsiPaths; } /** - * Gets the resource collection API of IscsiPaths. + * Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkSegment, WorkloadNetworkDhcp, + * WorkloadNetworkPortMirroring, WorkloadNetworkVMGroup, WorkloadNetworkDnsService, WorkloadNetworkDnsZone, + * WorkloadNetworkPublicIp. * - * @return Resource collection API of IscsiPaths. + * @return Resource collection API of WorkloadNetworks. */ - public IscsiPaths iscsiPaths() { - if (this.iscsiPaths == null) { - this.iscsiPaths = new IscsiPathsImpl(clientObject.getIscsiPaths(), this); + public WorkloadNetworks workloadNetworks() { + if (this.workloadNetworks == null) { + this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this); } - return iscsiPaths; + return workloadNetworks; } /** 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 6a5eb3ac48ac6..a4089d69ab5b2 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 @@ -102,76 +102,6 @@ public interface AvsClient { */ GlobalReachConnectionsClient getGlobalReachConnections(); - /** - * Gets the WorkloadNetworksClient object to access its operations. - * - * @return the WorkloadNetworksClient object. - */ - WorkloadNetworksClient getWorkloadNetworks(); - - /** - * Gets the WorkloadNetworkSegmentsClient object to access its operations. - * - * @return the WorkloadNetworkSegmentsClient object. - */ - WorkloadNetworkSegmentsClient getWorkloadNetworkSegments(); - - /** - * Gets the WorkloadNetworkDhcpConfigurationsClient object to access its operations. - * - * @return the WorkloadNetworkDhcpConfigurationsClient object. - */ - WorkloadNetworkDhcpConfigurationsClient getWorkloadNetworkDhcpConfigurations(); - - /** - * Gets the WorkloadNetworkGatewaysClient object to access its operations. - * - * @return the WorkloadNetworkGatewaysClient object. - */ - WorkloadNetworkGatewaysClient getWorkloadNetworkGateways(); - - /** - * Gets the WorkloadNetworkPortMirroringProfilesClient object to access its operations. - * - * @return the WorkloadNetworkPortMirroringProfilesClient object. - */ - WorkloadNetworkPortMirroringProfilesClient getWorkloadNetworkPortMirroringProfiles(); - - /** - * Gets the WorkloadNetworkVmGroupsClient object to access its operations. - * - * @return the WorkloadNetworkVmGroupsClient object. - */ - WorkloadNetworkVmGroupsClient getWorkloadNetworkVmGroups(); - - /** - * Gets the WorkloadNetworkVirtualMachinesClient object to access its operations. - * - * @return the WorkloadNetworkVirtualMachinesClient object. - */ - WorkloadNetworkVirtualMachinesClient getWorkloadNetworkVirtualMachines(); - - /** - * Gets the WorkloadNetworkDnsServicesClient object to access its operations. - * - * @return the WorkloadNetworkDnsServicesClient object. - */ - WorkloadNetworkDnsServicesClient getWorkloadNetworkDnsServices(); - - /** - * Gets the WorkloadNetworkDnsZonesClient object to access its operations. - * - * @return the WorkloadNetworkDnsZonesClient object. - */ - WorkloadNetworkDnsZonesClient getWorkloadNetworkDnsZones(); - - /** - * Gets the WorkloadNetworkPublicIpsClient object to access its operations. - * - * @return the WorkloadNetworkPublicIpsClient object. - */ - WorkloadNetworkPublicIpsClient getWorkloadNetworkPublicIps(); - /** * Gets the CloudLinksClient object to access its operations. * @@ -215,16 +145,16 @@ public interface AvsClient { ScriptCmdletsClient getScriptCmdlets(); /** - * Gets the ScriptExecutionsClient object to access its operations. + * Gets the IscsiPathsClient object to access its operations. * - * @return the ScriptExecutionsClient object. + * @return the IscsiPathsClient object. */ - ScriptExecutionsClient getScriptExecutions(); + IscsiPathsClient getIscsiPaths(); /** - * Gets the IscsiPathsClient object to access its operations. + * Gets the WorkloadNetworksClient object to access its operations. * - * @return the IscsiPathsClient object. + * @return the WorkloadNetworksClient object. */ - IscsiPathsClient getIscsiPaths(); + WorkloadNetworksClient getWorkloadNetworks(); } 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 b797c9dc509ba..647f1a6eabda8 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 @@ -13,7 +13,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; -import com.azure.resourcemanager.avs.models.ClustersUpdateResponse; import com.azure.resourcemanager.avs.models.ClusterUpdate; /** @@ -143,6 +142,22 @@ ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, S ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context); + /** + * Update a Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param clusterUpdate The cluster properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String privateCloudName, + String clusterName, ClusterUpdate clusterUpdate); + /** * Update a Cluster. * @@ -154,11 +169,27 @@ ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String privateCloudName, + String clusterName, ClusterUpdate clusterUpdate, Context context); + + /** + * Update a Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param clusterUpdate The cluster properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClustersUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, String clusterName, - ClusterUpdate clusterUpdate, Context context); + ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate); /** * Update a Cluster. @@ -167,6 +198,7 @@ ClustersUpdateResponse updateWithResponse(String resourceGroupName, String priva * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -174,7 +206,7 @@ ClustersUpdateResponse updateWithResponse(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, - ClusterUpdate clusterUpdate); + ClusterUpdate clusterUpdate, Context context); /** * Delete a Cluster. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java index d0e7c433ad7bb..b17dab94dbc97 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java @@ -50,6 +50,7 @@ PagedIterable listByPrivateCloud(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,26 +58,29 @@ PagedIterable listByPrivateCloud(String resourceGroupName, Strin * @return a IscsiPath along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName, + Context context); /** * Get a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath. */ @ServiceMethod(returns = ReturnType.SINGLE) - IscsiPathInner get(String resourceGroupName, String privateCloudName); + IscsiPathInner get(String resourceGroupName, String privateCloudName, String iscsiPathName); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @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. @@ -85,13 +89,14 @@ PagedIterable listByPrivateCloud(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, IscsiPathInner resource); + String privateCloudName, String iscsiPathName, IscsiPathInner resource); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,13 +106,14 @@ SyncPoller, IscsiPathInner> beginCreateOrUpdate(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, IscsiPathInner resource, Context context); + String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @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. @@ -115,13 +121,15 @@ SyncPoller, IscsiPathInner> beginCreateOrUpdate(Strin * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, + IscsiPathInner resource); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,27 +138,30 @@ SyncPoller, IscsiPathInner> beginCreateOrUpdate(Strin * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, - Context context); + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, + IscsiPathInner resource, Context context); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String iscsiPathName); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -158,30 +169,33 @@ IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String iscsiPathName, Context context); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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); + void delete(String resourceGroupName, String privateCloudName, String iscsiPathName); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String privateCloudName, Context context); + void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java index 2a3abb00f47e6..4eceff239513e 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 @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; -import com.azure.resourcemanager.avs.models.PlacementPoliciesUpdateResponse; import com.azure.resourcemanager.avs.models.PlacementPolicyUpdate; /** @@ -153,6 +152,24 @@ PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateClou PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy, Context context); + /** + * Update a PlacementPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PlacementPolicyInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate); + /** * Update a PlacementPolicy. * @@ -165,11 +182,29 @@ PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateClou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PlacementPolicyInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate, Context context); + + /** + * Update a PlacementPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPoliciesUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, - String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context); + PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate); /** * Update a PlacementPolicy. @@ -179,6 +214,7 @@ PlacementPoliciesUpdateResponse updateWithResponse(String resourceGroupName, Str * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. * @param placementPolicyUpdate The placement policy properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -186,7 +222,7 @@ PlacementPoliciesUpdateResponse updateWithResponse(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, - String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate); + String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context); /** * Delete a PlacementPolicy. 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 98b879dfd418c..b07cc200e8ff7 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 @@ -13,7 +13,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; -import com.azure.resourcemanager.avs.models.PrivateCloudsUpdateResponse; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; /** @@ -156,6 +155,21 @@ SyncPoller, PrivateCloudInner> beginCreateOrUpdate PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context); + /** + * Update a PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param privateCloudUpdate The private cloud properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a private cloud resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateCloudInner> beginUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + /** * Update a PrivateCloud. * @@ -166,11 +180,25 @@ PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a private cloud resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateCloudInner> beginUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context); + + /** + * Update a PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param privateCloudUpdate The private cloud properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateCloudsUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, - PrivateCloudUpdate privateCloudUpdate, Context context); + PrivateCloudInner update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); /** * Update a PrivateCloud. @@ -178,13 +206,15 @@ PrivateCloudsUpdateResponse updateWithResponse(String resourceGroupName, 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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateCloudInner update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + PrivateCloudInner update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, + Context context); /** * Delete a PrivateCloud. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java deleted file mode 100644 index 063951a11565d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.ScriptExecutionInner; -import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -import java.util.List; - -/** - * An instance of this class provides access to all the operations defined in ScriptExecutionsClient. - */ -public interface ScriptExecutionsClient { - /** - * List ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String scriptExecutionName, Context context); - - /** - * Get a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName); - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScriptExecutionInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution); - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScriptExecutionInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context); - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, String scriptExecutionName, - ScriptExecutionInner scriptExecution); - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, String scriptExecutionName, - ScriptExecutionInner scriptExecution, Context context); - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, - String scriptExecutionName); - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, - String scriptExecutionName, Context context); - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName); - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); - - /** - * Return the logs for a script execution resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, - String scriptExecutionName, List scriptOutputStreamType, Context context); - - /** - * Return the logs for a script execution resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner getExecutionLogs(String resourceGroupName, String privateCloudName, - String scriptExecutionName); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java deleted file mode 100644 index e90dea0d02713..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDhcpConfigurationsClient.java +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDhcpInner; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkDhcpConfigurationsClient. - */ -public interface WorkloadNetworkDhcpConfigurationsClient { - /** - * List WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String dhcpId, String privateCloudName, - Context context); - - /** - * Get a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner get(String resourceGroupName, String dhcpId, String privateCloudName); - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginCreate(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginCreate(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner create(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp); - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner create(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginUpdate(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginUpdate(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp); - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, String dhcpId); - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, String dhcpId, - Context context); - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String privateCloudName, String dhcpId); - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String privateCloudName, String dhcpId, Context context); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java deleted file mode 100644 index e2598f35335a2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsServicesClient.java +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsServiceInner; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkDnsServicesClient. - */ -public interface WorkloadNetworkDnsServicesClient { - /** - * List WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, - Context context); - - /** - * Get a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String dnsServiceId, Context context); - - /** - * Get a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner get(String resourceGroupName, String privateCloudName, String dnsServiceId); - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginCreate( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginCreate( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner create(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner create(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 dnsServiceId, - String privateCloudName); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 dnsServiceId, - String privateCloudName, Context context); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 dnsServiceId, String privateCloudName); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 dnsServiceId, String privateCloudName, Context context); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java deleted file mode 100644 index be70f83b4ee57..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkDnsZonesClient.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsZoneInner; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkDnsZonesClient. - */ -public interface WorkloadNetworkDnsZonesClient { - /** - * List WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String dnsZoneId, Context context); - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner get(String resourceGroupName, String privateCloudName, String dnsZoneId); - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginCreate( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginCreate( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner create(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner create(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsZoneId, String privateCloudName); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String dnsZoneId, String privateCloudName, - Context context); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsZoneId, String privateCloudName); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkGatewaysClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkGatewaysClient.java deleted file mode 100644 index dcbd3d681fb58..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkGatewaysClient.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkGatewayInner; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkGatewaysClient. - */ -public interface WorkloadNetworkGatewaysClient { - /** - * List WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkGateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId The ID of the NSX Gateway. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkGateway along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String gatewayId, Context context); - - /** - * Get a WorkloadNetworkGateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId The ID of the NSX Gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkGateway. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkGatewayInner get(String resourceGroupName, String privateCloudName, String gatewayId); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java deleted file mode 100644 index 1ee37ea3242b2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPortMirroringProfilesClient.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPortMirroringInner; - -/** - * An instance of this class provides access to all the operations defined in - * WorkloadNetworkPortMirroringProfilesClient. - */ -public interface WorkloadNetworkPortMirroringProfilesClient { - /** - * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, - Context context); - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String portMirroringId, Context context); - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner get(String resourceGroupName, String privateCloudName, String portMirroringId); - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> beginCreate( - String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> beginCreate( - String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner create(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner create(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( - String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( - String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String portMirroringId, - String privateCloudName); - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String portMirroringId, - String privateCloudName, Context context); - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String portMirroringId, String privateCloudName); - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String portMirroringId, String privateCloudName, Context context); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPublicIpsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPublicIpsClient.java deleted file mode 100644 index 8171bcf8a5d3e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkPublicIpsClient.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPublicIpInner; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkPublicIpsClient. - */ -public interface WorkloadNetworkPublicIpsClient { - /** - * List WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, - Context context); - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String publicIPId, Context context); - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner get(String resourceGroupName, String privateCloudName, String publicIPId); - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPublicIpInner> beginCreate( - String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP); - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPublicIpInner> beginCreate( - String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner create(String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP); - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner create(String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String publicIPId, - String privateCloudName); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String publicIPId, String privateCloudName, - Context context); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String publicIPId, String privateCloudName); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String publicIPId, String privateCloudName, Context context); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java deleted file mode 100644 index e16dfd89fb356..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkSegmentsClient.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkSegmentInner; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkSegmentsClient. - */ -public interface WorkloadNetworkSegmentsClient { - /** - * List WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String segmentId, Context context); - - /** - * Get a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner get(String resourceGroupName, String privateCloudName, String segmentId); - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginCreate( - String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginCreate( - String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner create(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner create(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties); - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, - Context context); - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner properties); - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner properties, Context context); - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String segmentId); - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String segmentId, Context context); - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVirtualMachinesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVirtualMachinesClient.java deleted file mode 100644 index afff6d4aa52aa..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVirtualMachinesClient.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVirtualMachineInner; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkVirtualMachinesClient. - */ -public interface WorkloadNetworkVirtualMachinesClient { - /** - * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, - Context context); - - /** - * Get a WorkloadNetworkVirtualMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVirtualMachine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String virtualMachineId, Context context); - - /** - * Get a WorkloadNetworkVirtualMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVirtualMachine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVirtualMachineInner get(String resourceGroupName, String privateCloudName, String virtualMachineId); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java deleted file mode 100644 index 787cf7509725d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworkVmGroupsClient.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVMGroupInner; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkVmGroupsClient. - */ -public interface WorkloadNetworkVmGroupsClient { - /** - * List WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String vmGroupId, Context context); - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner get(String resourceGroupName, String privateCloudName, String vmGroupId); - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginCreate( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource); - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginCreate( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, - Context context); - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner create(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner resource); - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner create(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner resource, Context context); - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( - String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( - String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String vmGroupId, String privateCloudName); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String vmGroupId, String privateCloudName, - Context context); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String vmGroupId, String privateCloudName); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java index cbdb0eb6fbe97..e8c5bfd10e63d 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 @@ -8,18 +8,57 @@ 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.WorkloadNetworkDhcpInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; +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; /** * An instance of this class provides access to all the operations defined in WorkloadNetworksClient. */ public interface WorkloadNetworksClient { + /** + * List WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + /** * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,45 +66,1965 @@ public interface WorkloadNetworksClient { * @return a WorkloadNetwork along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); /** * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetwork. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkInner get(String resourceGroupName, String privateCloudName); + WorkloadNetworkInner get(String resourceGroupName, String privateCloudName, String workloadNetworkName); /** - * List WorkloadNetwork resources by PrivateCloud. + * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); + PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** - * List WorkloadNetwork resources by PrivateCloud. + * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId); + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment); + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment); + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, + Context context); + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties); + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties, Context context); + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties); + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, Context context); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, Context context); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + Context context); + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDhcpWithResponse(String resourceGroupName, String dhcpId, + String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp); + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp); + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, Context context); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + Context context); + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param gatewayId The ID of the NSX Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId, Context context); + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId); + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName, String workloadNetworkName); + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPortMirroringWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId); + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeletePortMirroring(String resourceGroupName, String portMirroringId, + String privateCloudName); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeletePortMirroring(String resourceGroupName, String portMirroringId, + String privateCloudName, Context context); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName, + Context context); + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId); + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource); + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource, Context context); + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource); + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context); + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup); + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup); + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + Context context); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, String vmGroupId, + String privateCloudName); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, String vmGroupId, + String privateCloudName, Context context); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName, String workloadNetworkName); + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param virtualMachineId ID of the virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVirtualMachineWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context); + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String virtualMachineId); + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDnsServiceWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId); + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context); + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteDnsService(String resourceGroupName, String dnsServiceId, + String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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> beginDeleteDnsService(String resourceGroupName, String dnsServiceId, + String privateCloudName, Context context); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId); + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context); + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, String dnsZoneId, + String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, String dnsZoneId, + String privateCloudName, Context context); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPublicIPWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId); + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP); + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP); + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, + Context context); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeletePublicIP(String resourceGroupName, String publicIPId, + String privateCloudName); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeletePublicIP(String resourceGroupName, String publicIPId, + String privateCloudName, Context context); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java deleted file mode 100644 index a09b45713f6b6..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java +++ /dev/null @@ -1,410 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.ScriptExecutionParameter; -import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** - * An instance of a script executed by a user - custom or AVS. - */ -@Fluent -public final class ScriptExecutionInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private ScriptExecutionProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of ScriptExecutionInner class. - */ - public ScriptExecutionInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. - */ - private ScriptExecutionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * - * @return the scriptCmdletId value. - */ - public String scriptCmdletId() { - return this.innerProperties() == null ? null : this.innerProperties().scriptCmdletId(); - } - - /** - * Set the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * - * @param scriptCmdletId the scriptCmdletId value to set. - * @return the ScriptExecutionInner object itself. - */ - public ScriptExecutionInner withScriptCmdletId(String scriptCmdletId) { - if (this.innerProperties() == null) { - this.innerProperties = new ScriptExecutionProperties(); - } - this.innerProperties().withScriptCmdletId(scriptCmdletId); - return this; - } - - /** - * Get the parameters property: Parameters the script will accept. - * - * @return the parameters value. - */ - public List parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: Parameters the script will accept. - * - * @param parameters the parameters value to set. - * @return the ScriptExecutionInner object itself. - */ - public ScriptExecutionInner withParameters(List parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new ScriptExecutionProperties(); - } - this.innerProperties().withParameters(parameters); - return this; - } - - /** - * Get the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. - * - * @return the hiddenParameters value. - */ - public List hiddenParameters() { - return this.innerProperties() == null ? null : this.innerProperties().hiddenParameters(); - } - - /** - * Set the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. - * - * @param hiddenParameters the hiddenParameters value to set. - * @return the ScriptExecutionInner object itself. - */ - public ScriptExecutionInner withHiddenParameters(List hiddenParameters) { - if (this.innerProperties() == null) { - this.innerProperties = new ScriptExecutionProperties(); - } - this.innerProperties().withHiddenParameters(hiddenParameters); - return this; - } - - /** - * Get the failureReason property: Error message if the script was able to run, but if the script itself had - * errors or powershell threw an exception. - * - * @return the failureReason value. - */ - public String failureReason() { - return this.innerProperties() == null ? null : this.innerProperties().failureReason(); - } - - /** - * Set the failureReason property: Error message if the script was able to run, but if the script itself had - * errors or powershell threw an exception. - * - * @param failureReason the failureReason value to set. - * @return the ScriptExecutionInner object itself. - */ - public ScriptExecutionInner withFailureReason(String failureReason) { - if (this.innerProperties() == null) { - this.innerProperties = new ScriptExecutionProperties(); - } - this.innerProperties().withFailureReason(failureReason); - return this; - } - - /** - * Get the timeout property: Time limit for execution. - * - * @return the timeout value. - */ - public String timeout() { - return this.innerProperties() == null ? null : this.innerProperties().timeout(); - } - - /** - * Set the timeout property: Time limit for execution. - * - * @param timeout the timeout value to set. - * @return the ScriptExecutionInner object itself. - */ - public ScriptExecutionInner withTimeout(String timeout) { - if (this.innerProperties() == null) { - this.innerProperties = new ScriptExecutionProperties(); - } - this.innerProperties().withTimeout(timeout); - return this; - } - - /** - * Get the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * - * @return the retention value. - */ - public String retention() { - return this.innerProperties() == null ? null : this.innerProperties().retention(); - } - - /** - * Set the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * - * @param retention the retention value to set. - * @return the ScriptExecutionInner object itself. - */ - public ScriptExecutionInner withRetention(String retention) { - if (this.innerProperties() == null) { - this.innerProperties = new ScriptExecutionProperties(); - } - this.innerProperties().withRetention(retention); - return this; - } - - /** - * Get the submittedAt property: Time the script execution was submitted. - * - * @return the submittedAt value. - */ - public OffsetDateTime submittedAt() { - return this.innerProperties() == null ? null : this.innerProperties().submittedAt(); - } - - /** - * Get the startedAt property: Time the script execution was started. - * - * @return the startedAt value. - */ - public OffsetDateTime startedAt() { - return this.innerProperties() == null ? null : this.innerProperties().startedAt(); - } - - /** - * Get the finishedAt property: Time the script execution was finished. - * - * @return the finishedAt value. - */ - public OffsetDateTime finishedAt() { - return this.innerProperties() == null ? null : this.innerProperties().finishedAt(); - } - - /** - * Get the provisioningState property: The state of the script execution resource. - * - * @return the provisioningState value. - */ - public ScriptExecutionProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the output property: Standard output stream from the powershell execution. - * - * @return the output value. - */ - public List output() { - return this.innerProperties() == null ? null : this.innerProperties().output(); - } - - /** - * Set the output property: Standard output stream from the powershell execution. - * - * @param output the output value to set. - * @return the ScriptExecutionInner object itself. - */ - public ScriptExecutionInner withOutput(List output) { - if (this.innerProperties() == null) { - this.innerProperties = new ScriptExecutionProperties(); - } - this.innerProperties().withOutput(output); - return this; - } - - /** - * Get the namedOutputs property: User-defined dictionary. - * - * @return the namedOutputs value. - */ - public Map namedOutputs() { - return this.innerProperties() == null ? null : this.innerProperties().namedOutputs(); - } - - /** - * Set the namedOutputs property: User-defined dictionary. - * - * @param namedOutputs the namedOutputs value to set. - * @return the ScriptExecutionInner object itself. - */ - public ScriptExecutionInner withNamedOutputs(Map namedOutputs) { - if (this.innerProperties() == null) { - this.innerProperties = new ScriptExecutionProperties(); - } - this.innerProperties().withNamedOutputs(namedOutputs); - return this; - } - - /** - * Get the information property: Standard information out stream from the powershell execution. - * - * @return the information value. - */ - public List information() { - return this.innerProperties() == null ? null : this.innerProperties().information(); - } - - /** - * Get the warnings property: Standard warning out stream from the powershell execution. - * - * @return the warnings value. - */ - public List warnings() { - return this.innerProperties() == null ? null : this.innerProperties().warnings(); - } - - /** - * Get the errors property: Standard error output stream from the powershell execution. - * - * @return the errors value. - */ - public List errors() { - return this.innerProperties() == null ? null : this.innerProperties().errors(); - } - - /** - * 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 ScriptExecutionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptExecutionInner 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 ScriptExecutionInner. - */ - public static ScriptExecutionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptExecutionInner deserializedScriptExecutionInner = new ScriptExecutionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScriptExecutionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedScriptExecutionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedScriptExecutionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedScriptExecutionInner.innerProperties = ScriptExecutionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedScriptExecutionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScriptExecutionInner; - }); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java deleted file mode 100644 index 161f8ead51bdb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java +++ /dev/null @@ -1,442 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -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.ScriptExecutionParameter; -import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** - * Properties of a user-invoked script. - */ -@Fluent -public final class ScriptExecutionProperties implements JsonSerializable { - /* - * A reference to the script cmdlet resource if user is running a AVS script - */ - private String scriptCmdletId; - - /* - * Parameters the script will accept - */ - private List parameters; - - /* - * Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials - */ - private List hiddenParameters; - - /* - * Error message if the script was able to run, but if the script itself had - * errors or powershell threw an exception - */ - private String failureReason; - - /* - * Time limit for execution - */ - private String timeout; - - /* - * Time to live for the resource. If not provided, will be available for 60 days - */ - private String retention; - - /* - * Time the script execution was submitted - */ - private OffsetDateTime submittedAt; - - /* - * Time the script execution was started - */ - private OffsetDateTime startedAt; - - /* - * Time the script execution was finished - */ - private OffsetDateTime finishedAt; - - /* - * The state of the script execution resource - */ - private ScriptExecutionProvisioningState provisioningState; - - /* - * Standard output stream from the powershell execution - */ - private List output; - - /* - * User-defined dictionary. - */ - private Map namedOutputs; - - /* - * Standard information out stream from the powershell execution - */ - private List information; - - /* - * Standard warning out stream from the powershell execution - */ - private List warnings; - - /* - * Standard error output stream from the powershell execution - */ - private List errors; - - /** - * Creates an instance of ScriptExecutionProperties class. - */ - public ScriptExecutionProperties() { - } - - /** - * Get the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * - * @return the scriptCmdletId value. - */ - public String scriptCmdletId() { - return this.scriptCmdletId; - } - - /** - * Set the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * - * @param scriptCmdletId the scriptCmdletId value to set. - * @return the ScriptExecutionProperties object itself. - */ - public ScriptExecutionProperties withScriptCmdletId(String scriptCmdletId) { - this.scriptCmdletId = scriptCmdletId; - return this; - } - - /** - * Get the parameters property: Parameters the script will accept. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Parameters the script will accept. - * - * @param parameters the parameters value to set. - * @return the ScriptExecutionProperties object itself. - */ - public ScriptExecutionProperties withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. - * - * @return the hiddenParameters value. - */ - public List hiddenParameters() { - return this.hiddenParameters; - } - - /** - * Set the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. - * - * @param hiddenParameters the hiddenParameters value to set. - * @return the ScriptExecutionProperties object itself. - */ - public ScriptExecutionProperties withHiddenParameters(List hiddenParameters) { - this.hiddenParameters = hiddenParameters; - return this; - } - - /** - * Get the failureReason property: Error message if the script was able to run, but if the script itself had - * errors or powershell threw an exception. - * - * @return the failureReason value. - */ - public String failureReason() { - return this.failureReason; - } - - /** - * Set the failureReason property: Error message if the script was able to run, but if the script itself had - * errors or powershell threw an exception. - * - * @param failureReason the failureReason value to set. - * @return the ScriptExecutionProperties object itself. - */ - public ScriptExecutionProperties withFailureReason(String failureReason) { - this.failureReason = failureReason; - return this; - } - - /** - * Get the timeout property: Time limit for execution. - * - * @return the timeout value. - */ - public String timeout() { - return this.timeout; - } - - /** - * Set the timeout property: Time limit for execution. - * - * @param timeout the timeout value to set. - * @return the ScriptExecutionProperties object itself. - */ - public ScriptExecutionProperties withTimeout(String timeout) { - this.timeout = timeout; - return this; - } - - /** - * Get the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * - * @return the retention value. - */ - public String retention() { - return this.retention; - } - - /** - * Set the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * - * @param retention the retention value to set. - * @return the ScriptExecutionProperties object itself. - */ - public ScriptExecutionProperties withRetention(String retention) { - this.retention = retention; - return this; - } - - /** - * Get the submittedAt property: Time the script execution was submitted. - * - * @return the submittedAt value. - */ - public OffsetDateTime submittedAt() { - return this.submittedAt; - } - - /** - * Get the startedAt property: Time the script execution was started. - * - * @return the startedAt value. - */ - public OffsetDateTime startedAt() { - return this.startedAt; - } - - /** - * Get the finishedAt property: Time the script execution was finished. - * - * @return the finishedAt value. - */ - public OffsetDateTime finishedAt() { - return this.finishedAt; - } - - /** - * Get the provisioningState property: The state of the script execution resource. - * - * @return the provisioningState value. - */ - public ScriptExecutionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the output property: Standard output stream from the powershell execution. - * - * @return the output value. - */ - public List output() { - return this.output; - } - - /** - * Set the output property: Standard output stream from the powershell execution. - * - * @param output the output value to set. - * @return the ScriptExecutionProperties object itself. - */ - public ScriptExecutionProperties withOutput(List output) { - this.output = output; - return this; - } - - /** - * Get the namedOutputs property: User-defined dictionary. - * - * @return the namedOutputs value. - */ - public Map namedOutputs() { - return this.namedOutputs; - } - - /** - * Set the namedOutputs property: User-defined dictionary. - * - * @param namedOutputs the namedOutputs value to set. - * @return the ScriptExecutionProperties object itself. - */ - public ScriptExecutionProperties withNamedOutputs(Map namedOutputs) { - this.namedOutputs = namedOutputs; - return this; - } - - /** - * Get the information property: Standard information out stream from the powershell execution. - * - * @return the information value. - */ - public List information() { - return this.information; - } - - /** - * Get the warnings property: Standard warning out stream from the powershell execution. - * - * @return the warnings value. - */ - public List warnings() { - return this.warnings; - } - - /** - * Get the errors property: Standard error output stream from the powershell execution. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parameters() != null) { - parameters().forEach(e -> e.validate()); - } - if (hiddenParameters() != null) { - hiddenParameters().forEach(e -> e.validate()); - } - if (timeout() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property timeout in model ScriptExecutionProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("timeout", this.timeout); - jsonWriter.writeStringField("scriptCmdletId", this.scriptCmdletId); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("hiddenParameters", this.hiddenParameters, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("failureReason", this.failureReason); - jsonWriter.writeStringField("retention", this.retention); - jsonWriter.writeArrayField("output", this.output, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("namedOutputs", this.namedOutputs, (writer, element) -> writer.writeUntyped(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScriptExecutionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptExecutionProperties 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 ScriptExecutionProperties. - */ - public static ScriptExecutionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptExecutionProperties deserializedScriptExecutionProperties = new ScriptExecutionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timeout".equals(fieldName)) { - deserializedScriptExecutionProperties.timeout = reader.getString(); - } else if ("scriptCmdletId".equals(fieldName)) { - deserializedScriptExecutionProperties.scriptCmdletId = reader.getString(); - } else if ("parameters".equals(fieldName)) { - List parameters - = reader.readArray(reader1 -> ScriptExecutionParameter.fromJson(reader1)); - deserializedScriptExecutionProperties.parameters = parameters; - } else if ("hiddenParameters".equals(fieldName)) { - List hiddenParameters - = reader.readArray(reader1 -> ScriptExecutionParameter.fromJson(reader1)); - deserializedScriptExecutionProperties.hiddenParameters = hiddenParameters; - } else if ("failureReason".equals(fieldName)) { - deserializedScriptExecutionProperties.failureReason = reader.getString(); - } else if ("retention".equals(fieldName)) { - deserializedScriptExecutionProperties.retention = reader.getString(); - } else if ("submittedAt".equals(fieldName)) { - deserializedScriptExecutionProperties.submittedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("startedAt".equals(fieldName)) { - deserializedScriptExecutionProperties.startedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("finishedAt".equals(fieldName)) { - deserializedScriptExecutionProperties.finishedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedScriptExecutionProperties.provisioningState - = ScriptExecutionProvisioningState.fromString(reader.getString()); - } else if ("output".equals(fieldName)) { - List output = reader.readArray(reader1 -> reader1.getString()); - deserializedScriptExecutionProperties.output = output; - } else if ("namedOutputs".equals(fieldName)) { - Map namedOutputs = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedScriptExecutionProperties.namedOutputs = namedOutputs; - } else if ("information".equals(fieldName)) { - List information = reader.readArray(reader1 -> reader1.getString()); - deserializedScriptExecutionProperties.information = information; - } else if ("warnings".equals(fieldName)) { - List warnings = reader.readArray(reader1 -> reader1.getString()); - deserializedScriptExecutionProperties.warnings = warnings; - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> reader1.getString()); - deserializedScriptExecutionProperties.errors = errors; - } else { - reader.skipChildren(); - } - } - - return deserializedScriptExecutionProperties; - }); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index cdb74f3dbfc2e..1b45775aa8262 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java @@ -37,19 +37,9 @@ import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; import com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient; -import com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient; import com.azure.resourcemanager.avs.fluent.ScriptPackagesClient; import com.azure.resourcemanager.avs.fluent.VirtualMachinesClient; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDhcpConfigurationsClient; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsServicesClient; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsZonesClient; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkGatewaysClient; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkPortMirroringProfilesClient; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkPublicIpsClient; import com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkSegmentsClient; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkVirtualMachinesClient; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkVmGroupsClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -260,146 +250,6 @@ public GlobalReachConnectionsClient getGlobalReachConnections() { return this.globalReachConnections; } - /** - * The WorkloadNetworksClient object to access its operations. - */ - private final WorkloadNetworksClient workloadNetworks; - - /** - * Gets the WorkloadNetworksClient object to access its operations. - * - * @return the WorkloadNetworksClient object. - */ - public WorkloadNetworksClient getWorkloadNetworks() { - return this.workloadNetworks; - } - - /** - * The WorkloadNetworkSegmentsClient object to access its operations. - */ - private final WorkloadNetworkSegmentsClient workloadNetworkSegments; - - /** - * Gets the WorkloadNetworkSegmentsClient object to access its operations. - * - * @return the WorkloadNetworkSegmentsClient object. - */ - public WorkloadNetworkSegmentsClient getWorkloadNetworkSegments() { - return this.workloadNetworkSegments; - } - - /** - * The WorkloadNetworkDhcpConfigurationsClient object to access its operations. - */ - private final WorkloadNetworkDhcpConfigurationsClient workloadNetworkDhcpConfigurations; - - /** - * Gets the WorkloadNetworkDhcpConfigurationsClient object to access its operations. - * - * @return the WorkloadNetworkDhcpConfigurationsClient object. - */ - public WorkloadNetworkDhcpConfigurationsClient getWorkloadNetworkDhcpConfigurations() { - return this.workloadNetworkDhcpConfigurations; - } - - /** - * The WorkloadNetworkGatewaysClient object to access its operations. - */ - private final WorkloadNetworkGatewaysClient workloadNetworkGateways; - - /** - * Gets the WorkloadNetworkGatewaysClient object to access its operations. - * - * @return the WorkloadNetworkGatewaysClient object. - */ - public WorkloadNetworkGatewaysClient getWorkloadNetworkGateways() { - return this.workloadNetworkGateways; - } - - /** - * The WorkloadNetworkPortMirroringProfilesClient object to access its operations. - */ - private final WorkloadNetworkPortMirroringProfilesClient workloadNetworkPortMirroringProfiles; - - /** - * Gets the WorkloadNetworkPortMirroringProfilesClient object to access its operations. - * - * @return the WorkloadNetworkPortMirroringProfilesClient object. - */ - public WorkloadNetworkPortMirroringProfilesClient getWorkloadNetworkPortMirroringProfiles() { - return this.workloadNetworkPortMirroringProfiles; - } - - /** - * The WorkloadNetworkVmGroupsClient object to access its operations. - */ - private final WorkloadNetworkVmGroupsClient workloadNetworkVmGroups; - - /** - * Gets the WorkloadNetworkVmGroupsClient object to access its operations. - * - * @return the WorkloadNetworkVmGroupsClient object. - */ - public WorkloadNetworkVmGroupsClient getWorkloadNetworkVmGroups() { - return this.workloadNetworkVmGroups; - } - - /** - * The WorkloadNetworkVirtualMachinesClient object to access its operations. - */ - private final WorkloadNetworkVirtualMachinesClient workloadNetworkVirtualMachines; - - /** - * Gets the WorkloadNetworkVirtualMachinesClient object to access its operations. - * - * @return the WorkloadNetworkVirtualMachinesClient object. - */ - public WorkloadNetworkVirtualMachinesClient getWorkloadNetworkVirtualMachines() { - return this.workloadNetworkVirtualMachines; - } - - /** - * The WorkloadNetworkDnsServicesClient object to access its operations. - */ - private final WorkloadNetworkDnsServicesClient workloadNetworkDnsServices; - - /** - * Gets the WorkloadNetworkDnsServicesClient object to access its operations. - * - * @return the WorkloadNetworkDnsServicesClient object. - */ - public WorkloadNetworkDnsServicesClient getWorkloadNetworkDnsServices() { - return this.workloadNetworkDnsServices; - } - - /** - * The WorkloadNetworkDnsZonesClient object to access its operations. - */ - private final WorkloadNetworkDnsZonesClient workloadNetworkDnsZones; - - /** - * Gets the WorkloadNetworkDnsZonesClient object to access its operations. - * - * @return the WorkloadNetworkDnsZonesClient object. - */ - public WorkloadNetworkDnsZonesClient getWorkloadNetworkDnsZones() { - return this.workloadNetworkDnsZones; - } - - /** - * The WorkloadNetworkPublicIpsClient object to access its operations. - */ - private final WorkloadNetworkPublicIpsClient workloadNetworkPublicIps; - - /** - * Gets the WorkloadNetworkPublicIpsClient object to access its operations. - * - * @return the WorkloadNetworkPublicIpsClient object. - */ - public WorkloadNetworkPublicIpsClient getWorkloadNetworkPublicIps() { - return this.workloadNetworkPublicIps; - } - /** * The CloudLinksClient object to access its operations. */ @@ -485,31 +335,31 @@ public ScriptCmdletsClient getScriptCmdlets() { } /** - * The ScriptExecutionsClient object to access its operations. + * The IscsiPathsClient object to access its operations. */ - private final ScriptExecutionsClient scriptExecutions; + private final IscsiPathsClient iscsiPaths; /** - * Gets the ScriptExecutionsClient object to access its operations. + * Gets the IscsiPathsClient object to access its operations. * - * @return the ScriptExecutionsClient object. + * @return the IscsiPathsClient object. */ - public ScriptExecutionsClient getScriptExecutions() { - return this.scriptExecutions; + public IscsiPathsClient getIscsiPaths() { + return this.iscsiPaths; } /** - * The IscsiPathsClient object to access its operations. + * The WorkloadNetworksClient object to access its operations. */ - private final IscsiPathsClient iscsiPaths; + private final WorkloadNetworksClient workloadNetworks; /** - * Gets the IscsiPathsClient object to access its operations. + * Gets the WorkloadNetworksClient object to access its operations. * - * @return the IscsiPathsClient object. + * @return the WorkloadNetworksClient object. */ - public IscsiPathsClient getIscsiPaths() { - return this.iscsiPaths; + public WorkloadNetworksClient getWorkloadNetworks() { + return this.workloadNetworks; } /** @@ -538,24 +388,14 @@ public IscsiPathsClient getIscsiPaths() { this.hcxEnterpriseSites = new HcxEnterpriseSitesClientImpl(this); this.authorizations = new AuthorizationsClientImpl(this); this.globalReachConnections = new GlobalReachConnectionsClientImpl(this); - this.workloadNetworks = new WorkloadNetworksClientImpl(this); - this.workloadNetworkSegments = new WorkloadNetworkSegmentsClientImpl(this); - this.workloadNetworkDhcpConfigurations = new WorkloadNetworkDhcpConfigurationsClientImpl(this); - this.workloadNetworkGateways = new WorkloadNetworkGatewaysClientImpl(this); - this.workloadNetworkPortMirroringProfiles = new WorkloadNetworkPortMirroringProfilesClientImpl(this); - this.workloadNetworkVmGroups = new WorkloadNetworkVmGroupsClientImpl(this); - this.workloadNetworkVirtualMachines = new WorkloadNetworkVirtualMachinesClientImpl(this); - this.workloadNetworkDnsServices = new WorkloadNetworkDnsServicesClientImpl(this); - this.workloadNetworkDnsZones = new WorkloadNetworkDnsZonesClientImpl(this); - this.workloadNetworkPublicIps = new WorkloadNetworkPublicIpsClientImpl(this); this.cloudLinks = new CloudLinksClientImpl(this); this.addons = new AddonsClientImpl(this); this.virtualMachines = new VirtualMachinesClientImpl(this); this.placementPolicies = new PlacementPoliciesClientImpl(this); this.scriptPackages = new ScriptPackagesClientImpl(this); this.scriptCmdlets = new ScriptCmdletsClientImpl(this); - this.scriptExecutions = new ScriptExecutionsClientImpl(this); this.iscsiPaths = new IscsiPathsClientImpl(this); + this.workloadNetworks = new WorkloadNetworksClientImpl(this); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java index 5d25023809d2e..ed8f26fde32e7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java @@ -120,16 +120,14 @@ public ClusterImpl update() { public Cluster apply() { this.innerObject = serviceManager.serviceClient() .getClusters() - .updateWithResponse(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, Context.NONE) - .getValue(); + .update(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, Context.NONE); return this; } public Cluster apply(Context context) { this.innerObject = serviceManager.serviceClient() .getClusters() - .updateWithResponse(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, context) - .getValue(); + .update(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, context); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java index 65919848dfed5..ea0b217f38684 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java @@ -37,7 +37,6 @@ import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; import com.azure.resourcemanager.avs.implementation.models.ClusterList; -import com.azure.resourcemanager.avs.models.ClustersUpdateResponse; import com.azure.resourcemanager.avs.models.ClusterUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -108,7 +107,7 @@ Mono>> createOrUpdate(@HostParam("endpoint") String en @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono update(@HostParam("endpoint") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, @@ -678,10 +677,10 @@ public ClusterInner createOrUpdate(String resourceGroupName, String privateCloud * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster resource on successful completion of {@link Mono}. + * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, String privateCloudName, + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -726,10 +725,10 @@ private Mono updateWithResponseAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster resource on successful completion of {@link Mono}. + * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, String privateCloudName, + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -761,6 +760,88 @@ private Mono updateWithResponseAsync(String resourceGrou resourceGroupName, privateCloudName, clusterName, accept, clusterUpdate, context); } + /** + * Update a Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param clusterUpdate The cluster properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); + } + + /** + * Update a Cluster. + * + * @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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); + } + + /** + * Update a Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param clusterUpdate The cluster properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).getSyncPoller(); + } + + /** + * Update a Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param clusterUpdate The cluster properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, Context context) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context) + .getSyncPoller(); + } + /** * Update a Cluster. * @@ -776,8 +857,8 @@ private Mono updateWithResponseAsync(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { - return updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -791,13 +872,13 @@ private Mono updateAsync(String resourceGroupName, String privateC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster resource. + * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClustersUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, - String clusterName, ClusterUpdate clusterUpdate, Context context) { - return updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context) - .block(); + private Mono updateAsync(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -815,8 +896,26 @@ public ClustersUpdateResponse updateWithResponse(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { - return updateWithResponse(resourceGroupName, privateCloudName, clusterName, clusterUpdate, Context.NONE) - .getValue(); + return updateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).block(); + } + + /** + * Update a Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param clusterUpdate The cluster properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate, Context context) { + return updateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context).block(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java index feb385954029b..822cf3e4851fb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java @@ -5,20 +5,16 @@ 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.IscsiPathInner; import com.azure.resourcemanager.avs.models.IscsiPath; import com.azure.resourcemanager.avs.models.IscsiPathProvisioningState; -public final class IscsiPathImpl implements IscsiPath { +public final class IscsiPathImpl implements IscsiPath, IscsiPath.Definition, IscsiPath.Update { private IscsiPathInner innerObject; private final com.azure.resourcemanager.avs.AvsManager serviceManager; - IscsiPathImpl(IscsiPathInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - public String id() { return this.innerModel().id(); } @@ -43,6 +39,10 @@ public String networkBlock() { return this.innerModel().networkBlock(); } + public String resourceGroupName() { + return resourceGroupName; + } + public IscsiPathInner innerModel() { return this.innerObject; } @@ -50,4 +50,83 @@ public IscsiPathInner innerModel() { private com.azure.resourcemanager.avs.AvsManager manager() { return this.serviceManager; } + + private String resourceGroupName; + + private String privateCloudName; + + private String iscsiPathName; + + public IscsiPathImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + this.resourceGroupName = resourceGroupName; + this.privateCloudName = privateCloudName; + return this; + } + + public IscsiPath create() { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), Context.NONE); + return this; + } + + public IscsiPath create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), context); + return this; + } + + IscsiPathImpl(String name, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = new IscsiPathInner(); + this.serviceManager = serviceManager; + this.iscsiPathName = name; + } + + public IscsiPathImpl update() { + return this; + } + + public IscsiPath apply() { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), Context.NONE); + return this; + } + + public IscsiPath apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), context); + return this; + } + + IscsiPathImpl(IscsiPathInner 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.iscsiPathName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "iscsiPaths"); + } + + public IscsiPath refresh() { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE) + .getValue(); + return this; + } + + public IscsiPath refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, context) + .getValue(); + return this; + } + + public IscsiPathImpl withNetworkBlock(String networkBlock) { + this.innerModel().withNetworkBlock(networkBlock); + return this; + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java index 4fb4a26688464..9ee79639c73fa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java @@ -81,34 +81,35 @@ Mono> listByPrivateCloud(@HostParam("endpoint") St Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get(@HostParam("endpoint") 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); + @PathParam("privateCloudName") String privateCloudName, @PathParam("iscsiPathName") String iscsiPathName, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, - @BodyParam("application/json") IscsiPathInner resource, Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("iscsiPathName") String iscsiPathName, + @HeaderParam("accept") String accept, @BodyParam("application/json") IscsiPathInner resource, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("endpoint") 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); + @PathParam("privateCloudName") String privateCloudName, @PathParam("iscsiPathName") String iscsiPathName, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -269,13 +270,15 @@ public PagedIterable listByPrivateCloud(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String iscsiPathName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -292,10 +295,13 @@ private Mono> getWithResponseAsync(String resourceGroup return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -304,6 +310,7 @@ private Mono> getWithResponseAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -312,7 +319,7 @@ private Mono> getWithResponseAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, - Context context) { + String iscsiPathName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -329,10 +336,13 @@ private Mono> getWithResponseAsync(String resourceGroup return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context); + resourceGroupName, privateCloudName, iscsiPathName, accept, context); } /** @@ -340,14 +350,15 @@ private Mono> getWithResponseAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName) { - return getWithResponseAsync(resourceGroupName, privateCloudName) + private Mono getAsync(String resourceGroupName, String privateCloudName, String iscsiPathName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -356,6 +367,7 @@ private Mono getAsync(String resourceGroupName, String privateCl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -364,8 +376,8 @@ private Mono getAsync(String resourceGroupName, String privateCl */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String privateCloudName, - Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, context).block(); + String iscsiPathName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, context).block(); } /** @@ -373,14 +385,15 @@ public Response getWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IscsiPathInner get(String resourceGroupName, String privateCloudName) { - return getWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); + public IscsiPathInner get(String resourceGroupName, String privateCloudName, String iscsiPathName) { + return getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE).getValue(); } /** @@ -388,6 +401,7 @@ public IscsiPathInner get(String resourceGroupName, String privateCloudName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -396,7 +410,7 @@ public IscsiPathInner get(String resourceGroupName, String privateCloudName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String privateCloudName, IscsiPathInner resource) { + String privateCloudName, String iscsiPathName, IscsiPathInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -413,6 +427,9 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } if (resource == null) { return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { @@ -421,7 +438,8 @@ private Mono>> createOrUpdateWithResponseAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, resource, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, resource, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -430,6 +448,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -439,7 +458,7 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String privateCloudName, IscsiPathInner resource, Context context) { + String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -456,6 +475,9 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } if (resource == null) { return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { @@ -464,7 +486,8 @@ private Mono>> createOrUpdateWithResponseAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, resource, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, resource, + context); } /** @@ -472,6 +495,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -480,9 +504,9 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiPathInner> beginCreateOrUpdateAsync(String resourceGroupName, - String privateCloudName, IscsiPathInner resource) { + String privateCloudName, String iscsiPathName, IscsiPathInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, resource); + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), IscsiPathInner.class, IscsiPathInner.class, this.client.getContext()); } @@ -492,6 +516,7 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -501,10 +526,10 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiPathInner> beginCreateOrUpdateAsync(String resourceGroupName, - String privateCloudName, IscsiPathInner resource, Context context) { + String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, resource, context); + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), IscsiPathInner.class, IscsiPathInner.class, context); } @@ -514,6 +539,7 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -522,8 +548,9 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, IscsiPathInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource).getSyncPoller(); + String privateCloudName, String iscsiPathName, IscsiPathInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource) + .getSyncPoller(); } /** @@ -531,6 +558,7 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -540,8 +568,9 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, IscsiPathInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).getSyncPoller(); + String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context) + .getSyncPoller(); } /** @@ -549,6 +578,7 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -557,8 +587,8 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, - IscsiPathInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource).last() + String iscsiPathName, IscsiPathInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -567,6 +597,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -576,8 +607,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, - IscsiPathInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).last() + String iscsiPathName, IscsiPathInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -586,6 +617,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -593,8 +625,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource) { - return createOrUpdateAsync(resourceGroupName, privateCloudName, resource).block(); + public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, + IscsiPathInner resource) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource).block(); } /** @@ -602,6 +635,7 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -610,9 +644,9 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, - Context context) { - return createOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).block(); + public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, + IscsiPathInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context).block(); } /** @@ -620,14 +654,15 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String iscsiPathName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -644,10 +679,13 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -656,6 +694,7 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -664,7 +703,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, - Context context) { + String iscsiPathName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -681,10 +720,13 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context); + resourceGroupName, privateCloudName, iscsiPathName, accept, context); } /** @@ -692,14 +734,17 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String iscsiPathName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -709,6 +754,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -717,9 +763,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, - Context context) { + String iscsiPathName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -729,14 +776,16 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String iscsiPathName) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName).getSyncPoller(); } /** @@ -744,6 +793,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -752,8 +802,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); + String iscsiPathName, Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName, context).getSyncPoller(); } /** @@ -761,14 +811,15 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateCloudName) { - return beginDeleteAsync(resourceGroupName, privateCloudName).last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String iscsiPathName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -777,6 +828,7 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -784,8 +836,9 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateCloudName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, context).last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String iscsiPathName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -794,13 +847,14 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateCloudName) { - deleteAsync(resourceGroupName, privateCloudName).block(); + public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName) { + deleteAsync(resourceGroupName, privateCloudName, iscsiPathName).block(); } /** @@ -808,14 +862,15 @@ public void delete(String resourceGroupName, String privateCloudName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateCloudName, Context context) { - deleteAsync(resourceGroupName, privateCloudName, context).block(); + public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context) { + deleteAsync(resourceGroupName, privateCloudName, iscsiPathName, context).block(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java index 09bdc6a51539d..4ea5e6c7b4b61 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java @@ -39,9 +39,10 @@ public PagedIterable listByPrivateCloud(String resourceGroupName, Str return ResourceManagerUtils.mapPage(inner, inner1 -> new IscsiPathImpl(inner1, this.manager())); } - public Response getWithResponse(String resourceGroupName, String privateCloudName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName, + Context context) { Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, context); + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new IscsiPathImpl(inner.getValue(), this.manager())); @@ -50,8 +51,8 @@ public Response getWithResponse(String resourceGroupName, String priv } } - public IscsiPath get(String resourceGroupName, String privateCloudName) { - IscsiPathInner inner = this.serviceClient().get(resourceGroupName, privateCloudName); + public IscsiPath get(String resourceGroupName, String privateCloudName, String iscsiPathName) { + IscsiPathInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, iscsiPathName); if (inner != null) { return new IscsiPathImpl(inner, this.manager()); } else { @@ -59,32 +60,88 @@ public IscsiPath get(String resourceGroupName, String privateCloudName) { } } - public IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource) { - IscsiPathInner inner = this.serviceClient().createOrUpdate(resourceGroupName, privateCloudName, resource); - if (inner != null) { - return new IscsiPathImpl(inner, this.manager()); - } else { - return null; + public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName) { + this.serviceClient().delete(resourceGroupName, privateCloudName, iscsiPathName); + } + + public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context) { + this.serviceClient().delete(resourceGroupName, privateCloudName, iscsiPathName, context); + } + + public IscsiPath 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); + if (iscsiPathName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE).getValue(); } - public IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, - Context context) { - IscsiPathInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, privateCloudName, resource, context); - if (inner != null) { - return new IscsiPathImpl(inner, this.manager()); - } else { - return null; + public 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); + if (iscsiPathName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, context); } - public void deleteByResourceGroup(String resourceGroupName, String privateCloudName) { - this.serviceClient().delete(resourceGroupName, privateCloudName); + 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); + if (iscsiPathName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + } + this.delete(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE); } - public void delete(String resourceGroupName, String privateCloudName, Context context) { - this.serviceClient().delete(resourceGroupName, privateCloudName, context); + 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); + if (iscsiPathName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + } + this.delete(resourceGroupName, privateCloudName, iscsiPathName, context); } private IscsiPathsClient serviceClient() { @@ -94,4 +151,8 @@ private IscsiPathsClient serviceClient() { private com.azure.resourcemanager.avs.AvsManager manager() { return this.serviceManager; } + + public IscsiPathImpl define(String name) { + return new IscsiPathImpl(name, this.manager()); + } } 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 7378cba3f89b5..8518d9a16dc01 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 @@ -35,7 +35,6 @@ import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; import com.azure.resourcemanager.avs.implementation.models.PlacementPoliciesList; -import com.azure.resourcemanager.avs.models.PlacementPoliciesUpdateResponse; import com.azure.resourcemanager.avs.models.PlacementPolicyUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -109,7 +108,7 @@ Mono>> createOrUpdate(@HostParam("endpoint") String en @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono update(@HostParam("endpoint") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, @@ -740,12 +739,12 @@ public PlacementPolicyInner createOrUpdate(String resourceGroupName, String priv * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. + * @return a vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, - String privateCloudName, String clusterName, String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -795,12 +794,12 @@ private Mono updateWithResponseAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. + * @return a vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, - String privateCloudName, String clusterName, String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -837,6 +836,101 @@ private Mono updateWithResponseAsync(String res context); } + /** + * Update a PlacementPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PlacementPolicyInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, placementPolicyName, placementPolicyUpdate); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PlacementPolicyInner.class, PlacementPolicyInner.class, this.client.getContext()); + } + + /** + * Update a PlacementPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PlacementPolicyInner> beginUpdateAsync( + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, placementPolicyName, placementPolicyUpdate, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PlacementPolicyInner.class, PlacementPolicyInner.class, context); + } + + /** + * Update a PlacementPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PlacementPolicyInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate) { + return this + .beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate) + .getSyncPoller(); + } + + /** + * Update a PlacementPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PlacementPolicyInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate, Context context) { + return this + .beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate, context) + .getSyncPoller(); + } + /** * Update a PlacementPolicy. * @@ -853,8 +947,8 @@ private Mono updateWithResponseAsync(String res @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { - return updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, - placementPolicyUpdate).flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -869,13 +963,13 @@ private Mono updateAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. + * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPoliciesUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, + private Mono updateAsync(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context) { - return updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, - placementPolicyUpdate, context).block(); + return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -894,8 +988,29 @@ public PlacementPoliciesUpdateResponse updateWithResponse(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { - return updateWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, - placementPolicyUpdate, Context.NONE).getValue(); + return updateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate) + .block(); + } + + /** + * Update a PlacementPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context) { + return updateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, + context).block(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java index 347ae062f93bb..b569436390db0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java @@ -100,18 +100,16 @@ public PlacementPolicyImpl update() { public PlacementPolicy apply() { this.innerObject = serviceManager.serviceClient() .getPlacementPolicies() - .updateWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, - updatePlacementPolicyUpdate, Context.NONE) - .getValue(); + .update(resourceGroupName, privateCloudName, clusterName, placementPolicyName, updatePlacementPolicyUpdate, + Context.NONE); return this; } public PlacementPolicy apply(Context context) { this.innerObject = serviceManager.serviceClient() .getPlacementPolicies() - .updateWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, - updatePlacementPolicyUpdate, context) - .getValue(); + .update(resourceGroupName, privateCloudName, clusterName, placementPolicyName, updatePlacementPolicyUpdate, + context); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java index 1568002f301b9..aa7eabaff98fd 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 @@ -232,16 +232,14 @@ public PrivateCloudImpl update() { public PrivateCloud apply() { this.innerObject = serviceManager.serviceClient() .getPrivateClouds() - .updateWithResponse(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, Context.NONE) - .getValue(); + .update(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, Context.NONE); return this; } public PrivateCloud apply(Context context) { this.innerObject = serviceManager.serviceClient() .getPrivateClouds() - .updateWithResponse(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, context) - .getValue(); + .update(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, context); return this; } 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 9614965414eca..436c9285d38d5 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 @@ -37,7 +37,6 @@ import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; import com.azure.resourcemanager.avs.implementation.models.PrivateCloudList; -import com.azure.resourcemanager.avs.models.PrivateCloudsUpdateResponse; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -116,7 +115,7 @@ Mono>> createOrUpdate(@HostParam("endpoint") String en @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono update(@HostParam("endpoint") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -779,10 +778,10 @@ public PrivateCloudInner createOrUpdate(String resourceGroupName, String private * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud resource on successful completion of {@link Mono}. + * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, String privateCloudName, + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -822,10 +821,10 @@ private Mono updateWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud resource on successful completion of {@link Mono}. + * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, String privateCloudName, + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -855,6 +854,83 @@ private Mono updateWithResponseAsync(String resourc resourceGroupName, privateCloudName, accept, privateCloudUpdate, context); } + /** + * Update a PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param privateCloudUpdate The private cloud properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a private cloud resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateCloudInner> beginUpdateAsync(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateCloudInner.class, PrivateCloudInner.class, this.client.getContext()); + } + + /** + * Update a PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param privateCloudUpdate The private cloud properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a private cloud resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateCloudInner> beginUpdateAsync(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateCloudInner.class, PrivateCloudInner.class, context); + } + + /** + * Update a PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param privateCloudUpdate The private cloud properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a private cloud resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateCloudInner> beginUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).getSyncPoller(); + } + + /** + * Update a PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param privateCloudUpdate The private cloud properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a private cloud resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateCloudInner> beginUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).getSyncPoller(); + } + /** * Update a PrivateCloud. * @@ -869,8 +945,8 @@ private Mono updateWithResponseAsync(String resourc @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { - return updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -883,12 +959,13 @@ private Mono updateAsync(String resourceGroupName, String pri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private cloud resource. + * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudsUpdateResponse updateWithResponse(String resourceGroupName, String privateCloudName, + private Mono updateAsync(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { - return updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).block(); + return beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -905,7 +982,25 @@ public PrivateCloudsUpdateResponse updateWithResponse(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public PrivateCloudInner update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { - return updateWithResponse(resourceGroupName, privateCloudName, privateCloudUpdate, Context.NONE).getValue(); + return updateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).block(); + } + + /** + * Update a PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param privateCloudUpdate The private cloud properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private cloud resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateCloudInner update(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate, Context context) { + return updateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).block(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java deleted file mode 100644 index 84b118600ca65..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; -import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; -import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class ScriptExecutionImpl implements ScriptExecution, ScriptExecution.Definition, ScriptExecution.Update { - private ScriptExecutionInner 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 scriptCmdletId() { - return this.innerModel().scriptCmdletId(); - } - - public List parameters() { - List inner = this.innerModel().parameters(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List hiddenParameters() { - List inner = this.innerModel().hiddenParameters(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String failureReason() { - return this.innerModel().failureReason(); - } - - public String timeout() { - return this.innerModel().timeout(); - } - - public String retention() { - return this.innerModel().retention(); - } - - public OffsetDateTime submittedAt() { - return this.innerModel().submittedAt(); - } - - public OffsetDateTime startedAt() { - return this.innerModel().startedAt(); - } - - public OffsetDateTime finishedAt() { - return this.innerModel().finishedAt(); - } - - public ScriptExecutionProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public List output() { - List inner = this.innerModel().output(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Map namedOutputs() { - Map inner = this.innerModel().namedOutputs(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public List information() { - List inner = this.innerModel().information(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List warnings() { - List inner = this.innerModel().warnings(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List errors() { - List inner = this.innerModel().errors(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ScriptExecutionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.avs.AvsManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String privateCloudName; - - private String scriptExecutionName; - - public ScriptExecutionImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { - this.resourceGroupName = resourceGroupName; - this.privateCloudName = privateCloudName; - return this; - } - - public ScriptExecution create() { - this.innerObject = serviceManager.serviceClient() - .getScriptExecutions() - .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), Context.NONE); - return this; - } - - public ScriptExecution create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScriptExecutions() - .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), context); - return this; - } - - ScriptExecutionImpl(String name, com.azure.resourcemanager.avs.AvsManager serviceManager) { - this.innerObject = new ScriptExecutionInner(); - this.serviceManager = serviceManager; - this.scriptExecutionName = name; - } - - public ScriptExecutionImpl update() { - return this; - } - - public ScriptExecution apply() { - this.innerObject = serviceManager.serviceClient() - .getScriptExecutions() - .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), Context.NONE); - return this; - } - - public ScriptExecution apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScriptExecutions() - .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), context); - return this; - } - - ScriptExecutionImpl(ScriptExecutionInner 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.scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scriptExecutions"); - } - - public ScriptExecution refresh() { - this.innerObject = serviceManager.serviceClient() - .getScriptExecutions() - .getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE) - .getValue(); - return this; - } - - public ScriptExecution refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getScriptExecutions() - .getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, context) - .getValue(); - return this; - } - - public Response getExecutionLogsWithResponse(List scriptOutputStreamType, - Context context) { - return serviceManager.scriptExecutions() - .getExecutionLogsWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, - scriptOutputStreamType, context); - } - - public ScriptExecution getExecutionLogs() { - return serviceManager.scriptExecutions() - .getExecutionLogs(resourceGroupName, privateCloudName, scriptExecutionName); - } - - public ScriptExecutionImpl withScriptCmdletId(String scriptCmdletId) { - this.innerModel().withScriptCmdletId(scriptCmdletId); - return this; - } - - public ScriptExecutionImpl withParameters(List parameters) { - this.innerModel().withParameters(parameters); - return this; - } - - public ScriptExecutionImpl withHiddenParameters(List hiddenParameters) { - this.innerModel().withHiddenParameters(hiddenParameters); - return this; - } - - public ScriptExecutionImpl withFailureReason(String failureReason) { - this.innerModel().withFailureReason(failureReason); - return this; - } - - public ScriptExecutionImpl withTimeout(String timeout) { - this.innerModel().withTimeout(timeout); - return this; - } - - public ScriptExecutionImpl withRetention(String retention) { - this.innerModel().withRetention(retention); - return this; - } - - public ScriptExecutionImpl withOutput(List output) { - this.innerModel().withOutput(output); - return this; - } - - public ScriptExecutionImpl withNamedOutputs(Map namedOutputs) { - this.innerModel().withNamedOutputs(namedOutputs); - return this; - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java deleted file mode 100644 index 7ebf69bdc28e3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java +++ /dev/null @@ -1,1111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.Post; -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.ScriptExecutionsClient; -import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import com.azure.resourcemanager.avs.implementation.models.ScriptExecutionsList; -import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -import java.nio.ByteBuffer; -import java.util.List; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ScriptExecutionsClient. - */ -public final class ScriptExecutionsClientImpl implements ScriptExecutionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ScriptExecutionsService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of ScriptExecutionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ScriptExecutionsClientImpl(AvsClientImpl client) { - this.service - = RestProxy.create(ScriptExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientScriptExecutions to be used by the proxy service to perform - * REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientScriptExecu") - public interface ScriptExecutionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/scriptExecutions/{scriptExecutionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("accept") String accept, - @BodyParam("application/json") ScriptExecutionInner scriptExecution, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getExecutionLogs(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("accept") String accept, - @BodyParam("application/json") List scriptOutputStreamType, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); - } - - /** - * List ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String privateCloudName) { - 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 ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { - 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 ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution 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 ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (scriptExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName, Context context) { - 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 (scriptExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecutionName 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, scriptExecutionName, accept, context); - } - - /** - * Get a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName) { - return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String scriptExecutionName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).block(); - } - - /** - * Get a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName) { - return getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE).getValue(); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (scriptExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); - } - if (scriptExecution == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecution is required and cannot be null.")); - } else { - scriptExecution.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, - scriptExecution, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (scriptExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); - } - if (scriptExecution == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecution is required and cannot be null.")); - } else { - scriptExecution.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, scriptExecutionName, accept, - scriptExecution, context); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScriptExecutionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName, - ScriptExecutionInner scriptExecution) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, - scriptExecutionName, scriptExecution); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScriptExecutionInner.class, ScriptExecutionInner.class, this.client.getContext()); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScriptExecutionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName, - ScriptExecutionInner scriptExecution, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, - scriptExecutionName, scriptExecution, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScriptExecutionInner.class, ScriptExecutionInner.class, context); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String scriptExecutionName, - ScriptExecutionInner scriptExecution) { - return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution) - .getSyncPoller(); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String scriptExecutionName, - ScriptExecutionInner scriptExecution, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, - context) - .getSyncPoller(); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName, ScriptExecutionInner scriptExecution) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, - String scriptExecutionName, ScriptExecutionInner scriptExecution) { - return createOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution).block(); - } - - /** - * Create a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptExecution Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, - String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { - return createOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, context) - .block(); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName) { - 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 (scriptExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (scriptExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecutionName 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, scriptExecutionName, accept, context); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, - String scriptExecutionName) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName).getSyncPoller(); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, - String scriptExecutionName, Context context) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).getSyncPoller(); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName, - Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName) { - deleteAsync(resourceGroupName, privateCloudName, scriptExecutionName).block(); - } - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { - deleteAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).block(); - } - - /** - * Return the logs for a script execution resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getExecutionLogsWithResponseAsync(String resourceGroupName, - String privateCloudName, String scriptExecutionName, List scriptOutputStreamType) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (scriptExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getExecutionLogs(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, - scriptOutputStreamType, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Return the logs for a script execution resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getExecutionLogsWithResponseAsync(String resourceGroupName, - String privateCloudName, String scriptExecutionName, List scriptOutputStreamType, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (scriptExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getExecutionLogs(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, - scriptOutputStreamType, context); - } - - /** - * Return the logs for a script execution resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getExecutionLogsAsync(String resourceGroupName, String privateCloudName, - String scriptExecutionName) { - final List scriptOutputStreamType = null; - return getExecutionLogsWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, - scriptOutputStreamType).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Return the logs for a script execution resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getExecutionLogsWithResponse(String resourceGroupName, - String privateCloudName, String scriptExecutionName, List scriptOutputStreamType, - Context context) { - return getExecutionLogsWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, - scriptOutputStreamType, context).block(); - } - - /** - * Return the logs for a script execution resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptExecutionInner getExecutionLogs(String resourceGroupName, String privateCloudName, - String scriptExecutionName) { - final List scriptOutputStreamType = null; - return getExecutionLogsWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, - scriptOutputStreamType, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ScriptExecution 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 ScriptExecution 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/ScriptExecutionsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java deleted file mode 100644 index 6815b319f0bd3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.ScriptExecutionsClient; -import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import com.azure.resourcemanager.avs.models.ScriptExecutions; -import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -import java.util.List; - -public final class ScriptExecutionsImpl implements ScriptExecutions { - private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionsImpl.class); - - private final ScriptExecutionsClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public ScriptExecutionsImpl(ScriptExecutionsClient innerClient, - com.azure.resourcemanager.avs.AvsManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String privateCloudName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptExecutionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, privateCloudName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptExecutionImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String scriptExecutionName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ScriptExecutionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ScriptExecution get(String resourceGroupName, String privateCloudName, String scriptExecutionName) { - ScriptExecutionInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, scriptExecutionName); - if (inner != null) { - return new ScriptExecutionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName) { - this.serviceClient().delete(resourceGroupName, privateCloudName, scriptExecutionName); - } - - public void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { - this.serviceClient().delete(resourceGroupName, privateCloudName, scriptExecutionName, context); - } - - public Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, - String scriptExecutionName, List scriptOutputStreamType, Context context) { - Response inner = this.serviceClient() - .getExecutionLogsWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, - scriptOutputStreamType, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ScriptExecutionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ScriptExecution getExecutionLogs(String resourceGroupName, String privateCloudName, - String scriptExecutionName) { - ScriptExecutionInner inner - = this.serviceClient().getExecutionLogs(resourceGroupName, privateCloudName, scriptExecutionName); - if (inner != null) { - return new ScriptExecutionImpl(inner, this.manager()); - } else { - return null; - } - } - - public ScriptExecution 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 scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); - if (scriptExecutionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, 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 scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); - if (scriptExecutionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, 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 scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); - if (scriptExecutionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); - } - this.delete(resourceGroupName, privateCloudName, scriptExecutionName, 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 scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); - if (scriptExecutionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); - } - this.delete(resourceGroupName, privateCloudName, scriptExecutionName, context); - } - - private ScriptExecutionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.avs.AvsManager manager() { - return this.serviceManager; - } - - public ScriptExecutionImpl define(String name) { - return new ScriptExecutionImpl(name, this.manager()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java deleted file mode 100644 index d43cf11ffa1ff..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsClientImpl.java +++ /dev/null @@ -1,1200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDhcpConfigurationsClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDhcpList; -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 WorkloadNetworkDhcpConfigurationsClient. - */ -public final class WorkloadNetworkDhcpConfigurationsClientImpl implements WorkloadNetworkDhcpConfigurationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkloadNetworkDhcpConfigurationsService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of WorkloadNetworkDhcpConfigurationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkloadNetworkDhcpConfigurationsClientImpl(AvsClientImpl client) { - this.service = RestProxy.create(WorkloadNetworkDhcpConfigurationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientWorkloadNetworkDhcpConfigurations to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") - public interface WorkloadNetworkDhcpConfigurationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dhcpId") String dhcpId, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, - @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("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); - } - - /** - * List WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp 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 WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp 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 WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp 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 WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp 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 WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp 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 WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp 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 WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String dhcpId, - String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, dhcpId, privateCloudName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String dhcpId, - String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, dhcpId, privateCloudName, accept, context); - } - - /** - * Get a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String dhcpId, String privateCloudName) { - return getWithResponseAsync(resourceGroupName, dhcpId, privateCloudName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String dhcpId, - String privateCloudName, Context context) { - return getWithResponseAsync(resourceGroupName, dhcpId, privateCloudName, context).block(); - } - - /** - * Get a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner get(String resourceGroupName, String dhcpId, String privateCloudName) { - return getWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); - } else { - workloadNetworkDhcp.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, - workloadNetworkDhcp, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); - } else { - workloadNetworkDhcp.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, dhcpId, accept, workloadNetworkDhcp, context); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, - this.client.getContext()); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginCreate( - String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).getSyncPoller(); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginCreate( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginCreateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return beginCreateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner create(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return createAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); - } - - /** - * Create a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner create(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return createAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); - } else { - workloadNetworkDhcp.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, - workloadNetworkDhcp, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); - } else { - workloadNetworkDhcp.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, dhcpId, accept, workloadNetworkDhcp, context); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, - this.client.getContext()); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).getSyncPoller(); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return updateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); - } - - /** - * Update a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param workloadNetworkDhcp The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DHCP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner update(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return updateAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, - String dhcpId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, - String dhcpId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, dhcpId, accept, context); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, - String dhcpId) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, dhcpId); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @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 dhcpId, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, - String dhcpId) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName, dhcpId).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @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 dhcpId, Context context) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName, dhcpId, context).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateCloudName, String dhcpId) { - return beginDeleteAsync(resourceGroupName, privateCloudName, dhcpId).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, dhcpId, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateCloudName, String dhcpId) { - deleteAsync(resourceGroupName, privateCloudName, dhcpId).block(); - } - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - deleteAsync(resourceGroupName, privateCloudName, dhcpId, 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 WorkloadNetworkDhcp 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 WorkloadNetworkDhcp 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/WorkloadNetworkDhcpConfigurationsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsImpl.java deleted file mode 100644 index 7258ae59e5596..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpConfigurationsImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDhcpConfigurationsClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpConfigurations; - -public final class WorkloadNetworkDhcpConfigurationsImpl implements WorkloadNetworkDhcpConfigurations { - private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDhcpConfigurationsImpl.class); - - private final WorkloadNetworkDhcpConfigurationsClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public WorkloadNetworkDhcpConfigurationsImpl(WorkloadNetworkDhcpConfigurationsClient 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 WorkloadNetworkDhcpImpl(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 WorkloadNetworkDhcpImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String dhcpId, - String privateCloudName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, dhcpId, privateCloudName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkloadNetworkDhcpImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkDhcp get(String resourceGroupName, String dhcpId, String privateCloudName) { - WorkloadNetworkDhcpInner inner = this.serviceClient().get(resourceGroupName, dhcpId, privateCloudName); - if (inner != null) { - return new WorkloadNetworkDhcpImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String privateCloudName, String dhcpId) { - this.serviceClient().delete(resourceGroupName, privateCloudName, dhcpId); - } - - public void delete(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - this.serviceClient().delete(resourceGroupName, privateCloudName, dhcpId, context); - } - - public WorkloadNetworkDhcp 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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - String privateCloudName = 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))); - } - return this.getWithResponse(resourceGroupName, dhcpId, privateCloudName, 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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - String privateCloudName = 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))); - } - return this.getWithResponse(resourceGroupName, dhcpId, privateCloudName, 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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - this.delete(resourceGroupName, privateCloudName, dhcpId, 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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - this.delete(resourceGroupName, privateCloudName, dhcpId, context); - } - - private WorkloadNetworkDhcpConfigurationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.avs.AvsManager manager() { - return this.serviceManager; - } - - public WorkloadNetworkDhcpImpl define(String name) { - return new WorkloadNetworkDhcpImpl(name, this.manager()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java index 0284a4d8a00ff..bd50b77cd1ce3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java @@ -52,25 +52,30 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String dhcpId; - public WorkloadNetworkDhcpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkDhcpImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkDhcp create() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDhcpConfigurations() - .create(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .createDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDhcp create(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDhcpConfigurations() - .create(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); + .getWorkloadNetworks() + .createDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), context); return this; } @@ -86,15 +91,16 @@ public WorkloadNetworkDhcpImpl update() { public WorkloadNetworkDhcp apply() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDhcpConfigurations() - .update(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .updateDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDhcp apply(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDhcpConfigurations() - .update(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); + .getWorkloadNetworks() + .updateDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), context); return this; } @@ -104,25 +110,10 @@ public WorkloadNetworkDhcp apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.dhcpId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dhcpConfigurations"); } - public WorkloadNetworkDhcp refresh() { - this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDhcpConfigurations() - .getWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE) - .getValue(); - return this; - } - - public WorkloadNetworkDhcp refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDhcpConfigurations() - .getWithResponse(resourceGroupName, dhcpId, privateCloudName, context) - .getValue(); - return this; - } - public WorkloadNetworkDhcpImpl withProperties(WorkloadNetworkDhcpEntity properties) { this.innerModel().withProperties(properties); return this; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java index 3c026426842c0..0ed5214d08bdb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java @@ -89,25 +89,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String dnsServiceId; - public WorkloadNetworkDnsServiceImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkDnsServiceImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkDnsService create() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsServices() - .create(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .createDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDnsService create(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsServices() - .create(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); + .getWorkloadNetworks() + .createDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), + context); return this; } @@ -123,15 +129,17 @@ public WorkloadNetworkDnsServiceImpl update() { public WorkloadNetworkDnsService apply() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsServices() - .update(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .updateDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDnsService apply(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsServices() - .update(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); + .getWorkloadNetworks() + .updateDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), + context); return this; } @@ -141,21 +149,23 @@ public WorkloadNetworkDnsService apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.dnsServiceId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsServices"); } public WorkloadNetworkDnsService refresh() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsServices() - .getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) + .getWorkloadNetworks() + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + Context.NONE) .getValue(); return this; } public WorkloadNetworkDnsService refresh(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsServices() - .getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context) + .getWorkloadNetworks() + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java deleted file mode 100644 index aab39f45d27c0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesClientImpl.java +++ /dev/null @@ -1,1217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsServicesClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServicesList; -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 WorkloadNetworkDnsServicesClient. - */ -public final class WorkloadNetworkDnsServicesClientImpl implements WorkloadNetworkDnsServicesClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkloadNetworkDnsServicesService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of WorkloadNetworkDnsServicesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkloadNetworkDnsServicesClientImpl(AvsClientImpl client) { - this.service = RestProxy.create(WorkloadNetworkDnsServicesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientWorkloadNetworkDnsServices to be used by the proxy service - * to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") - public interface WorkloadNetworkDnsServicesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, - @HeaderParam("accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsServiceId") String dnsServiceId, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); - } - - /** - * List WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService 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 WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService 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 WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService 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 WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService 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 WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService 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 WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService 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 WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, dnsServiceId, accept, context); - } - - /** - * Get a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId) { - return getWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String dnsServiceId, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, context).block(); - } - - /** - * Get a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner get(String resourceGroupName, String privateCloudName, String dnsServiceId) { - return getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE).getValue(); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, - workloadNetworkDnsService, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, dnsServiceId, accept, workloadNetworkDnsService, context); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, - this.client.getContext()); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, privateCloudName, - dnsServiceId, workloadNetworkDnsService, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, - context); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreate( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreate( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return this - .beginCreateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginCreateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return beginCreateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner create(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return createAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).block(); - } - - /** - * Create a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner create(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return createAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .block(); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, - workloadNetworkDnsService, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, dnsServiceId, accept, workloadNetworkDnsService, context); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, - this.client.getContext()); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, - dnsServiceId, workloadNetworkDnsService, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, - context); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return this - .beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return updateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService).block(); - } - - /** - * Update a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param workloadNetworkDnsService The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner update(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return updateAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .block(); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsServiceId, - 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 (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, dnsServiceId, privateCloudName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsServiceId, - String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, dnsServiceId, privateCloudName, accept, context); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsServiceId, - String privateCloudName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsServiceId, - String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsServiceId, - String privateCloudName) { - return this.beginDeleteAsync(resourceGroupName, dnsServiceId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsServiceId, - String privateCloudName, Context context) { - return this.beginDeleteAsync(resourceGroupName, dnsServiceId, privateCloudName, context).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsServiceId, String privateCloudName) { - return beginDeleteAsync(resourceGroupName, dnsServiceId, privateCloudName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsServiceId, String privateCloudName, - Context context) { - return beginDeleteAsync(resourceGroupName, dnsServiceId, privateCloudName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 dnsServiceId, String privateCloudName) { - deleteAsync(resourceGroupName, dnsServiceId, privateCloudName).block(); - } - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 dnsServiceId, String privateCloudName, Context context) { - deleteAsync(resourceGroupName, dnsServiceId, privateCloudName, 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 WorkloadNetworkDnsService 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 WorkloadNetworkDnsService 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/WorkloadNetworkDnsServicesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesImpl.java deleted file mode 100644 index 7acae0cd5e6da..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServicesImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsServicesClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServices; - -public final class WorkloadNetworkDnsServicesImpl implements WorkloadNetworkDnsServices { - private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsServicesImpl.class); - - private final WorkloadNetworkDnsServicesClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public WorkloadNetworkDnsServicesImpl(WorkloadNetworkDnsServicesClient 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 WorkloadNetworkDnsServiceImpl(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 WorkloadNetworkDnsServiceImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String dnsServiceId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkloadNetworkDnsServiceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkDnsService get(String resourceGroupName, String privateCloudName, String dnsServiceId) { - WorkloadNetworkDnsServiceInner inner - = this.serviceClient().get(resourceGroupName, privateCloudName, dnsServiceId); - if (inner != null) { - return new WorkloadNetworkDnsServiceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String dnsServiceId, String privateCloudName) { - this.serviceClient().delete(resourceGroupName, dnsServiceId, privateCloudName); - } - - public void delete(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - this.serviceClient().delete(resourceGroupName, dnsServiceId, privateCloudName, context); - } - - public WorkloadNetworkDnsService 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 dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, 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 dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, dnsServiceId, 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 dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, dnsServiceId, privateCloudName, 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 dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, dnsServiceId, privateCloudName, context); - } - - private WorkloadNetworkDnsServicesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.avs.AvsManager manager() { - return this.serviceManager; - } - - public WorkloadNetworkDnsServiceImpl define(String name) { - return new WorkloadNetworkDnsServiceImpl(name, this.manager()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java index 6775902bc139c..68163d3050111 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java @@ -88,25 +88,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String dnsZoneId; - public WorkloadNetworkDnsZoneImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkDnsZoneImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkDnsZone create() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsZones() - .create(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .createDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDnsZone create(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsZones() - .create(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); + .getWorkloadNetworks() + .createDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), + context); return this; } @@ -122,15 +128,17 @@ public WorkloadNetworkDnsZoneImpl update() { public WorkloadNetworkDnsZone apply() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsZones() - .update(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .updateDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDnsZone apply(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsZones() - .update(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); + .getWorkloadNetworks() + .updateDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), + context); return this; } @@ -140,21 +148,22 @@ public WorkloadNetworkDnsZone apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.dnsZoneId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsZones"); } public WorkloadNetworkDnsZone refresh() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsZones() - .getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE) + .getWorkloadNetworks() + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, Context.NONE) .getValue(); return this; } public WorkloadNetworkDnsZone refresh(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkDnsZones() - .getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context) + .getWorkloadNetworks() + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java deleted file mode 100644 index 70194e9c3c8ef..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesClientImpl.java +++ /dev/null @@ -1,1207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkDnsZonesClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZonesList; -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 WorkloadNetworkDnsZonesClient. - */ -public final class WorkloadNetworkDnsZonesClientImpl implements WorkloadNetworkDnsZonesClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkloadNetworkDnsZonesService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of WorkloadNetworkDnsZonesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkloadNetworkDnsZonesClientImpl(AvsClientImpl client) { - this.service = RestProxy.create(WorkloadNetworkDnsZonesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientWorkloadNetworkDnsZones to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") - public interface WorkloadNetworkDnsZonesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, - @HeaderParam("accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsZoneId") String dnsZoneId, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); - } - - /** - * List WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone 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 WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone 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 WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone 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 WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone 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 WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone 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 WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone 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 WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsZoneId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsZoneId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, dnsZoneId, accept, context); - } - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId) { - return getWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String dnsZoneId, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, context).block(); - } - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner get(String resourceGroupName, String privateCloudName, String dnsZoneId) { - return getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, - workloadNetworkDnsZone, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, dnsZoneId, accept, workloadNetworkDnsZone, context); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, - this.client.getContext()); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, - context); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreate( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreate( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginCreateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return beginCreateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner create(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return createAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); - } - - /** - * Create a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner create(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return createAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).block(); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, - workloadNetworkDnsZone, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, dnsZoneId, accept, workloadNetworkDnsZone, context); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, - this.client.getContext()); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, - context); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdate( - String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return updateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); - } - - /** - * Update a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param workloadNetworkDnsZone The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner update(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return updateAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context).block(); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsZoneId, - 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 (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, dnsZoneId, privateCloudName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsZoneId, - String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, dnsZoneId, privateCloudName, accept, context); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsZoneId, - String privateCloudName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsZoneId, - String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsZoneId, - String privateCloudName) { - return this.beginDeleteAsync(resourceGroupName, dnsZoneId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsZoneId, - String privateCloudName, Context context) { - return this.beginDeleteAsync(resourceGroupName, dnsZoneId, privateCloudName, context).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsZoneId, String privateCloudName) { - return beginDeleteAsync(resourceGroupName, dnsZoneId, privateCloudName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 dnsZoneId, String privateCloudName, - Context context) { - return beginDeleteAsync(resourceGroupName, dnsZoneId, privateCloudName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 dnsZoneId, String privateCloudName) { - deleteAsync(resourceGroupName, dnsZoneId, privateCloudName).block(); - } - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 dnsZoneId, String privateCloudName, Context context) { - deleteAsync(resourceGroupName, dnsZoneId, privateCloudName, 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 WorkloadNetworkDnsZone 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 WorkloadNetworkDnsZone 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/WorkloadNetworkDnsZonesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesImpl.java deleted file mode 100644 index 938677f68fdb4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZonesImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkDnsZonesClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZones; - -public final class WorkloadNetworkDnsZonesImpl implements WorkloadNetworkDnsZones { - private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsZonesImpl.class); - - private final WorkloadNetworkDnsZonesClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public WorkloadNetworkDnsZonesImpl(WorkloadNetworkDnsZonesClient 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 WorkloadNetworkDnsZoneImpl(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 WorkloadNetworkDnsZoneImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String dnsZoneId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkloadNetworkDnsZoneImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkDnsZone get(String resourceGroupName, String privateCloudName, String dnsZoneId) { - WorkloadNetworkDnsZoneInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, dnsZoneId); - if (inner != null) { - return new WorkloadNetworkDnsZoneImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String dnsZoneId, String privateCloudName) { - this.serviceClient().delete(resourceGroupName, dnsZoneId, privateCloudName); - } - - public void delete(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - this.serviceClient().delete(resourceGroupName, dnsZoneId, privateCloudName, context); - } - - public WorkloadNetworkDnsZone 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 dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, 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 dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, dnsZoneId, 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 dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, dnsZoneId, privateCloudName, 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 dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, dnsZoneId, privateCloudName, context); - } - - private WorkloadNetworkDnsZonesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.avs.AvsManager manager() { - return this.serviceManager; - } - - public WorkloadNetworkDnsZoneImpl define(String name) { - return new WorkloadNetworkDnsZoneImpl(name, this.manager()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java deleted file mode 100644 index 290cc87a28007..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysClientImpl.java +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkGatewaysClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayList; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkGatewaysClient. - */ -public final class WorkloadNetworkGatewaysClientImpl implements WorkloadNetworkGatewaysClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkloadNetworkGatewaysService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of WorkloadNetworkGatewaysClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkloadNetworkGatewaysClientImpl(AvsClientImpl client) { - this.service = RestProxy.create(WorkloadNetworkGatewaysService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientWorkloadNetworkGateways to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") - public interface WorkloadNetworkGatewaysService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/workloadNetworks/default/gateways/{gatewayId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("gatewayId") String gatewayId, - @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("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); - } - - /** - * List WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkGateway 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 WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkGateway 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 WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkGateway 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 WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkGateway 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 WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkGateway 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 WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkGateway 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 WorkloadNetworkGateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId The ID of the NSX Gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkGateway along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String gatewayId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (gatewayId == null) { - return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, gatewayId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a WorkloadNetworkGateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId The ID of the NSX Gateway. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkGateway along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String gatewayId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (gatewayId == null) { - return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, gatewayId, accept, context); - } - - /** - * Get a WorkloadNetworkGateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId The ID of the NSX Gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkGateway on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String gatewayId) { - return getWithResponseAsync(resourceGroupName, privateCloudName, gatewayId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a WorkloadNetworkGateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId The ID of the NSX Gateway. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkGateway along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String gatewayId, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, gatewayId, context).block(); - } - - /** - * Get a WorkloadNetworkGateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId The ID of the NSX Gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkGateway. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkGatewayInner get(String resourceGroupName, String privateCloudName, String gatewayId) { - return getWithResponse(resourceGroupName, privateCloudName, gatewayId, 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 WorkloadNetworkGateway 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 WorkloadNetworkGateway 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/WorkloadNetworkGatewaysImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysImpl.java deleted file mode 100644 index 44cecfb4136bc..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewaysImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkGatewaysClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateways; - -public final class WorkloadNetworkGatewaysImpl implements WorkloadNetworkGateways { - private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkGatewaysImpl.class); - - private final WorkloadNetworkGatewaysClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public WorkloadNetworkGatewaysImpl(WorkloadNetworkGatewaysClient 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 WorkloadNetworkGatewayImpl(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 WorkloadNetworkGatewayImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String gatewayId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, gatewayId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkloadNetworkGatewayImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkGateway get(String resourceGroupName, String privateCloudName, String gatewayId) { - WorkloadNetworkGatewayInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, gatewayId); - if (inner != null) { - return new WorkloadNetworkGatewayImpl(inner, this.manager()); - } else { - return null; - } - } - - private WorkloadNetworkGatewaysClient 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/WorkloadNetworkPortMirroringImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java index 1777c6b672bf5..b4b785887b02a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java @@ -78,26 +78,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String portMirroringId; - public WorkloadNetworkPortMirroringImpl withExistingPrivateCloud(String resourceGroupName, - String privateCloudName) { + public WorkloadNetworkPortMirroringImpl withExistingWorkloadNetwork(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkPortMirroring create() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPortMirroringProfiles() - .create(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .createPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPortMirroring create(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPortMirroringProfiles() - .create(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); + .getWorkloadNetworks() + .createPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + this.innerModel(), context); return this; } @@ -113,15 +118,17 @@ public WorkloadNetworkPortMirroringImpl update() { public WorkloadNetworkPortMirroring apply() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPortMirroringProfiles() - .update(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .updatePortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPortMirroring apply(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPortMirroringProfiles() - .update(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); + .getWorkloadNetworks() + .updatePortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + this.innerModel(), context); return this; } @@ -131,21 +138,24 @@ public WorkloadNetworkPortMirroring apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.portMirroringId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "portMirroringProfiles"); } public WorkloadNetworkPortMirroring refresh() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPortMirroringProfiles() - .getWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) + .getWorkloadNetworks() + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + Context.NONE) .getValue(); return this; } public WorkloadNetworkPortMirroring refresh(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPortMirroringProfiles() - .getWithResponse(resourceGroupName, privateCloudName, portMirroringId, context) + .getWorkloadNetworks() + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java deleted file mode 100644 index 094bbb73620d0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesClientImpl.java +++ /dev/null @@ -1,1236 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkPortMirroringProfilesClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringList; -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 - * WorkloadNetworkPortMirroringProfilesClient. - */ -public final class WorkloadNetworkPortMirroringProfilesClientImpl - implements WorkloadNetworkPortMirroringProfilesClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkloadNetworkPortMirroringProfilesService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of WorkloadNetworkPortMirroringProfilesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkloadNetworkPortMirroringProfilesClientImpl(AvsClientImpl client) { - this.service = RestProxy.create(WorkloadNetworkPortMirroringProfilesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientWorkloadNetworkPortMirroringProfiles to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") - public interface WorkloadNetworkPortMirroringProfilesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("portMirroringId") String portMirroringId, - @PathParam("privateCloudName") String privateCloudName, @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("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); - } - - /** - * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring 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 WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring 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 WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring 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 WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring 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 WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring 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 WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring 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 WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String portMirroringId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String portMirroringId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, portMirroringId, accept, context); - } - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String portMirroringId) { - return getWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String privateCloudName, String portMirroringId, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, context).block(); - } - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner get(String resourceGroupName, String privateCloudName, - String portMirroringId) { - return getWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE).getValue(); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, - workloadNetworkPortMirroring, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, portMirroringId, accept, workloadNetworkPortMirroring, context); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - Mono>> mono = createWithResponseAsync(resourceGroupName, privateCloudName, - portMirroringId, workloadNetworkPortMirroring); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, this.client.getContext()); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, privateCloudName, - portMirroringId, workloadNetworkPortMirroring, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, context); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> beginCreate( - String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> beginCreate( - String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return this - .beginCreateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, - context) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginCreateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return beginCreateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner create(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return createAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).block(); - } - - /** - * Create a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner create(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return createAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .block(); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, - workloadNetworkPortMirroring, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, portMirroringId, accept, workloadNetworkPortMirroring, context); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, - portMirroringId, workloadNetworkPortMirroring); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, this.client.getContext()); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdateAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, - portMirroringId, workloadNetworkPortMirroring, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, context); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( - String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> beginUpdate( - String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return this - .beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, - context) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return updateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).block(); - } - - /** - * Update a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param workloadNetworkPortMirroring The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Port Mirroring. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner update(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return updateAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .block(); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String portMirroringId, - String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, portMirroringId, privateCloudName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 portMirroringId, - String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, portMirroringId, privateCloudName, accept, context); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String portMirroringId, - String privateCloudName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 portMirroringId, - String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String portMirroringId, - String privateCloudName) { - return this.beginDeleteAsync(resourceGroupName, portMirroringId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 portMirroringId, - String privateCloudName, Context context) { - return this.beginDeleteAsync(resourceGroupName, portMirroringId, privateCloudName, context).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String portMirroringId, String privateCloudName) { - return beginDeleteAsync(resourceGroupName, portMirroringId, privateCloudName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 portMirroringId, String privateCloudName, - Context context) { - return beginDeleteAsync(resourceGroupName, portMirroringId, privateCloudName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String portMirroringId, String privateCloudName) { - deleteAsync(resourceGroupName, portMirroringId, privateCloudName).block(); - } - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 portMirroringId, String privateCloudName, Context context) { - deleteAsync(resourceGroupName, portMirroringId, privateCloudName, 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 WorkloadNetworkPortMirroring 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 WorkloadNetworkPortMirroring 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/WorkloadNetworkPortMirroringProfilesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesImpl.java deleted file mode 100644 index a5b3fc297573a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringProfilesImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPortMirroringProfilesClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProfiles; - -public final class WorkloadNetworkPortMirroringProfilesImpl implements WorkloadNetworkPortMirroringProfiles { - private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPortMirroringProfilesImpl.class); - - private final WorkloadNetworkPortMirroringProfilesClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public WorkloadNetworkPortMirroringProfilesImpl(WorkloadNetworkPortMirroringProfilesClient 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 WorkloadNetworkPortMirroringImpl(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 WorkloadNetworkPortMirroringImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String portMirroringId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkloadNetworkPortMirroringImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkPortMirroring get(String resourceGroupName, String privateCloudName, String portMirroringId) { - WorkloadNetworkPortMirroringInner inner - = this.serviceClient().get(resourceGroupName, privateCloudName, portMirroringId); - if (inner != null) { - return new WorkloadNetworkPortMirroringImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String portMirroringId, String privateCloudName) { - this.serviceClient().delete(resourceGroupName, portMirroringId, privateCloudName); - } - - public void delete(String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - this.serviceClient().delete(resourceGroupName, portMirroringId, privateCloudName, context); - } - - public WorkloadNetworkPortMirroring 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 portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, portMirroringId, 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 portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, portMirroringId, 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 portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, portMirroringId, privateCloudName, 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 portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, portMirroringId, privateCloudName, context); - } - - private WorkloadNetworkPortMirroringProfilesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.avs.AvsManager manager() { - return this.serviceManager; - } - - public WorkloadNetworkPortMirroringImpl define(String name) { - return new WorkloadNetworkPortMirroringImpl(name, this.manager()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java index 46cc8f70c039b..9259e9b739350 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java @@ -65,25 +65,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String publicIPId; - public WorkloadNetworkPublicIpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkPublicIpImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkPublicIp create() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPublicIps() - .create(resourceGroupName, privateCloudName, publicIPId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .createPublicIP(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkPublicIp create(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPublicIps() - .create(resourceGroupName, privateCloudName, publicIPId, this.innerModel(), context); + .getWorkloadNetworks() + .createPublicIP(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, this.innerModel(), + context); return this; } @@ -95,16 +101,16 @@ public WorkloadNetworkPublicIp create(Context context) { public WorkloadNetworkPublicIp refresh() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPublicIps() - .getWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE) + .getWorkloadNetworks() + .getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, Context.NONE) .getValue(); return this; } public WorkloadNetworkPublicIp refresh(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkPublicIps() - .getWithResponse(resourceGroupName, privateCloudName, publicIPId, context) + .getWorkloadNetworks() + .getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java deleted file mode 100644 index f5d076d2b7301..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsClientImpl.java +++ /dev/null @@ -1,940 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPublicIpsClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPsList; -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 WorkloadNetworkPublicIpsClient. - */ -public final class WorkloadNetworkPublicIpsClientImpl implements WorkloadNetworkPublicIpsClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkloadNetworkPublicIpsService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of WorkloadNetworkPublicIpsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkloadNetworkPublicIpsClientImpl(AvsClientImpl client) { - this.service = RestProxy.create(WorkloadNetworkPublicIpsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientWorkloadNetworkPublicIps to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") - public interface WorkloadNetworkPublicIpsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/workloadNetworks/default/publicIPs/{publicIPId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIPId, - @HeaderParam("accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIPId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("publicIPId") String publicIPId, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); - } - - /** - * List WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP 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 WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP 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 WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP 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 WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP 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 WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP 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 WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP 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 WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String publicIPId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIPId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String publicIPId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIPId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, publicIPId, accept, context); - } - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String publicIPId) { - return getWithResponseAsync(resourceGroupName, privateCloudName, publicIPId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String publicIPId, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, context).block(); - } - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner get(String resourceGroupName, String privateCloudName, String publicIPId) { - return getWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE).getValue(); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIPId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); - } - if (workloadNetworkPublicIP == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkPublicIP is required and cannot be null.")); - } else { - workloadNetworkPublicIP.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, - workloadNetworkPublicIP, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIPId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); - } - if (workloadNetworkPublicIP == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkPublicIP is required and cannot be null.")); - } else { - workloadNetworkPublicIP.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, publicIPId, accept, workloadNetworkPublicIP, context); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPublicIpInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, - this.client.getContext()); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPublicIpInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, - workloadNetworkPublicIP, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, - context); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPublicIpInner> beginCreate( - String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPublicIpInner> beginCreate( - String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - return beginCreateAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { - return beginCreateAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner create(String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - return createAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP).block(); - } - - /** - * Create a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param workloadNetworkPublicIP Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Public IP Block. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner create(String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { - return createAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context).block(); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 publicIPId, - 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 (publicIPId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, publicIPId, privateCloudName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 publicIPId, - String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (publicIPId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, publicIPId, privateCloudName, accept, context); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 publicIPId, - String privateCloudName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, publicIPId, privateCloudName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 publicIPId, - String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, publicIPId, privateCloudName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 publicIPId, - String privateCloudName) { - return this.beginDeleteAsync(resourceGroupName, publicIPId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 publicIPId, - String privateCloudName, Context context) { - return this.beginDeleteAsync(resourceGroupName, publicIPId, privateCloudName, context).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 publicIPId, String privateCloudName) { - return beginDeleteAsync(resourceGroupName, publicIPId, privateCloudName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 publicIPId, String privateCloudName, - Context context) { - return beginDeleteAsync(resourceGroupName, publicIPId, privateCloudName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 publicIPId, String privateCloudName) { - deleteAsync(resourceGroupName, publicIPId, privateCloudName).block(); - } - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 publicIPId, String privateCloudName, Context context) { - deleteAsync(resourceGroupName, publicIPId, privateCloudName, 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 WorkloadNetworkPublicIP 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 WorkloadNetworkPublicIP 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/WorkloadNetworkPublicIpsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsImpl.java deleted file mode 100644 index a207c4107ce0d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpsImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkPublicIpsClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIps; - -public final class WorkloadNetworkPublicIpsImpl implements WorkloadNetworkPublicIps { - private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPublicIpsImpl.class); - - private final WorkloadNetworkPublicIpsClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public WorkloadNetworkPublicIpsImpl(WorkloadNetworkPublicIpsClient 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 WorkloadNetworkPublicIpImpl(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 WorkloadNetworkPublicIpImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String publicIPId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, publicIPId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkloadNetworkPublicIpImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkPublicIp get(String resourceGroupName, String privateCloudName, String publicIPId) { - WorkloadNetworkPublicIpInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, publicIPId); - if (inner != null) { - return new WorkloadNetworkPublicIpImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String publicIPId, String privateCloudName) { - this.serviceClient().delete(resourceGroupName, publicIPId, privateCloudName); - } - - public void delete(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { - this.serviceClient().delete(resourceGroupName, publicIPId, privateCloudName, context); - } - - public WorkloadNetworkPublicIp 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 publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); - if (publicIPId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, publicIPId, 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 publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); - if (publicIPId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, publicIPId, 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 publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); - if (publicIPId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, publicIPId, privateCloudName, 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 publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); - if (publicIPId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, publicIPId, privateCloudName, context); - } - - private WorkloadNetworkPublicIpsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.avs.AvsManager manager() { - return this.serviceManager; - } - - public WorkloadNetworkPublicIpImpl define(String name) { - return new WorkloadNetworkPublicIpImpl(name, this.manager()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java index ac9a8041836bd..bc4b4883f6607 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java @@ -86,25 +86,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String segmentId; - public WorkloadNetworkSegmentImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkSegmentImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkSegment create() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkSegments() - .create(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .createSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkSegment create(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkSegments() - .create(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); + .getWorkloadNetworks() + .createSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), + context); return this; } @@ -120,15 +126,17 @@ public WorkloadNetworkSegmentImpl update() { public WorkloadNetworkSegment apply() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkSegments() - .update(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .updateSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkSegment apply(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkSegments() - .update(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); + .getWorkloadNetworks() + .updateSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), + context); return this; } @@ -138,21 +146,22 @@ public WorkloadNetworkSegment apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.segmentId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "segments"); } public WorkloadNetworkSegment refresh() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkSegments() - .getWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE) + .getWorkloadNetworks() + .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE) .getValue(); return this; } public WorkloadNetworkSegment refresh(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkSegments() - .getWithResponse(resourceGroupName, privateCloudName, segmentId, context) + .getWorkloadNetworks() + .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java deleted file mode 100644 index be67b824dbc29..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsClientImpl.java +++ /dev/null @@ -1,1203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkSegmentsClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentsList; -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 WorkloadNetworkSegmentsClient. - */ -public final class WorkloadNetworkSegmentsClientImpl implements WorkloadNetworkSegmentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkloadNetworkSegmentsService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of WorkloadNetworkSegmentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkloadNetworkSegmentsClientImpl(AvsClientImpl client) { - this.service = RestProxy.create(WorkloadNetworkSegmentsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientWorkloadNetworkSegments to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") - public interface WorkloadNetworkSegmentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, - @HeaderParam("accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, - @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkSegmentInner properties, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteSegment(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, - @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("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); - } - - /** - * List WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkSegment 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 WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkSegment 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 WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkSegment 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 WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkSegment 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 WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkSegment 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 WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkSegment 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 WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, segmentId, accept, context); - } - - /** - * Get a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String segmentId) { - return getWithResponseAsync(resourceGroupName, privateCloudName, segmentId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String segmentId, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context).block(); - } - - /** - * Get a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner get(String resourceGroupName, String privateCloudName, String segmentId) { - return getWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - if (workloadNetworkSegment == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); - } else { - workloadNetworkSegment.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, - workloadNetworkSegment, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - if (workloadNetworkSegment == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); - } else { - workloadNetworkSegment.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, segmentId, accept, workloadNetworkSegment, context); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, - this.client.getContext()); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, - context); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginCreate( - String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginCreate( - String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .getSyncPoller(); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - return beginCreateAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { - return beginCreateAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner create(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return createAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); - } - - /** - * Create a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param workloadNetworkSegment Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner create(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { - return createAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context).block(); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner properties) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, properties, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner properties, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, segmentId, accept, properties, context); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateCloudName, segmentId, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, - this.client.getContext()); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateCloudName, segmentId, properties, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, - context); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties).getSyncPoller(); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX Segment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginUpdate( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, - Context context) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties, context) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner properties) { - return beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner properties, Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, segmentId, properties, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner properties) { - return updateAsync(resourceGroupName, privateCloudName, segmentId, properties).block(); - } - - /** - * Update a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX Segment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner update(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner properties, Context context) { - return updateAsync(resourceGroupName, privateCloudName, segmentId, properties, context).block(); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, - String privateCloudName, String segmentId) { - Mono>> mono - = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, - String privateCloudName, String segmentId, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String segmentId) { - return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String segmentId, Context context) { - return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, - Context context) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { - deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).block(); - } - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { - deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).block(); - } - - /** - * 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 WorkloadNetworkSegment 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 WorkloadNetworkSegment 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/WorkloadNetworkSegmentsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsImpl.java deleted file mode 100644 index 81b455ef74494..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentsImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkSegmentsClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegments; - -public final class WorkloadNetworkSegmentsImpl implements WorkloadNetworkSegments { - private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkSegmentsImpl.class); - - private final WorkloadNetworkSegmentsClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public WorkloadNetworkSegmentsImpl(WorkloadNetworkSegmentsClient 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 WorkloadNetworkSegmentImpl(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 WorkloadNetworkSegmentImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String segmentId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, segmentId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkloadNetworkSegmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkSegment get(String resourceGroupName, String privateCloudName, String segmentId) { - WorkloadNetworkSegmentInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, segmentId); - if (inner != null) { - return new WorkloadNetworkSegmentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { - this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId); - } - - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { - this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId, context); - } - - public WorkloadNetworkSegment 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 segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, segmentId, 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 segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, segmentId, context); - } - - public void deleteSegmentById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - 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 segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); - } - this.deleteSegment(resourceGroupName, privateCloudName, segmentId, Context.NONE); - } - - public void deleteSegmentByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); - } - this.deleteSegment(resourceGroupName, privateCloudName, segmentId, context); - } - - private WorkloadNetworkSegmentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.avs.AvsManager manager() { - return this.serviceManager; - } - - public WorkloadNetworkSegmentImpl define(String name) { - return new WorkloadNetworkSegmentImpl(name, this.manager()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java index 8b36c1b81a777..ab9f001dd137c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java @@ -76,25 +76,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String vmGroupId; - public WorkloadNetworkVMGroupImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkVMGroupImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkVMGroup create() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkVmGroups() - .create(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .createVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkVMGroup create(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkVmGroups() - .create(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); + .getWorkloadNetworks() + .createVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), + context); return this; } @@ -110,15 +116,17 @@ public WorkloadNetworkVMGroupImpl update() { public WorkloadNetworkVMGroup apply() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkVmGroups() - .update(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); + .getWorkloadNetworks() + .updateVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkVMGroup apply(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkVmGroups() - .update(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); + .getWorkloadNetworks() + .updateVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), + context); return this; } @@ -128,21 +136,22 @@ public WorkloadNetworkVMGroup apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.vmGroupId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vmGroups"); } public WorkloadNetworkVMGroup refresh() { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkVmGroups() - .getWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE) + .getWorkloadNetworks() + .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, Context.NONE) .getValue(); return this; } public WorkloadNetworkVMGroup refresh(Context context) { this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworkVmGroups() - .getWithResponse(resourceGroupName, privateCloudName, vmGroupId, context) + .getWorkloadNetworks() + .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java deleted file mode 100644 index a0978c9a317ab..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesClientImpl.java +++ /dev/null @@ -1,431 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVirtualMachinesClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachinesList; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in WorkloadNetworkVirtualMachinesClient. - */ -public final class WorkloadNetworkVirtualMachinesClientImpl implements WorkloadNetworkVirtualMachinesClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkloadNetworkVirtualMachinesService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of WorkloadNetworkVirtualMachinesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkloadNetworkVirtualMachinesClientImpl(AvsClientImpl client) { - this.service = RestProxy.create(WorkloadNetworkVirtualMachinesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientWorkloadNetworkVirtualMachines to be used by the proxy - * service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") - public interface WorkloadNetworkVirtualMachinesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/workloadNetworks/default/virtualMachines/{virtualMachineId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("virtualMachineId") String virtualMachineId, @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("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); - } - - /** - * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkVirtualMachine 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 WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkVirtualMachine 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 WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVirtualMachine 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 WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkVirtualMachine 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 WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVirtualMachine 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 WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 WorkloadNetworkVirtualMachine 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 WorkloadNetworkVirtualMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String virtualMachineId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (virtualMachineId == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a WorkloadNetworkVirtualMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String virtualMachineId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (virtualMachineId == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, virtualMachineId, accept, context); - } - - /** - * Get a WorkloadNetworkVirtualMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVirtualMachine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String virtualMachineId) { - return getWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a WorkloadNetworkVirtualMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVirtualMachine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String privateCloudName, String virtualMachineId, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId, context).block(); - } - - /** - * Get a WorkloadNetworkVirtualMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVirtualMachine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVirtualMachineInner get(String resourceGroupName, String privateCloudName, - String virtualMachineId) { - return getWithResponse(resourceGroupName, privateCloudName, virtualMachineId, 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 WorkloadNetworkVirtualMachine 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 WorkloadNetworkVirtualMachine 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/WorkloadNetworkVirtualMachinesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesImpl.java deleted file mode 100644 index 221849e55e535..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachinesImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVirtualMachinesClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachines; - -public final class WorkloadNetworkVirtualMachinesImpl implements WorkloadNetworkVirtualMachines { - private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVirtualMachinesImpl.class); - - private final WorkloadNetworkVirtualMachinesClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public WorkloadNetworkVirtualMachinesImpl(WorkloadNetworkVirtualMachinesClient 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 WorkloadNetworkVirtualMachineImpl(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 WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String virtualMachineId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, virtualMachineId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkloadNetworkVirtualMachineImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkVirtualMachine get(String resourceGroupName, String privateCloudName, - String virtualMachineId) { - WorkloadNetworkVirtualMachineInner inner - = this.serviceClient().get(resourceGroupName, privateCloudName, virtualMachineId); - if (inner != null) { - return new WorkloadNetworkVirtualMachineImpl(inner, this.manager()); - } else { - return null; - } - } - - private WorkloadNetworkVirtualMachinesClient 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/WorkloadNetworkVmGroupsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java deleted file mode 100644 index 285004abc644f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsClientImpl.java +++ /dev/null @@ -1,1199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.avs.fluent.WorkloadNetworkVmGroupsClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; -import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupsList; -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 WorkloadNetworkVmGroupsClient. - */ -public final class WorkloadNetworkVmGroupsClientImpl implements WorkloadNetworkVmGroupsClient { - /** - * The proxy service used to perform REST calls. - */ - private final WorkloadNetworkVmGroupsService service; - - /** - * The service client containing this operation class. - */ - private final AvsClientImpl client; - - /** - * Initializes an instance of WorkloadNetworkVmGroupsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkloadNetworkVmGroupsClientImpl(AvsClientImpl client) { - this.service = RestProxy.create(WorkloadNetworkVmGroupsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AvsClientWorkloadNetworkVmGroups to be used by the proxy service to - * perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") - public interface WorkloadNetworkVmGroupsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") 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}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, - @HeaderParam("accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, - @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkVMGroupInner resource, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, - @HeaderParam("accept") String accept, - @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmGroupId") String vmGroupId, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("accept") String accept, Context context); - } - - /** - * List WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> 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 WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> 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 WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation 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 WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation 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 WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); - } - - /** - * List WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation 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 WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String vmGroupId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName, String vmGroupId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, vmGroupId, accept, context); - } - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String vmGroupId) { - return getWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String vmGroupId, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, context).block(); - } - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner get(String resourceGroupName, String privateCloudName, String vmGroupId) { - return getWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner 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 (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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.create(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, resource, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner 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 (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, vmGroupId, accept, resource, context); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, - this.client.getContext()); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, - context); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginCreate( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, vmGroupId, resource).getSyncPoller(); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginCreate( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, - Context context) { - return this.beginCreateAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).getSyncPoller(); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner resource) { - return beginCreateAsync(resourceGroupName, privateCloudName, vmGroupId, resource).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { - return beginCreateAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner create(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner resource) { - return createAsync(resourceGroupName, privateCloudName, vmGroupId, resource).block(); - } - - /** - * Create a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param 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 nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner create(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner resource, Context context) { - return createAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).block(); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); - } else { - workloadNetworkVMGroup.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, - workloadNetworkVMGroup, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { - return Mono.error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); - } else { - workloadNetworkVMGroup.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, vmGroupId, accept, workloadNetworkVMGroup, context); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, - this.client.getContext()); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, - context); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( - String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdate( - String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { - return this.beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .getSyncPoller(); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return updateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); - } - - /** - * Update a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param workloadNetworkVMGroup The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return nSX VM Group. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner update(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { - return updateAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context).block(); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String vmGroupId, - String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, vmGroupId, privateCloudName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 vmGroupId, - String privateCloudName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, vmGroupId, privateCloudName, accept, context); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vmGroupId, - String privateCloudName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 vmGroupId, - String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String vmGroupId, - String privateCloudName) { - return this.beginDeleteAsync(resourceGroupName, vmGroupId, privateCloudName).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 vmGroupId, - String privateCloudName, Context context) { - return this.beginDeleteAsync(resourceGroupName, vmGroupId, privateCloudName, context).getSyncPoller(); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { - return beginDeleteAsync(resourceGroupName, vmGroupId, privateCloudName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 vmGroupId, String privateCloudName, - Context context) { - return beginDeleteAsync(resourceGroupName, vmGroupId, privateCloudName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String vmGroupId, String privateCloudName) { - deleteAsync(resourceGroupName, vmGroupId, privateCloudName).block(); - } - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 vmGroupId, String privateCloudName, Context context) { - deleteAsync(resourceGroupName, vmGroupId, privateCloudName, 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 WorkloadNetworkVMGroup 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 WorkloadNetworkVMGroup 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/WorkloadNetworkVmGroupsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsImpl.java deleted file mode 100644 index db67339c90c3f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVmGroupsImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.WorkloadNetworkVmGroupsClient; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVmGroups; - -public final class WorkloadNetworkVmGroupsImpl implements WorkloadNetworkVmGroups { - private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVmGroupsImpl.class); - - private final WorkloadNetworkVmGroupsClient innerClient; - - private final com.azure.resourcemanager.avs.AvsManager serviceManager; - - public WorkloadNetworkVmGroupsImpl(WorkloadNetworkVmGroupsClient 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 WorkloadNetworkVMGroupImpl(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 WorkloadNetworkVMGroupImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String vmGroupId, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkloadNetworkVMGroupImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetworkVMGroup get(String resourceGroupName, String privateCloudName, String vmGroupId) { - WorkloadNetworkVMGroupInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, vmGroupId); - if (inner != null) { - return new WorkloadNetworkVMGroupImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String vmGroupId, String privateCloudName) { - this.serviceClient().delete(resourceGroupName, vmGroupId, privateCloudName); - } - - public void delete(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - this.serviceClient().delete(resourceGroupName, vmGroupId, privateCloudName, context); - } - - public WorkloadNetworkVMGroup 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 vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, vmGroupId, 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 vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - return this.getWithResponse(resourceGroupName, privateCloudName, vmGroupId, 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 vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, vmGroupId, privateCloudName, 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 vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.delete(resourceGroupName, vmGroupId, privateCloudName, context); - } - - private WorkloadNetworkVmGroupsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.avs.AvsManager manager() { - return this.serviceManager; - } - - public WorkloadNetworkVMGroupImpl define(String name) { - return new WorkloadNetworkVMGroupImpl(name, this.manager()); - } -} 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 27ced7faccfb1..d8c3a31730c20 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 @@ -4,13 +4,17 @@ 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.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -23,11 +27,34 @@ 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.WorkloadNetworksClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; +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.implementation.models.WorkloadNetworkDhcpList; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsServicesList; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkDnsZonesList; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkGatewayList; import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkList; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPortMirroringList; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkPublicIPsList; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkSegmentsList; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVirtualMachinesList; +import com.azure.resourcemanager.avs.implementation.models.WorkloadNetworkVMGroupsList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -63,22 +90,453 @@ public final class WorkloadNetworksClientImpl implements WorkloadNetworksClient @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworksService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") 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}/workloadNetworks/{workloadNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSegments(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSegment(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createSegment(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateSegment(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, + @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkSegmentInner properties, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteSegment(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDhcp(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDhcp(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dhcpId") String dhcpId, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createDhcp(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dhcpId") String dhcpId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateDhcp(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dhcpId") String dhcpId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteDhcp(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dhcpId") String dhcpId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/gateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> listGateways(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/gateways/{gatewayId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getGateway(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("gatewayId") String gatewayId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPortMirroring(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getPortMirroring(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createPortMirroring(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updatePortMirroring(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deletePortMirroring(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("portMirroringId") String portMirroringId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVMGroups(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getVMGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("vmGroupId") String vmGroupId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createVMGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("vmGroupId") String vmGroupId, + @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkVMGroupInner resource, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateVMGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("vmGroupId") String vmGroupId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteVMGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmGroupId") String vmGroupId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/virtualMachines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVirtualMachines(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/virtualMachines/{virtualMachineId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getVirtualMachine(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("virtualMachineId") String virtualMachineId, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDnsServices(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDnsService(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createDnsService(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateDnsService(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteDnsService(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsServiceId") String dnsServiceId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDnsZones(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDnsZone(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dnsZoneId") String dnsZoneId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createDnsZone(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dnsZoneId") String dnsZoneId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> updateDnsZone(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dnsZoneId") String dnsZoneId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteDnsZone(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsZoneId") String dnsZoneId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPublicIPs(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs/{publicIPId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getPublicIP(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("publicIPId") String publicIPId, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs/{publicIPId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createPublicIP(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("publicIPId") String publicIPId, + @HeaderParam("accept") String accept, + @BodyParam("application/json") WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deletePublicIP(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("publicIPId") String publicIPId, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @@ -88,271 +546,9058 @@ Mono> list(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); - } - /** - * Get a WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String privateCloudName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSegmentsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDhcpNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGatewaysNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPortMirroringNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVMGroupsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listVirtualMachinesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDnsServicesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDnsZonesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPublicIPsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("accept") String accept, Context context); + } + + /** + * List WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetwork list operation 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 WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetwork list operation 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 WorkloadNetwork 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 WorkloadNetwork 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 WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link 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 WorkloadNetwork 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 WorkloadNetwork 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 WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context); + } + + /** + * Get a WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetwork on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetwork along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, context).block(); + } + + /** + * Get a WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetwork. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkInner get(String resourceGroupName, String privateCloudName, String workloadNetworkName) { + return getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, Context.NONE).getValue(); + } + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSegmentsSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSegments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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 WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSegmentsSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSegments(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSegmentsAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>( + () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listSegmentsNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSegmentsAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listSegmentsNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + } + + /** + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listSegmentsAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, context); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSegmentAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId) { + return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSegmentWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId, Context context) { + return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) + .block(); + } + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId) { + return getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE) + .getValue(); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, workloadNetworkSegment, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, workloadNetworkSegment, context); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment) { + Mono>> mono = createSegmentWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, segmentId, workloadNetworkSegment); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createSegmentWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, segmentId, workloadNetworkSegment, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + context); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment) { + return this + .beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + return this + .beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createSegmentAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + return beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createSegmentAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, + Context context) { + return beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + return createSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment).block(); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, + Context context) { + return createSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment, context).block(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, properties, context); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties) { + Mono>> mono = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, segmentId, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, segmentId, properties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + context); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties) { + return this + .beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Segment. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties, Context context) { + return this + .beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties, + context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSegmentAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties) { + return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSegmentAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { + return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties) { + return updateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties) + .block(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { + return updateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties, + context).block(); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, context); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId) { + Mono>> mono + = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String segmentId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, segmentId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId) { + return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId) + .getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, Context context) { + return this + .beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) + .getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId) { + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId, Context context) { + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId) { + deleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId).block(); + } + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId, Context context) { + deleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context).block(); + } + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDhcpSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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 WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDhcpSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>(() -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listDhcpNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listDhcpNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + } + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDhcpWithResponseAsync(String resourceGroupName, String dhcpId, + String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dhcpId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDhcpWithResponseAsync(String resourceGroupName, String dhcpId, + String privateCloudName, Context context) { + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getDhcp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dhcpId, privateCloudName, accept, context); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDhcpAsync(String resourceGroupName, String dhcpId, + String privateCloudName) { + return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDhcpWithResponse(String resourceGroupName, String dhcpId, + String privateCloudName, Context context) { + return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName, context).block(); + } + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName) { + return getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + accept, workloadNetworkDhcp, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, accept, + workloadNetworkDhcp, context); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + Mono>> mono = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dhcpId, workloadNetworkDhcp); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dhcpId, workloadNetworkDhcp, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return this + .beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return this + .beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, + context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createDhcpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + workloadNetworkDhcp).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createDhcpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + workloadNetworkDhcp, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return createDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) + .block(); + } + + /** + * Create a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return createDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, + context).block(); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + accept, workloadNetworkDhcp, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + if (workloadNetworkDhcp == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + } else { + workloadNetworkDhcp.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, accept, + workloadNetworkDhcp, context); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + Mono>> mono = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dhcpId, workloadNetworkDhcp); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dhcpId, workloadNetworkDhcp, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return this + .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return this + .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, + context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDhcpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + workloadNetworkDhcp).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDhcpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + workloadNetworkDhcp, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return updateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) + .block(); + } + + /** + * Update a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DHCP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return updateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, + context).block(); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dhcpId, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, accept, + context); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId) { + Mono>> mono + = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId) { + return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId) + .getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, Context context) { + return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context) + .getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId) { + return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, Context context) { + return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId) { + deleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId).block(); + } + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + Context context) { + deleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context).block(); + } + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGatewaysSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listGateways(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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 WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGatewaysSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listGateways(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGatewaysAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>( + () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listGatewaysNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGatewaysAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listGatewaysNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + } + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listGatewaysAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getGatewayWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String gatewayId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (gatewayId == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getGateway(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param gatewayId The ID of the NSX Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getGatewayWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String gatewayId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (gatewayId == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getGateway(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, + accept, context); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getGatewayAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId) { + return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param gatewayId The ID of the NSX Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getGatewayWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String gatewayId, Context context) { + return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, context) + .block(); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId) { + return getGatewayWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, Context.NONE) + .getValue(); + } + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPortMirroringSinglePageAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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 WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPortMirroringSinglePageAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPortMirroringAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + return new PagedFlux<>( + () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listPortMirroringNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPortMirroringAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listPortMirroringNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + } + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedIterable<>( + listPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPortMirroringWithResponseAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String portMirroringId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPortMirroringWithResponseAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String portMirroringId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + accept, context); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPortMirroringAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId) { + return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPortMirroringWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, Context context) { + return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, context).block(); + } + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId) { + return getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createPortMirroringWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, accept, workloadNetworkPortMirroring, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createPortMirroringWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + accept, workloadNetworkPortMirroring, context); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + Mono>> mono = createPortMirroringWithResponseAsync(resourceGroupName, + privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, this.client.getContext()); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createPortMirroringWithResponseAsync(resourceGroupName, + privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, context); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return this + .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return this + .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createPortMirroringAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createPortMirroringAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return createPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring).block(); + } + + /** + * Create a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return createPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring, context).block(); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updatePortMirroringWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updatePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, accept, workloadNetworkPortMirroring, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updatePortMirroringWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); + } else { + workloadNetworkPortMirroring.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updatePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + accept, workloadNetworkPortMirroring, context); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + Mono>> mono = updatePortMirroringWithResponseAsync(resourceGroupName, + privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, this.client.getContext()); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updatePortMirroringWithResponseAsync(resourceGroupName, + privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, context); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return this + .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return this + .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updatePortMirroringAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updatePortMirroringAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return updatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring).block(); + } + + /** + * Update a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Port Mirroring. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return updatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + workloadNetworkPortMirroring, context).block(); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePortMirroringWithResponseAsync(String resourceGroupName, + String portMirroringId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deletePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, portMirroringId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> deletePortMirroringWithResponseAsync(String resourceGroupName, + String portMirroringId, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deletePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, portMirroringId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeletePortMirroringAsync(String resourceGroupName, + String portMirroringId, String privateCloudName) { + Mono>> mono + = deletePortMirroringWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeletePortMirroringAsync(String resourceGroupName, + String portMirroringId, String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deletePortMirroringWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeletePortMirroring(String resourceGroupName, String portMirroringId, + String privateCloudName) { + return this.beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeletePortMirroring(String resourceGroupName, String portMirroringId, + String privateCloudName, Context context) { + return this.beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context) + .getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePortMirroringAsync(String resourceGroupName, String portMirroringId, + String privateCloudName) { + return beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deletePortMirroringAsync(String resourceGroupName, String portMirroringId, + String privateCloudName, Context context) { + return beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { + deletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName, + Context context) { + deletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context).block(); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMGroupsSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVMGroups(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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 WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVMGroupsSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listVMGroups(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVMGroupsAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>( + () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listVMGroupsNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVMGroupsAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listVMGroupsNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listVMGroupsAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String vmGroupId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String vmGroupId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, context); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVMGroupAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId) { + return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVMGroupWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String vmGroupId, Context context) { + return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, context) + .block(); + } + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId) { + return getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, Context.NONE) + .getValue(); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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.createVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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.createVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, resource, context); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource) { + Mono>> mono = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, vmGroupId, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, vmGroupId, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + context); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource) { + return this + .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource, Context context) { + return this + .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource, + context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createVMGroupAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createVMGroupAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { + return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + return createVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource) + .block(); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @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 nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { + return createVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource, + context).block(); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, workloadNetworkVMGroup, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, workloadNetworkVMGroup, context); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + Mono>> mono = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, vmGroupId, workloadNetworkVMGroup); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, vmGroupId, workloadNetworkVMGroup, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + context); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return this + .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + return this + .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateVMGroupAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateVMGroupAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + Context context) { + return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return updateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup).block(); + } + + /** + * Update a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX VM Group. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + Context context) { + return updateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup, context).block(); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteVMGroupWithResponseAsync(String resourceGroupName, String vmGroupId, + String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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.deleteVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmGroupId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> deleteVMGroupWithResponseAsync(String resourceGroupName, String vmGroupId, + String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId 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.deleteVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmGroupId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteVMGroupAsync(String resourceGroupName, String vmGroupId, + String privateCloudName) { + Mono>> mono + = deleteVMGroupWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteVMGroupAsync(String resourceGroupName, String vmGroupId, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteVMGroupWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, String vmGroupId, + String privateCloudName) { + return this.beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteVMGroup(String resourceGroupName, String vmGroupId, + String privateCloudName, Context context) { + return this.beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { + return beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName, + Context context) { + return beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { + deleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { + deleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).block(); + } + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVirtualMachinesSinglePageAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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 WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVirtualMachinesSinglePageAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVirtualMachinesAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + return new PagedFlux<>( + () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVirtualMachinesAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + } + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedIterable<>( + listVirtualMachinesAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVirtualMachineWithResponseAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String virtualMachineId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (virtualMachineId == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, + virtualMachineId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param virtualMachineId ID of the virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVirtualMachineWithResponseAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String virtualMachineId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (virtualMachineId == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId, + accept, context); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVirtualMachineAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String virtualMachineId) { + return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, + virtualMachineId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param virtualMachineId ID of the virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVirtualMachineWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context) { + return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, + virtualMachineId, context).block(); + } + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String virtualMachineId) { + return getVirtualMachineWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId, + Context.NONE).getValue(); + } + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDnsServicesSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDnsServices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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 WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDnsServicesSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listDnsServices(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDnsServicesAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + return new PagedFlux<>( + () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listDnsServicesNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDnsServicesAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listDnsServicesNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDnsServices(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + } + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDnsServices(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedIterable<>( + listDnsServicesAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, context); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDnsServiceAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId) { + return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDnsServiceWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context) { + return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + context).block(); + } + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId) { + return getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, workloadNetworkDnsService, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, workloadNetworkDnsService, context); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsServiceInner> + beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + Mono>> mono = createDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsServiceId, workloadNetworkDnsService); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsServiceInner> + beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsServiceId, workloadNetworkDnsService, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + context); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return this + .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return this + .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createDnsServiceAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createDnsServiceAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return createDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService).block(); + } + + /** + * Create a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context) { + return createDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context).block(); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, workloadNetworkDnsService, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); + } else { + workloadNetworkDnsService.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, workloadNetworkDnsService, context); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsServiceInner> + beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + Mono>> mono = updateDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsServiceId, workloadNetworkDnsService); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsServiceInner> + beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsServiceId, workloadNetworkDnsService, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + context); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return this + .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return this + .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDnsServiceAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDnsServiceAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return updateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService).block(); + } + + /** + * Update a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context) { + return updateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context).block(); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> deleteDnsServiceWithResponseAsync(String resourceGroupName, + String dnsServiceId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsServiceId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> deleteDnsServiceWithResponseAsync(String resourceGroupName, + String dnsServiceId, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsServiceId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, + String privateCloudName) { + Mono>> mono + = deleteDnsServiceWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteDnsServiceWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteDnsService(String resourceGroupName, String dnsServiceId, + String privateCloudName) { + return this.beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteDnsService(String resourceGroupName, String dnsServiceId, + String privateCloudName, Context context) { + return this.beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context) + .getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, String privateCloudName) { + return beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, String privateCloudName, + Context context) { + return beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName) { + deleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, + Context context) { + deleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context).block(); + } + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDnsZonesSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDnsZones(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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 WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDnsZonesSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listDnsZones(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDnsZonesAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>( + () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listDnsZonesNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDnsZonesAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listDnsZonesNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + } + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listDnsZonesAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsZoneId) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsZoneId, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, context); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDnsZoneAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId) { + return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDnsZoneWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsZoneId, Context context) { + return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, context) + .block(); + } + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId) { + return getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, Context.NONE) + .getValue(); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, workloadNetworkDnsZone, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, workloadNetworkDnsZone, context); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + Mono>> mono = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsZoneId, workloadNetworkDnsZone); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsZoneId, workloadNetworkDnsZone, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + context); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return this + .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return this + .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createDnsZoneAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createDnsZoneAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { + return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return createDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone).block(); + } + + /** + * Create a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { + return createDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context).block(); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, workloadNetworkDnsZone, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, workloadNetworkDnsZone, context); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + Mono>> mono = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsZoneId, workloadNetworkDnsZone); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + this.client.getContext()); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsZoneId, workloadNetworkDnsZone, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + context); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return this + .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return this + .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDnsZoneAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDnsZoneAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { + return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return updateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone).block(); + } + + /** + * Update a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX DNS Zone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { + return updateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context).block(); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> deleteDnsZoneWithResponseAsync(String resourceGroupName, String dnsZoneId, + String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deleteDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsZoneId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> deleteDnsZoneWithResponseAsync(String resourceGroupName, String dnsZoneId, + String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deleteDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsZoneId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, + String privateCloudName) { + Mono>> mono + = deleteDnsZoneWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteDnsZoneWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteDnsZone(String resourceGroupName, String dnsZoneId, + String privateCloudName) { + return this.beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteDnsZone(String resourceGroupName, String dnsZoneId, + String privateCloudName, Context context) { + return this.beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, String privateCloudName) { + return beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, String privateCloudName, + Context context) { + return beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName) { + deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { + deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).block(); + } + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicIPsSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listPublicIPs(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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 WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicIPsSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listPublicIPs(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPublicIPsAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + return new PagedFlux<>( + () -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listPublicIPsNextSinglePageAsync(nextLink)); + } + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPublicIPsAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listPublicIPsNextSinglePageAsync(nextLink, context)); + } + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + } + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listPublicIPsAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPublicIPWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPublicIPWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + accept, context); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPublicIPAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId) { + return getPublicIPWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPublicIPWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId, Context context) { + return getPublicIPWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + context).block(); + } + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId) { + return getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createPublicIPWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (workloadNetworkPublicIP == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPublicIP is required and cannot be null.")); + } else { + workloadNetworkPublicIP.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + accept, workloadNetworkPublicIP, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createPublicIPWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } + if (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (workloadNetworkPublicIP == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPublicIP is required and cannot be null.")); + } else { + workloadNetworkPublicIP.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + accept, workloadNetworkPublicIP, context); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIPAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + Mono>> mono = createPublicIPWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, publicIPId, workloadNetworkPublicIP); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, + this.client.getContext()); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIPAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createPublicIPWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, publicIPId, workloadNetworkPublicIP, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, + context); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return this + .beginCreatePublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + return this + .beginCreatePublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP, context) + .getSyncPoller(); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createPublicIPAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return beginCreatePublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createPublicIPAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, + Context context) { + return beginCreatePublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return createPublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP).block(); + } + + /** + * Create a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param workloadNetworkPublicIP Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nSX Public IP Block. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, + Context context) { + return createPublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP, context).block(); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> deletePublicIPWithResponseAsync(String resourceGroupName, + String publicIPId, String privateCloudName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.deletePublicIP(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPId, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> deletePublicIPWithResponseAsync(String resourceGroupName, + String publicIPId, String privateCloudName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (publicIPId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); + } + if (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.deletePublicIP(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIPId, privateCloudName, accept, context); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeletePublicIPAsync(String resourceGroupName, String publicIPId, + String privateCloudName) { + Mono>> mono + = deletePublicIPWithResponseAsync(resourceGroupName, publicIPId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeletePublicIPAsync(String resourceGroupName, String publicIPId, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deletePublicIPWithResponseAsync(resourceGroupName, publicIPId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeletePublicIP(String resourceGroupName, String publicIPId, + String privateCloudName) { + return this.beginDeletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeletePublicIP(String resourceGroupName, String publicIPId, + String privateCloudName, Context context) { + return this.beginDeletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName, context).getSyncPoller(); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deletePublicIPAsync(String resourceGroupName, String publicIPId, String privateCloudName) { + return beginDeletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deletePublicIPAsync(String resourceGroupName, String publicIPId, String privateCloudName, + Context context) { + return beginDeletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName) { + deletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName).block(); + } + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { + deletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName, 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 WorkloadNetwork 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 WorkloadNetwork 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)); + } + + /** + * 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 WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSegmentsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSegmentsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .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 WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSegmentsNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listSegmentsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * 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 WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDhcpNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDhcpNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .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 WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDhcpNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listDhcpNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * 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 WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGatewaysNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .withContext(context -> service.listGatewaysNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a WorkloadNetwork. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + private Mono> listGatewaysNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context); + return service.listGatewaysNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get a WorkloadNetwork. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 a WorkloadNetwork on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName) { - return getWithResponseAsync(resourceGroupName, privateCloudName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono> + listPortMirroringNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listPortMirroringNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a WorkloadNetwork. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 a WorkloadNetwork along with {@link Response}. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, + private Mono> listPortMirroringNextSinglePageAsync(String nextLink, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, context).block(); + 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.listPortMirroringNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get a WorkloadNetwork. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 a WorkloadNetwork. + * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkInner get(String resourceGroupName, String privateCloudName) { - return getWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); + private Mono> listVMGroupsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listVMGroupsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 WorkloadNetwork list operation along with {@link PagedResponse} on successful + * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String privateCloudName) { + private Mono> listVMGroupsNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listVMGroupsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listVirtualMachinesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } - if (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName 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.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .withContext( + context -> service.listVirtualMachinesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 WorkloadNetwork list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + private Mono> + listVirtualMachinesNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - 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) + return service.listVirtualMachinesNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 WorkloadNetwork list operation as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDnsServicesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDnsServicesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 WorkloadNetwork list operation as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDnsServicesNextSinglePageAsync(String nextLink, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listNextSinglePageAsync(nextLink, 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.listDnsServicesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDnsZonesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDnsZonesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String privateCloudName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDnsZonesNextSinglePageAsync(String nextLink, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, 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.listDnsZonesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** @@ -362,11 +9607,11 @@ public PagedIterable list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listPublicIPsNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -375,8 +9620,9 @@ private Mono> listNextSinglePageAsync(String 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(), + return FluxUtil + .withContext(context -> service.listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -389,11 +9635,12 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listPublicIPsNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -403,7 +9650,7 @@ private Mono> listNextSinglePageAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } 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 00884d2f61b6e..624cd7e3541d5 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 @@ -10,9 +10,27 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; +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.models.WorkloadNetwork; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; +import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; +import com.azure.resourcemanager.avs.models.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; public final class WorkloadNetworksImpl implements WorkloadNetworks { private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworksImpl.class); @@ -27,10 +45,21 @@ public WorkloadNetworksImpl(WorkloadNetworksClient innerClient, this.serviceManager = serviceManager; } + public PagedIterable list(String resourceGroupName, String privateCloudName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + } + public Response getWithResponse(String resourceGroupName, String privateCloudName, - Context context) { + String workloadNetworkName, Context context) { Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, context); + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkImpl(inner.getValue(), this.manager())); @@ -39,8 +68,8 @@ public Response getWithResponse(String resourceGroupName, Strin } } - public WorkloadNetwork get(String resourceGroupName, String privateCloudName) { - WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName); + public WorkloadNetwork get(String resourceGroupName, String privateCloudName, String workloadNetworkName) { + WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, workloadNetworkName); if (inner != null) { return new WorkloadNetworkImpl(inner, this.manager()); } else { @@ -48,15 +77,808 @@ public WorkloadNetwork get(String resourceGroupName, String privateCloudName) { } } - public PagedIterable list(String resourceGroupName, String privateCloudName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + public PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + PagedIterable inner + = this.serviceClient().listSegments(resourceGroupName, privateCloudName, workloadNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(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 WorkloadNetworkImpl(inner1, this.manager())); + public PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().listSegments(resourceGroupName, privateCloudName, workloadNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); + } + + public Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, Context context) { + Response inner = this.serviceClient() + .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkSegmentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId) { + WorkloadNetworkSegmentInner inner + = this.serviceClient().getSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId); + if (inner != null) { + return new WorkloadNetworkSegmentImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId) { + this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId); + } + + public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId, Context context) { + this.serviceClient() + .deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context); + } + + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + PagedIterable inner + = this.serviceClient().listDhcp(resourceGroupName, privateCloudName, workloadNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); + } + + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().listDhcp(resourceGroupName, privateCloudName, workloadNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); + } + + public Response getDhcpWithResponse(String resourceGroupName, String dhcpId, + String privateCloudName, Context context) { + Response inner + = this.serviceClient().getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkDhcpImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName) { + WorkloadNetworkDhcpInner inner = this.serviceClient().getDhcp(resourceGroupName, dhcpId, privateCloudName); + if (inner != null) { + return new WorkloadNetworkDhcpImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId) { + this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId); + } + + public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + Context context) { + this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context); + } + + public PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + PagedIterable inner + = this.serviceClient().listGateways(resourceGroupName, privateCloudName, workloadNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); + } + + public PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().listGateways(resourceGroupName, privateCloudName, workloadNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); + } + + public Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId, Context context) { + Response inner = this.serviceClient() + .getGatewayWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkGatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId) { + WorkloadNetworkGatewayInner inner + = this.serviceClient().getGateway(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId); + if (inner != null) { + return new WorkloadNetworkGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + PagedIterable inner + = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); + } + + public PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); + } + + public Response getPortMirroringWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, Context context) { + Response inner = this.serviceClient() + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkPortMirroringImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId) { + WorkloadNetworkPortMirroringInner inner = this.serviceClient() + .getPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId); + if (inner != null) { + return new WorkloadNetworkPortMirroringImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { + this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName); + } + + public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName, + Context context) { + this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); + } + + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + PagedIterable inner + = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, workloadNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); + } + + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, workloadNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); + } + + public Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, Context context) { + Response inner = this.serviceClient() + .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkVMGroupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId) { + WorkloadNetworkVMGroupInner inner + = this.serviceClient().getVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId); + if (inner != null) { + return new WorkloadNetworkVMGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { + this.serviceClient().deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName); + } + + public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { + this.serviceClient().deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, context); + } + + public PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + PagedIterable inner + = this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName, workloadNetworkName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); + } + + public PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + PagedIterable inner = this.serviceClient() + .listVirtualMachines(resourceGroupName, privateCloudName, workloadNetworkName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); + } + + public Response getVirtualMachineWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context) { + Response inner = this.serviceClient() + .getVirtualMachineWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId, + context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkVirtualMachineImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String virtualMachineId) { + WorkloadNetworkVirtualMachineInner inner = this.serviceClient() + .getVirtualMachine(resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId); + if (inner != null) { + return new WorkloadNetworkVirtualMachineImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + PagedIterable inner + = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, workloadNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); + } + + public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, workloadNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); + } + + public Response getDnsServiceWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context) { + Response inner = this.serviceClient() + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkDnsServiceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId) { + WorkloadNetworkDnsServiceInner inner = this.serviceClient() + .getDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId); + if (inner != null) { + return new WorkloadNetworkDnsServiceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName) { + this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName); + } + + public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, + Context context) { + this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); + } + + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + PagedIterable inner + = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, workloadNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); + } + + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, workloadNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); + } + + public Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, Context context) { + Response inner = this.serviceClient() + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkDnsZoneImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId) { + WorkloadNetworkDnsZoneInner inner + = this.serviceClient().getDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId); + if (inner != null) { + return new WorkloadNetworkDnsZoneImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName) { + this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName); + } + + public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { + this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); + } + + public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + PagedIterable inner + = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName, workloadNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); + } + + public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName, workloadNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); + } + + public Response getPublicIPWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, Context context) { + Response inner = this.serviceClient() + .getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkPublicIpImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkloadNetworkPublicIp getPublicIP(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId) { + WorkloadNetworkPublicIpInner inner + = this.serviceClient().getPublicIP(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId); + if (inner != null) { + return new WorkloadNetworkPublicIpImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName) { + this.serviceClient().deletePublicIP(resourceGroupName, publicIPId, privateCloudName); + } + + public void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { + this.serviceClient().deletePublicIP(resourceGroupName, publicIPId, privateCloudName, context); + } + + public WorkloadNetworkSegment getSegmentById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + return this + .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE) + .getValue(); + } + + public Response getSegmentByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + return this.getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + context); + } + + public WorkloadNetworkPortMirroring getPortMirroringById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); + } + return this + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + Context.NONE) + .getValue(); + } + + public Response getPortMirroringByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); + } + return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, context); + } + + public WorkloadNetworkVMGroup getVMGroupById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + } + return this + .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, Context.NONE) + .getValue(); + } + + public Response getVMGroupByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + } + return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + context); + } + + public WorkloadNetworkDnsService getDnsServiceById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + return this + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + Context.NONE) + .getValue(); + } + + public Response getDnsServiceByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + context); + } + + public WorkloadNetworkDnsZone getDnsZoneById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + } + return this + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, Context.NONE) + .getValue(); + } + + public Response getDnsZoneByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + } + return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + context); + } + + public WorkloadNetworkPublicIp getPublicIPById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIPId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + } + return this + .getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, Context.NONE) + .getValue(); + } + + public Response getPublicIPByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIPId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + } + return this.getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + context); + } + + public void deleteSegmentById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + 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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + this.deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE); + } + + public void deleteSegmentByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + this.deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context); + } + + public void deleteDhcpById(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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); + if (dhcpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + this.deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, Context.NONE); + } + + public void deleteDhcpByIdWithResponse(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 workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } + String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); + if (dhcpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + this.deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context); } private WorkloadNetworksClient serviceClient() { @@ -66,4 +888,32 @@ private WorkloadNetworksClient serviceClient() { private com.azure.resourcemanager.avs.AvsManager manager() { return this.serviceManager; } + + public WorkloadNetworkSegmentImpl defineSegment(String name) { + return new WorkloadNetworkSegmentImpl(name, this.manager()); + } + + public WorkloadNetworkDhcpImpl defineDhcp(String name) { + return new WorkloadNetworkDhcpImpl(name, this.manager()); + } + + public WorkloadNetworkPortMirroringImpl definePortMirroring(String name) { + return new WorkloadNetworkPortMirroringImpl(name, this.manager()); + } + + public WorkloadNetworkVMGroupImpl defineVMGroup(String name) { + return new WorkloadNetworkVMGroupImpl(name, this.manager()); + } + + public WorkloadNetworkDnsServiceImpl defineDnsService(String name) { + return new WorkloadNetworkDnsServiceImpl(name, this.manager()); + } + + public WorkloadNetworkDnsZoneImpl defineDnsZone(String name) { + return new WorkloadNetworkDnsZoneImpl(name, this.manager()); + } + + public WorkloadNetworkPublicIpImpl definePublicIP(String name) { + return new WorkloadNetworkPublicIpImpl(name, this.manager()); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java deleted file mode 100644 index 221a2d7d4c1bd..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.implementation.models; - -import com.azure.core.annotation.Immutable; -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.ScriptExecutionInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a ScriptExecution list operation. - */ -@Immutable -public final class ScriptExecutionsList implements JsonSerializable { - /* - * The ScriptExecution items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ScriptExecutionsList class. - */ - private ScriptExecutionsList() { - } - - /** - * Get the value property: The ScriptExecution items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ScriptExecutionsList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionsList.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 ScriptExecutionsList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptExecutionsList 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 ScriptExecutionsList. - */ - public static ScriptExecutionsList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptExecutionsList deserializedScriptExecutionsList = new ScriptExecutionsList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ScriptExecutionInner.fromJson(reader1)); - deserializedScriptExecutionsList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedScriptExecutionsList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScriptExecutionsList; - }); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java deleted file mode 100644 index 65be88695cf64..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateHeaders.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The ClustersUpdateHeaders model. - */ -@Immutable -public final class ClustersUpdateHeaders { - /* - * The Retry-After property. - */ - private Integer retryAfter; - - /* - * The Location property. - */ - private String location; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of ClustersUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public ClustersUpdateHeaders(HttpHeaders rawHeaders) { - String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); - if (retryAfter != null) { - this.retryAfter = Integer.parseInt(retryAfter); - } - this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); - } - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateResponse.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateResponse.java deleted file mode 100644 index 359210ef2a639..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClustersUpdateResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.avs.fluent.models.ClusterInner; - -/** - * Contains all response data for the update operation. - */ -public final class ClustersUpdateResponse extends ResponseBase { - /** - * Creates an instance of ClustersUpdateResponse. - * - * @param request the request which resulted in this ClustersUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public ClustersUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, ClusterInner value, - ClustersUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public ClusterInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java index 5f993e09c4f10..dcf8ca9ba2050 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java @@ -5,6 +5,7 @@ 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.IscsiPathInner; /** @@ -53,10 +54,131 @@ public interface IscsiPath { */ String networkBlock(); + /** + * 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.IscsiPathInner object. * * @return the inner object. */ IscsiPathInner innerModel(); + + /** + * The entirety of the IscsiPath definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The IscsiPath definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the IscsiPath definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the IscsiPath 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 IscsiPath 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.WithNetworkBlock { + /** + * Executes the create request. + * + * @return the created resource. + */ + IscsiPath create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + IscsiPath create(Context context); + } + + /** + * The stage of the IscsiPath definition allowing to specify networkBlock. + */ + interface WithNetworkBlock { + /** + * Specifies the networkBlock property: CIDR Block for iSCSI path.. + * + * @param networkBlock CIDR Block for iSCSI path. + * @return the next definition stage. + */ + WithCreate withNetworkBlock(String networkBlock); + } + } + + /** + * Begins update for the IscsiPath resource. + * + * @return the stage of resource update. + */ + IscsiPath.Update update(); + + /** + * The template for IscsiPath update. + */ + interface Update { + /** + * Executes the update request. + * + * @return the updated resource. + */ + IscsiPath apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + IscsiPath apply(Context context); + } + + /** + * The IscsiPath update stages. + */ + interface UpdateStages { + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + IscsiPath refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + IscsiPath refresh(Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java index f73c348581079..99731a7191ff1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; /** * Resource collection API of IscsiPaths. @@ -43,74 +42,103 @@ public interface IscsiPaths { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName, + Context context); /** * Get a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath. */ - IscsiPath get(String resourceGroupName, String privateCloudName); + IscsiPath get(String resourceGroupName, String privateCloudName, String iscsiPathName); /** - * Create a IscsiPath. + * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param resource Resource create parameters. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an iSCSI path resource. */ - IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); + void delete(String resourceGroupName, String privateCloudName, String iscsiPathName); /** - * Create a IscsiPath. + * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param resource Resource create parameters. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an iSCSI path resource. */ - IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, - Context context); + void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context); + + /** + * Get a IscsiPath. + * + * @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 IscsiPath along with {@link Response}. + */ + IscsiPath getById(String id); + + /** + * Get a IscsiPath. + * + * @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 IscsiPath along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); /** * Delete a IscsiPath. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 deleteByResourceGroup(String resourceGroupName, String privateCloudName); + void deleteById(String id); /** * Delete a IscsiPath. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 delete(String resourceGroupName, String privateCloudName, Context context); + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new IscsiPath resource. + * + * @param name resource name. + * @return the first stage of the new IscsiPath definition. + */ + IscsiPath.DefinitionStages.Blank define(String name); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java deleted file mode 100644 index 3bed16e484c12..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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; - -/** - * a powershell credential object. - */ -@Fluent -public final class PSCredentialExecutionParameter extends ScriptExecutionParameter { - /* - * script execution parameter type - */ - private ScriptExecutionParameterType type = ScriptExecutionParameterType.CREDENTIAL; - - /* - * username for login - */ - private String username; - - /* - * password for login - */ - private String password; - - /** - * Creates an instance of PSCredentialExecutionParameter class. - */ - public PSCredentialExecutionParameter() { - } - - /** - * Get the type property: script execution parameter type. - * - * @return the type value. - */ - @Override - public ScriptExecutionParameterType type() { - return this.type; - } - - /** - * Get the username property: username for login. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: username for login. - * - * @param username the username value to set. - * @return the PSCredentialExecutionParameter object itself. - */ - public PSCredentialExecutionParameter withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: password for login. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: password for login. - * - * @param password the password value to set. - * @return the PSCredentialExecutionParameter object itself. - */ - public PSCredentialExecutionParameter withPassword(String password) { - this.password = password; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PSCredentialExecutionParameter withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("password", this.password); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PSCredentialExecutionParameter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PSCredentialExecutionParameter 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 PSCredentialExecutionParameter. - */ - public static PSCredentialExecutionParameter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PSCredentialExecutionParameter deserializedPSCredentialExecutionParameter - = new PSCredentialExecutionParameter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedPSCredentialExecutionParameter.withName(reader.getString()); - } else if ("type".equals(fieldName)) { - deserializedPSCredentialExecutionParameter.type - = ScriptExecutionParameterType.fromString(reader.getString()); - } else if ("username".equals(fieldName)) { - deserializedPSCredentialExecutionParameter.username = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedPSCredentialExecutionParameter.password = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPSCredentialExecutionParameter; - }); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java deleted file mode 100644 index 44d68e385fb44..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateHeaders.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The PlacementPoliciesUpdateHeaders model. - */ -@Immutable -public final class PlacementPoliciesUpdateHeaders { - /* - * The Retry-After property. - */ - private Integer retryAfter; - - /* - * The Location property. - */ - private String location; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of PlacementPoliciesUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public PlacementPoliciesUpdateHeaders(HttpHeaders rawHeaders) { - String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER); - if (retryAfter != null) { - this.retryAfter = Integer.parseInt(retryAfter); - } - this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); - } - - /** - * Get the retryAfter property: The Retry-After property. - * - * @return the retryAfter value. - */ - public Integer retryAfter() { - return this.retryAfter; - } - - /** - * Get the location property: The Location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateResponse.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateResponse.java deleted file mode 100644 index f3c6e6af2b38a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesUpdateResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; - -/** - * Contains all response data for the update operation. - */ -public final class PlacementPoliciesUpdateResponse - extends ResponseBase { - /** - * Creates an instance of PlacementPoliciesUpdateResponse. - * - * @param request the request which resulted in this PlacementPoliciesUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public PlacementPoliciesUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - PlacementPolicyInner value, PlacementPoliciesUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public PlacementPolicyInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java index 3e91d9d5b693e..ee11984302f2b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java @@ -32,7 +32,7 @@ public final class PrivateCloudIdentity implements JsonSerializable { - /** - * Creates an instance of PrivateCloudsUpdateResponse. - * - * @param request the request which resulted in this PrivateCloudsUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public PrivateCloudsUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - PrivateCloudInner value, PrivateCloudsUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public PrivateCloudInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java deleted file mode 100644 index 901a9b78ed3be..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of managed service identity (either system assigned, or none). - */ -public final class ResourceIdentityType extends ExpandableStringEnum { - /** - * Static value None for ResourceIdentityType. - */ - public static final ResourceIdentityType NONE = fromString("None"); - - /** - * Static value SystemAssigned for ResourceIdentityType. - */ - public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * Creates a new instance of ResourceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResourceIdentityType() { - } - - /** - * Creates or finds a ResourceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourceIdentityType. - */ - public static ResourceIdentityType fromString(String name) { - return fromString(name, ResourceIdentityType.class); - } - - /** - * Gets known ResourceIdentityType values. - * - * @return known ResourceIdentityType values. - */ - public static Collection values() { - return values(ResourceIdentityType.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java deleted file mode 100644 index 8ae8c62b9d1b4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java +++ /dev/null @@ -1,518 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of ScriptExecution. - */ -public interface ScriptExecution { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * - * @return the scriptCmdletId value. - */ - String scriptCmdletId(); - - /** - * Gets the parameters property: Parameters the script will accept. - * - * @return the parameters value. - */ - List parameters(); - - /** - * Gets the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. - * - * @return the hiddenParameters value. - */ - List hiddenParameters(); - - /** - * Gets the failureReason property: Error message if the script was able to run, but if the script itself had - * errors or powershell threw an exception. - * - * @return the failureReason value. - */ - String failureReason(); - - /** - * Gets the timeout property: Time limit for execution. - * - * @return the timeout value. - */ - String timeout(); - - /** - * Gets the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * - * @return the retention value. - */ - String retention(); - - /** - * Gets the submittedAt property: Time the script execution was submitted. - * - * @return the submittedAt value. - */ - OffsetDateTime submittedAt(); - - /** - * Gets the startedAt property: Time the script execution was started. - * - * @return the startedAt value. - */ - OffsetDateTime startedAt(); - - /** - * Gets the finishedAt property: Time the script execution was finished. - * - * @return the finishedAt value. - */ - OffsetDateTime finishedAt(); - - /** - * Gets the provisioningState property: The state of the script execution resource. - * - * @return the provisioningState value. - */ - ScriptExecutionProvisioningState provisioningState(); - - /** - * Gets the output property: Standard output stream from the powershell execution. - * - * @return the output value. - */ - List output(); - - /** - * Gets the namedOutputs property: User-defined dictionary. - * - * @return the namedOutputs value. - */ - Map namedOutputs(); - - /** - * Gets the information property: Standard information out stream from the powershell execution. - * - * @return the information value. - */ - List information(); - - /** - * Gets the warnings property: Standard warning out stream from the powershell execution. - * - * @return the warnings value. - */ - List warnings(); - - /** - * Gets the errors property: Standard error output stream from the powershell execution. - * - * @return the errors value. - */ - List errors(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner object. - * - * @return the inner object. - */ - ScriptExecutionInner innerModel(); - - /** - * The entirety of the ScriptExecution definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ScriptExecution definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ScriptExecution definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ScriptExecution definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, privateCloudName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @return the next definition stage. - */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); - } - - /** - * The stage of the ScriptExecution definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithScriptCmdletId, DefinitionStages.WithParameters, - DefinitionStages.WithHiddenParameters, DefinitionStages.WithFailureReason, DefinitionStages.WithTimeout, - DefinitionStages.WithRetention, DefinitionStages.WithOutput, DefinitionStages.WithNamedOutputs { - /** - * Executes the create request. - * - * @return the created resource. - */ - ScriptExecution create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ScriptExecution create(Context context); - } - - /** - * The stage of the ScriptExecution definition allowing to specify scriptCmdletId. - */ - interface WithScriptCmdletId { - /** - * Specifies the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS - * script. - * - * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script. - * @return the next definition stage. - */ - WithCreate withScriptCmdletId(String scriptCmdletId); - } - - /** - * The stage of the ScriptExecution definition allowing to specify parameters. - */ - interface WithParameters { - /** - * Specifies the parameters property: Parameters the script will accept. - * - * @param parameters Parameters the script will accept. - * @return the next definition stage. - */ - WithCreate withParameters(List parameters); - } - - /** - * The stage of the ScriptExecution definition allowing to specify hiddenParameters. - */ - interface WithHiddenParameters { - /** - * Specifies the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as - * passwords and - * credentials. - * - * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. - * @return the next definition stage. - */ - WithCreate withHiddenParameters(List hiddenParameters); - } - - /** - * The stage of the ScriptExecution definition allowing to specify failureReason. - */ - interface WithFailureReason { - /** - * Specifies the failureReason property: Error message if the script was able to run, but if the script - * itself had - * errors or powershell threw an exception. - * - * @param failureReason Error message if the script was able to run, but if the script itself had - * errors or powershell threw an exception. - * @return the next definition stage. - */ - WithCreate withFailureReason(String failureReason); - } - - /** - * The stage of the ScriptExecution definition allowing to specify timeout. - */ - interface WithTimeout { - /** - * Specifies the timeout property: Time limit for execution. - * - * @param timeout Time limit for execution. - * @return the next definition stage. - */ - WithCreate withTimeout(String timeout); - } - - /** - * The stage of the ScriptExecution definition allowing to specify retention. - */ - interface WithRetention { - /** - * Specifies the retention property: Time to live for the resource. If not provided, will be available for - * 60 days. - * - * @param retention Time to live for the resource. If not provided, will be available for 60 days. - * @return the next definition stage. - */ - WithCreate withRetention(String retention); - } - - /** - * The stage of the ScriptExecution definition allowing to specify output. - */ - interface WithOutput { - /** - * Specifies the output property: Standard output stream from the powershell execution. - * - * @param output Standard output stream from the powershell execution. - * @return the next definition stage. - */ - WithCreate withOutput(List output); - } - - /** - * The stage of the ScriptExecution definition allowing to specify namedOutputs. - */ - interface WithNamedOutputs { - /** - * Specifies the namedOutputs property: User-defined dictionary.. - * - * @param namedOutputs User-defined dictionary. - * @return the next definition stage. - */ - WithCreate withNamedOutputs(Map namedOutputs); - } - } - - /** - * Begins update for the ScriptExecution resource. - * - * @return the stage of resource update. - */ - ScriptExecution.Update update(); - - /** - * The template for ScriptExecution update. - */ - interface Update extends UpdateStages.WithScriptCmdletId, UpdateStages.WithParameters, - UpdateStages.WithHiddenParameters, UpdateStages.WithFailureReason, UpdateStages.WithTimeout, - UpdateStages.WithRetention, UpdateStages.WithOutput, UpdateStages.WithNamedOutputs { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ScriptExecution apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ScriptExecution apply(Context context); - } - - /** - * The ScriptExecution update stages. - */ - interface UpdateStages { - /** - * The stage of the ScriptExecution update allowing to specify scriptCmdletId. - */ - interface WithScriptCmdletId { - /** - * Specifies the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS - * script. - * - * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script. - * @return the next definition stage. - */ - Update withScriptCmdletId(String scriptCmdletId); - } - - /** - * The stage of the ScriptExecution update allowing to specify parameters. - */ - interface WithParameters { - /** - * Specifies the parameters property: Parameters the script will accept. - * - * @param parameters Parameters the script will accept. - * @return the next definition stage. - */ - Update withParameters(List parameters); - } - - /** - * The stage of the ScriptExecution update allowing to specify hiddenParameters. - */ - interface WithHiddenParameters { - /** - * Specifies the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as - * passwords and - * credentials. - * - * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. - * @return the next definition stage. - */ - Update withHiddenParameters(List hiddenParameters); - } - - /** - * The stage of the ScriptExecution update allowing to specify failureReason. - */ - interface WithFailureReason { - /** - * Specifies the failureReason property: Error message if the script was able to run, but if the script - * itself had - * errors or powershell threw an exception. - * - * @param failureReason Error message if the script was able to run, but if the script itself had - * errors or powershell threw an exception. - * @return the next definition stage. - */ - Update withFailureReason(String failureReason); - } - - /** - * The stage of the ScriptExecution update allowing to specify timeout. - */ - interface WithTimeout { - /** - * Specifies the timeout property: Time limit for execution. - * - * @param timeout Time limit for execution. - * @return the next definition stage. - */ - Update withTimeout(String timeout); - } - - /** - * The stage of the ScriptExecution update allowing to specify retention. - */ - interface WithRetention { - /** - * Specifies the retention property: Time to live for the resource. If not provided, will be available for - * 60 days. - * - * @param retention Time to live for the resource. If not provided, will be available for 60 days. - * @return the next definition stage. - */ - Update withRetention(String retention); - } - - /** - * The stage of the ScriptExecution update allowing to specify output. - */ - interface WithOutput { - /** - * Specifies the output property: Standard output stream from the powershell execution. - * - * @param output Standard output stream from the powershell execution. - * @return the next definition stage. - */ - Update withOutput(List output); - } - - /** - * The stage of the ScriptExecution update allowing to specify namedOutputs. - */ - interface WithNamedOutputs { - /** - * Specifies the namedOutputs property: User-defined dictionary.. - * - * @param namedOutputs User-defined dictionary. - * @return the next definition stage. - */ - Update withNamedOutputs(Map namedOutputs); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ScriptExecution refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ScriptExecution refresh(Context context); - - /** - * Return the logs for a script execution resource. - * - * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. - */ - Response getExecutionLogsWithResponse(List scriptOutputStreamType, - Context context); - - /** - * Return the logs for a script execution resource. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS. - */ - ScriptExecution getExecutionLogs(); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java deleted file mode 100644 index 2767375ab4876..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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; - -/** - * The arguments passed in to the execution. - */ -@Fluent -public class ScriptExecutionParameter implements JsonSerializable { - /* - * script execution parameter type - */ - private ScriptExecutionParameterType type = ScriptExecutionParameterType.fromString("ScriptExecutionParameter"); - - /* - * The parameter name - */ - private String name; - - /** - * Creates an instance of ScriptExecutionParameter class. - */ - public ScriptExecutionParameter() { - } - - /** - * Get the type property: script execution parameter type. - * - * @return the type value. - */ - public ScriptExecutionParameterType type() { - return this.type; - } - - /** - * Get the name property: The parameter name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The parameter name. - * - * @param name the name value to set. - * @return the ScriptExecutionParameter object itself. - */ - public ScriptExecutionParameter withName(String name) { - this.name = name; - 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 ScriptExecutionParameter")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionParameter.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScriptExecutionParameter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptExecutionParameter 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 ScriptExecutionParameter. - */ - public static ScriptExecutionParameter 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 ("type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("SecureValue".equals(discriminatorValue)) { - return ScriptSecureStringExecutionParameter.fromJson(readerToUse.reset()); - } else if ("Value".equals(discriminatorValue)) { - return ScriptStringExecutionParameter.fromJson(readerToUse.reset()); - } else if ("Credential".equals(discriminatorValue)) { - return PSCredentialExecutionParameter.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ScriptExecutionParameter fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptExecutionParameter deserializedScriptExecutionParameter = new ScriptExecutionParameter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedScriptExecutionParameter.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedScriptExecutionParameter.type - = ScriptExecutionParameterType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedScriptExecutionParameter; - }); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java deleted file mode 100644 index 73e9dbf342a40..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * script execution parameter type. - */ -public final class ScriptExecutionParameterType extends ExpandableStringEnum { - /** - * Static value Value for ScriptExecutionParameterType. - */ - public static final ScriptExecutionParameterType VALUE = fromString("Value"); - - /** - * Static value SecureValue for ScriptExecutionParameterType. - */ - public static final ScriptExecutionParameterType SECURE_VALUE = fromString("SecureValue"); - - /** - * Static value Credential for ScriptExecutionParameterType. - */ - public static final ScriptExecutionParameterType CREDENTIAL = fromString("Credential"); - - /** - * Creates a new instance of ScriptExecutionParameterType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScriptExecutionParameterType() { - } - - /** - * Creates or finds a ScriptExecutionParameterType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScriptExecutionParameterType. - */ - public static ScriptExecutionParameterType fromString(String name) { - return fromString(name, ScriptExecutionParameterType.class); - } - - /** - * Gets known ScriptExecutionParameterType values. - * - * @return known ScriptExecutionParameterType values. - */ - public static Collection values() { - return values(ScriptExecutionParameterType.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java deleted file mode 100644 index fdba11f21f352..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Script Execution provisioning state. - */ -public final class ScriptExecutionProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for ScriptExecutionProvisioningState. - */ - public static final ScriptExecutionProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for ScriptExecutionProvisioningState. - */ - public static final ScriptExecutionProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for ScriptExecutionProvisioningState. - */ - public static final ScriptExecutionProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Pending for ScriptExecutionProvisioningState. - */ - public static final ScriptExecutionProvisioningState PENDING = fromString("Pending"); - - /** - * Static value Running for ScriptExecutionProvisioningState. - */ - public static final ScriptExecutionProvisioningState RUNNING = fromString("Running"); - - /** - * Static value Cancelling for ScriptExecutionProvisioningState. - */ - public static final ScriptExecutionProvisioningState CANCELLING = fromString("Cancelling"); - - /** - * Static value Cancelled for ScriptExecutionProvisioningState. - */ - public static final ScriptExecutionProvisioningState CANCELLED = fromString("Cancelled"); - - /** - * Static value Deleting for ScriptExecutionProvisioningState. - */ - public static final ScriptExecutionProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of ScriptExecutionProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScriptExecutionProvisioningState() { - } - - /** - * Creates or finds a ScriptExecutionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScriptExecutionProvisioningState. - */ - public static ScriptExecutionProvisioningState fromString(String name) { - return fromString(name, ScriptExecutionProvisioningState.class); - } - - /** - * Gets known ScriptExecutionProvisioningState values. - * - * @return known ScriptExecutionProvisioningState values. - */ - public static Collection values() { - return values(ScriptExecutionProvisioningState.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java deleted file mode 100644 index 751fd80070b2e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import java.util.List; - -/** - * Resource collection API of ScriptExecutions. - */ -public interface ScriptExecutions { - /** - * List ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List ScriptExecution resources by PrivateCloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String scriptExecutionName, Context context); - - /** - * Get a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution. - */ - ScriptExecution get(String resourceGroupName, String privateCloudName, String scriptExecutionName); - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName); - - /** - * Delete a ScriptExecution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); - - /** - * Return the logs for a script execution resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. - */ - Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, - String scriptExecutionName, List scriptOutputStreamType, Context context); - - /** - * Return the logs for a script execution resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the script cmdlet. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an instance of a script executed by a user - custom or AVS. - */ - ScriptExecution getExecutionLogs(String resourceGroupName, String privateCloudName, String scriptExecutionName); - - /** - * Get a ScriptExecution. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution along with {@link Response}. - */ - ScriptExecution getById(String id); - - /** - * Get a ScriptExecution. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a ScriptExecution along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a ScriptExecution. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a ScriptExecution. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 ScriptExecution resource. - * - * @param name resource name. - * @return the first stage of the new ScriptExecution definition. - */ - ScriptExecution.DefinitionStages.Blank define(String name); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java deleted file mode 100644 index 4407420e71ae2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Script Output Stream type. - */ -public final class ScriptOutputStreamType extends ExpandableStringEnum { - /** - * Static value Information for ScriptOutputStreamType. - */ - public static final ScriptOutputStreamType INFORMATION = fromString("Information"); - - /** - * Static value Warning for ScriptOutputStreamType. - */ - public static final ScriptOutputStreamType WARNING = fromString("Warning"); - - /** - * Static value Output for ScriptOutputStreamType. - */ - public static final ScriptOutputStreamType OUTPUT = fromString("Output"); - - /** - * Static value Error for ScriptOutputStreamType. - */ - public static final ScriptOutputStreamType ERROR = fromString("Error"); - - /** - * Creates a new instance of ScriptOutputStreamType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScriptOutputStreamType() { - } - - /** - * Creates or finds a ScriptOutputStreamType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScriptOutputStreamType. - */ - public static ScriptOutputStreamType fromString(String name) { - return fromString(name, ScriptOutputStreamType.class); - } - - /** - * Gets known ScriptOutputStreamType values. - * - * @return known ScriptOutputStreamType values. - */ - public static Collection values() { - return values(ScriptOutputStreamType.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java deleted file mode 100644 index 463da8ee5d634..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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; - -/** - * a plain text value execution parameter. - */ -@Fluent -public final class ScriptSecureStringExecutionParameter extends ScriptExecutionParameter { - /* - * script execution parameter type - */ - private ScriptExecutionParameterType type = ScriptExecutionParameterType.SECURE_VALUE; - - /* - * A secure value for the passed parameter, not to be stored in logs - */ - private String secureValue; - - /** - * Creates an instance of ScriptSecureStringExecutionParameter class. - */ - public ScriptSecureStringExecutionParameter() { - } - - /** - * Get the type property: script execution parameter type. - * - * @return the type value. - */ - @Override - public ScriptExecutionParameterType type() { - return this.type; - } - - /** - * Get the secureValue property: A secure value for the passed parameter, not to be stored in logs. - * - * @return the secureValue value. - */ - public String secureValue() { - return this.secureValue; - } - - /** - * Set the secureValue property: A secure value for the passed parameter, not to be stored in logs. - * - * @param secureValue the secureValue value to set. - * @return the ScriptSecureStringExecutionParameter object itself. - */ - public ScriptSecureStringExecutionParameter withSecureValue(String secureValue) { - this.secureValue = secureValue; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ScriptSecureStringExecutionParameter withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("secureValue", this.secureValue); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScriptSecureStringExecutionParameter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptSecureStringExecutionParameter 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 ScriptSecureStringExecutionParameter. - */ - public static ScriptSecureStringExecutionParameter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptSecureStringExecutionParameter deserializedScriptSecureStringExecutionParameter - = new ScriptSecureStringExecutionParameter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedScriptSecureStringExecutionParameter.withName(reader.getString()); - } else if ("type".equals(fieldName)) { - deserializedScriptSecureStringExecutionParameter.type - = ScriptExecutionParameterType.fromString(reader.getString()); - } else if ("secureValue".equals(fieldName)) { - deserializedScriptSecureStringExecutionParameter.secureValue = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScriptSecureStringExecutionParameter; - }); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java deleted file mode 100644 index d960180ba1c52..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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; - -/** - * a plain text value execution parameter. - */ -@Fluent -public final class ScriptStringExecutionParameter extends ScriptExecutionParameter { - /* - * script execution parameter type - */ - private ScriptExecutionParameterType type = ScriptExecutionParameterType.VALUE; - - /* - * The value for the passed parameter - */ - private String value; - - /** - * Creates an instance of ScriptStringExecutionParameter class. - */ - public ScriptStringExecutionParameter() { - } - - /** - * Get the type property: script execution parameter type. - * - * @return the type value. - */ - @Override - public ScriptExecutionParameterType type() { - return this.type; - } - - /** - * Get the value property: The value for the passed parameter. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value for the passed parameter. - * - * @param value the value value to set. - * @return the ScriptStringExecutionParameter object itself. - */ - public ScriptStringExecutionParameter withValue(String value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ScriptStringExecutionParameter withName(String name) { - super.withName(name); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScriptStringExecutionParameter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptStringExecutionParameter 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 ScriptStringExecutionParameter. - */ - public static ScriptStringExecutionParameter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptStringExecutionParameter deserializedScriptStringExecutionParameter - = new ScriptStringExecutionParameter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedScriptStringExecutionParameter.withName(reader.getString()); - } else if ("type".equals(fieldName)) { - deserializedScriptStringExecutionParameter.type - = ScriptExecutionParameterType.fromString(reader.getString()); - } else if ("value".equals(fieldName)) { - deserializedScriptStringExecutionParameter.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScriptStringExecutionParameter; - }); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentityType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentityType.java new file mode 100644 index 0000000000000..cd7fe1d6d48cc --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentityType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of managed service identity (either system assigned, or none). + */ +public final class SystemAssignedServiceIdentityType extends ExpandableStringEnum { + /** + * Static value None for SystemAssignedServiceIdentityType. + */ + public static final SystemAssignedServiceIdentityType NONE = fromString("None"); + + /** + * Static value SystemAssigned for SystemAssignedServiceIdentityType. + */ + public static final SystemAssignedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * Creates a new instance of SystemAssignedServiceIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SystemAssignedServiceIdentityType() { + } + + /** + * Creates or finds a SystemAssignedServiceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SystemAssignedServiceIdentityType. + */ + public static SystemAssignedServiceIdentityType fromString(String name) { + return fromString(name, SystemAssignedServiceIdentityType.class); + } + + /** + * Gets known SystemAssignedServiceIdentityType values. + * + * @return known SystemAssignedServiceIdentityType values. + */ + public static Collection values() { + return values(SystemAssignedServiceIdentityType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java index adad0ea38981f..c3b35ecd53f8f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java @@ -83,13 +83,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** @@ -171,19 +173,4 @@ interface WithProperties { Update withProperties(WorkloadNetworkDhcpEntity properties); } } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - WorkloadNetworkDhcp refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - WorkloadNetworkDhcp refresh(Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpConfigurations.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpConfigurations.java deleted file mode 100644 index 51dcc41365147..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpConfigurations.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDhcpConfigurations. - */ -public interface WorkloadNetworkDhcpConfigurations { - /** - * List WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkDhcp resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String dhcpId, String privateCloudName, - Context context); - - /** - * Get a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId The ID of the DHCP configuration. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp. - */ - WorkloadNetworkDhcp get(String resourceGroupName, String dhcpId, String privateCloudName); - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String privateCloudName, String dhcpId); - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dhcpId The ID of the DHCP configuration. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String privateCloudName, String dhcpId, Context context); - - /** - * Get a WorkloadNetworkDhcp. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp along with {@link Response}. - */ - WorkloadNetworkDhcp getById(String id); - - /** - * Get a WorkloadNetworkDhcp. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a WorkloadNetworkDhcp. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkloadNetworkDhcp resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkDhcp definition. - */ - WorkloadNetworkDhcp.DefinitionStages.Blank define(String name); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java index 02b5b76dac316..ba1164bea099f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java @@ -133,13 +133,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServices.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServices.java deleted file mode 100644 index 985c87c89fca8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServices.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsServices. - */ -public interface WorkloadNetworkDnsServices { - /** - * List WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkDnsService resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsService list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String dnsServiceId, Context context); - - /** - * Get a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId ID of the DNS service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService. - */ - WorkloadNetworkDnsService get(String resourceGroupName, String privateCloudName, String dnsServiceId); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 dnsServiceId, String privateCloudName); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId ID of the DNS service. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 dnsServiceId, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkDnsService. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService along with {@link Response}. - */ - WorkloadNetworkDnsService getById(String id); - - /** - * Get a WorkloadNetworkDnsService. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsService along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkloadNetworkDnsService resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkDnsService definition. - */ - WorkloadNetworkDnsService.DefinitionStages.Blank define(String name); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java index 7fc1a1f4f7960..e10c06df311e2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java @@ -126,13 +126,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZones.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZones.java deleted file mode 100644 index 9666803673251..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZones.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsZones. - */ -public interface WorkloadNetworkDnsZones { - /** - * List WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkDnsZone resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String dnsZoneId, Context context); - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone. - */ - WorkloadNetworkDnsZone get(String resourceGroupName, String privateCloudName, String dnsZoneId); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String dnsZoneId, String privateCloudName); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone along with {@link Response}. - */ - WorkloadNetworkDnsZone getById(String id); - - /** - * Get a WorkloadNetworkDnsZone. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDnsZone along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkloadNetworkDnsZone resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkDnsZone definition. - */ - WorkloadNetworkDnsZone.DefinitionStages.Blank define(String name); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateways.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateways.java deleted file mode 100644 index c2a099589a2ee..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateways.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkGateways. - */ -public interface WorkloadNetworkGateways { - /** - * List WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkGateway resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkGateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId The ID of the NSX Gateway. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkGateway along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String gatewayId, Context context); - - /** - * Get a WorkloadNetworkGateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param gatewayId The ID of the NSX Gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkGateway. - */ - WorkloadNetworkGateway get(String resourceGroupName, String privateCloudName, String gatewayId); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java index e9fe2eadd5cd2..d6e9cbc05a437 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java @@ -125,13 +125,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProfiles.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProfiles.java deleted file mode 100644 index ff748f8f3cdb1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProfiles.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPortMirroringProfiles. - */ -public interface WorkloadNetworkPortMirroringProfiles { - /** - * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, - Context context); - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String portMirroringId, Context context); - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId ID of the NSX port mirroring profile. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring. - */ - WorkloadNetworkPortMirroring get(String resourceGroupName, String privateCloudName, String portMirroringId); - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String portMirroringId, String privateCloudName); - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId ID of the NSX port mirroring profile. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String portMirroringId, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring along with {@link Response}. - */ - WorkloadNetworkPortMirroring getById(String id); - - /** - * Get a WorkloadNetworkPortMirroring. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPortMirroring along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkloadNetworkPortMirroring resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkPortMirroring definition. - */ - WorkloadNetworkPortMirroring.DefinitionStages.Blank define(String name); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java index 13b6a50c67f19..e78c192d71988 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java @@ -97,13 +97,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIps.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIps.java deleted file mode 100644 index cfc5eb912ceb1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIps.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPublicIps. - */ -public interface WorkloadNetworkPublicIps { - /** - * List WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkPublicIP resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String publicIPId, Context context); - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param publicIPId ID of the DNS zone. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP. - */ - WorkloadNetworkPublicIp get(String resourceGroupName, String privateCloudName, String publicIPId); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String publicIPId, String privateCloudName); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIPId ID of the DNS zone. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String publicIPId, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP along with {@link Response}. - */ - WorkloadNetworkPublicIp getById(String id); - - /** - * Get a WorkloadNetworkPublicIP. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkPublicIP along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkloadNetworkPublicIp resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkPublicIp definition. - */ - WorkloadNetworkPublicIp.DefinitionStages.Blank define(String name); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java index 5d92d9259dd11..03d139ad909df 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java @@ -126,13 +126,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegments.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegments.java deleted file mode 100644 index 27d8db31b5be0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegments.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkSegments. - */ -public interface WorkloadNetworkSegments { - /** - * List WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkSegment resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String segmentId, Context context); - - /** - * Get a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment. - */ - WorkloadNetworkSegment get(String resourceGroupName, String privateCloudName, String segmentId); - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); - - /** - * Delete a WorkloadNetworkSegment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param segmentId The ID of the NSX Segment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); - - /** - * Get a WorkloadNetworkSegment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment along with {@link Response}. - */ - WorkloadNetworkSegment getById(String id); - - /** - * Get a WorkloadNetworkSegment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkSegment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkSegment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteSegmentById(String id); - - /** - * Delete a WorkloadNetworkSegment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteSegmentByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkloadNetworkSegment resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkSegment definition. - */ - WorkloadNetworkSegment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java index 5da5fa4d3d880..f1e4a4345df5e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java @@ -112,13 +112,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachines.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachines.java deleted file mode 100644 index 284dbf583a98c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachines.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVirtualMachines. - */ -public interface WorkloadNetworkVirtualMachines { - /** - * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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 WorkloadNetworkVirtualMachine list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, - Context context); - - /** - * Get a WorkloadNetworkVirtualMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId ID of the virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVirtualMachine along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String virtualMachineId, Context context); - - /** - * Get a WorkloadNetworkVirtualMachine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param virtualMachineId ID of the virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVirtualMachine. - */ - WorkloadNetworkVirtualMachine get(String resourceGroupName, String privateCloudName, String virtualMachineId); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVmGroups.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVmGroups.java deleted file mode 100644 index 39f52b492494a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVmGroups.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVmGroups. - */ -public interface WorkloadNetworkVmGroups { - /** - * List WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName); - - /** - * List WorkloadNetworkVMGroup resources by WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String vmGroupId, Context context); - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param vmGroupId ID of the VM group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup. - */ - WorkloadNetworkVMGroup get(String resourceGroupName, String privateCloudName, String vmGroupId); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String vmGroupId, String privateCloudName); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId ID of the VM group. - * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup along with {@link Response}. - */ - WorkloadNetworkVMGroup getById(String id); - - /** - * Get a WorkloadNetworkVMGroup. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkVMGroup along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkloadNetworkVMGroup resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkVMGroup definition. - */ - WorkloadNetworkVMGroup.DefinitionStages.Blank define(String name); -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java index 6114d49bacd35..cd309058ad6cd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java @@ -12,53 +12,1019 @@ * Resource collection API of WorkloadNetworks. */ public interface WorkloadNetworks { + /** + * List WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + /** * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetwork along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); /** * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetwork. */ - WorkloadNetwork get(String resourceGroupName, String privateCloudName); + WorkloadNetwork get(String resourceGroupName, String privateCloudName, String workloadNetworkName); /** - * List WorkloadNetwork resources by PrivateCloud. + * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String privateCloudName); + PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** - * List WorkloadNetwork resources by PrivateCloud. + * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment. + */ + WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param segmentId The ID of the NSX Segment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + Context context); + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + Response getDhcpWithResponse(String resourceGroupName, String dhcpId, String privateCloudName, + Context context); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp. + */ + WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dhcpId The ID of the DHCP configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + Context context); + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param gatewayId The ID of the NSX Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway along with {@link Response}. + */ + Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId, Context context); + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param gatewayId The ID of the NSX Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkGateway. + */ + WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String gatewayId); + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + Response getPortMirroringWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String portMirroringId, Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param portMirroringId ID of the NSX port mirroring profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring. + */ + WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String portMirroringId); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName, + Context context); + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param vmGroupId ID of the VM group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup. + */ + WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String vmGroupId); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vmGroupId ID of the VM group. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param virtualMachineId ID of the virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine along with {@link Response}. + */ + Response getVirtualMachineWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context); + + /** + * Get a WorkloadNetworkVirtualMachine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param virtualMachineId ID of the virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVirtualMachine. + */ + WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String virtualMachineId); + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + Response getDnsServiceWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId, Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsServiceId ID of the DNS service. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService. + */ + WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param dnsZoneId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone. + */ + WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsZoneId); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + String workloadNetworkName); + + /** + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + Response getPublicIPWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param publicIPId ID of the DNS zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP. + */ + WorkloadNetworkPublicIp getPublicIP(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String publicIPId); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIPId ID of the DNS zone. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName, Context context); + + /** + * Get a WorkloadNetworkSegment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + WorkloadNetworkSegment getSegmentById(String id); + + /** + * Get a WorkloadNetworkSegment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkSegment along with {@link Response}. + */ + Response getSegmentByIdWithResponse(String id, Context context); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + WorkloadNetworkPortMirroring getPortMirroringById(String id); + + /** + * Get a WorkloadNetworkPortMirroring. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. + */ + Response getPortMirroringByIdWithResponse(String id, Context context); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + WorkloadNetworkVMGroup getVMGroupById(String id); + + /** + * Get a WorkloadNetworkVMGroup. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkVMGroup along with {@link Response}. + */ + Response getVMGroupByIdWithResponse(String id, Context context); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + WorkloadNetworkDnsService getDnsServiceById(String id); + + /** + * Get a WorkloadNetworkDnsService. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsService along with {@link Response}. + */ + Response getDnsServiceByIdWithResponse(String id, Context context); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + WorkloadNetworkDnsZone getDnsZoneById(String id); + + /** + * Get a WorkloadNetworkDnsZone. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDnsZone along with {@link Response}. + */ + Response getDnsZoneByIdWithResponse(String id, Context context); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + WorkloadNetworkPublicIp getPublicIPById(String id); + + /** + * Get a WorkloadNetworkPublicIP. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkPublicIP along with {@link Response}. + */ + Response getPublicIPByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSegmentById(String id); + + /** + * Delete a WorkloadNetworkSegment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSegmentByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDhcpById(String id); + + /** + * Delete a WorkloadNetworkDhcp. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDhcpByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new WorkloadNetworkSegment resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkSegment definition. + */ + WorkloadNetworkSegment.DefinitionStages.Blank defineSegment(String name); + + /** + * Begins definition for a new WorkloadNetworkDhcp resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkDhcp definition. + */ + WorkloadNetworkDhcp.DefinitionStages.Blank defineDhcp(String name); + + /** + * Begins definition for a new WorkloadNetworkPortMirroring resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkPortMirroring definition. + */ + WorkloadNetworkPortMirroring.DefinitionStages.Blank definePortMirroring(String name); + + /** + * Begins definition for a new WorkloadNetworkVMGroup resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkVMGroup definition. + */ + WorkloadNetworkVMGroup.DefinitionStages.Blank defineVMGroup(String name); + + /** + * Begins definition for a new WorkloadNetworkDnsService resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkDnsService definition. + */ + WorkloadNetworkDnsService.DefinitionStages.Blank defineDnsService(String name); + + /** + * Begins definition for a new WorkloadNetworkDnsZone resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkDnsZone definition. + */ + WorkloadNetworkDnsZone.DefinitionStages.Blank defineDnsZone(String name); + + /** + * Begins definition for a new WorkloadNetworkPublicIp resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkPublicIp definition. + */ + WorkloadNetworkPublicIp.DefinitionStages.Blank definePublicIP(String name); } 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 50af898538106..d4371adb13726 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.WorkloadNetworkDhcpConfigurationsClientImpl$WorkloadNetworkDhcpConfigurationsService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkDnsServicesClientImpl$WorkloadNetworkDnsServicesService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkDnsZonesClientImpl$WorkloadNetworkDnsZonesService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkGatewaysClientImpl$WorkloadNetworkGatewaysService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkPortMirroringProfilesClientImpl$WorkloadNetworkPortMirroringProfilesService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkPublicIpsClientImpl$WorkloadNetworkPublicIpsService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkSegmentsClientImpl$WorkloadNetworkSegmentsService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkVirtualMachinesClientImpl$WorkloadNetworkVirtualMachinesService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworkVmGroupsClientImpl$WorkloadNetworkVmGroupsService" ], [ "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.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.ScriptPackagesClientImpl$ScriptPackagesService" ], [ "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/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 deleted file mode 100644 index c859a728e850c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.resourcemanager.avs.models.AddonArcProperties; - -/** - * Samples for Addons CreateOrUpdate. - */ -public final class AddonsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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(); - } -} 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 deleted file mode 100644 index b63c1d7f322ca..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Addons Delete. - */ -public final class AddonsDeleteSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Delete.json - */ - /** - * Sample code: Addons_Delete. - * - * @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); - } -} 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 deleted file mode 100644 index d3b46acc022c6..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Addons Get. - */ -public final class AddonsGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Get_ArcReg.json - */ - /** - * Sample code: Addons_Get_ArcReg. - * - * @param manager Entry point to AvsManager. - */ - public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { - manager.addons().getWithResponse("group1", "cloud1", "arc", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index a553d0a24d38e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Addons List. - */ -public final class AddonsListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_List.json - */ - /** - * Sample code: Addons_List. - * - * @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); - } -} 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 deleted file mode 100644 index 47cc84eb230cb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Authorizations CreateOrUpdate. - */ -public final class AuthorizationsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_CreateOrUpdate.json - */ - /** - * Sample code: Authorizations_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void authorizationsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.authorizations().define("authorization1").withExistingPrivateCloud("group1", "cloud1").create(); - } -} 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 deleted file mode 100644 index 9ef256db374c2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Authorizations Delete. - */ -public final class AuthorizationsDeleteSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_Delete.json - */ - /** - * Sample code: Authorizations_Delete. - * - * @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); - } -} 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 deleted file mode 100644 index 1df19a8b67764..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Authorizations Get. - */ -public final class AuthorizationsGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} 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 deleted file mode 100644 index 5f784198d6c02..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Authorizations List. - */ -public final class AuthorizationsListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_List.json - */ - /** - * Sample code: Authorizations_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); - } -} 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 deleted file mode 100644 index 0b863b3e831bf..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for CloudLinks CreateOrUpdate. - */ -public final class CloudLinksCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_CreateOrUpdate.json - */ - /** - * Sample code: CloudLinks_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void cloudLinksCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.cloudLinks() - .define("cloudLink1") - .withExistingPrivateCloud("group1", "cloud1") - .withLinkedCloud( - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2") - .create(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java deleted file mode 100644 index b7bb30199007d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for CloudLinks Delete. - */ -public final class CloudLinksDeleteSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Delete.json - */ - /** - * Sample code: CloudLinks_Delete. - * - * @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); - } -} 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 deleted file mode 100644 index 9034f188e6a45..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for CloudLinks Get. - */ -public final class CloudLinksGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Get.json - */ - /** - * Sample code: CloudLinks_Get. - * - * @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); - } -} 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 deleted file mode 100644 index 386347cbbb0af..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for CloudLinks List. - */ -public final class CloudLinksListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} 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 deleted file mode 100644 index 9fc41ed6e5219..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.resourcemanager.avs.models.Sku; - -/** - * Samples for Clusters CreateOrUpdate. - */ -public final class ClustersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_CreateOrUpdate.json - */ - /** - * Sample code: Clusters_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void clustersCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.clusters() - .define("cluster1") - .withExistingPrivateCloud("group1", "cloud1") - .withSku(new Sku().withName("AV20")) - .withClusterSize(3) - .create(); - } -} 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 deleted file mode 100644 index 78e982a65841e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Clusters Delete. - */ -public final class ClustersDeleteSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Delete.json - */ - /** - * Sample code: Clusters_Delete. - * - * @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); - } -} 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 deleted file mode 100644 index 0e20645b0e5c4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Clusters Get. - */ -public final class ClustersGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Get.json - */ - /** - * Sample code: Clusters_Get. - * - * @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); - } -} 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 deleted file mode 100644 index 12dd55afb08c0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Clusters List. - */ -public final class ClustersListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_List.json - */ - /** - * Sample code: Clusters_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); - } -} 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 deleted file mode 100644 index 4d23f537a684a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Clusters ListZones. - */ -public final class ClustersListZonesSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_ListZones.json - */ - /** - * Sample code: Clusters_ListZones. - * - * @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); - } -} 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 deleted file mode 100644 index ab51b287c3a9c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.resourcemanager.avs.models.Cluster; - -/** - * Samples for Clusters Update. - */ -public final class ClustersUpdateSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Update.json - */ - /** - * Sample code: Clusters_Update. - * - * @param manager Entry point to AvsManager. - */ - public static void clustersUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - Cluster resource = manager.clusters() - .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withClusterSize(4).apply(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java deleted file mode 100644 index ef1a2be5e9247..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.resourcemanager.avs.models.NetAppVolume; - -/** - * Samples for Datastores CreateOrUpdate. - */ -public final class DatastoresCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_CreateOrUpdate.json - */ - /** - * Sample code: Datastores_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void datastoresCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.datastores() - .define("datastore1") - .withExistingCluster("group1", "cloud1", "cluster1") - .withNetAppVolume(new NetAppVolume().withId( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1")) - .create(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java deleted file mode 100644 index b45dad3ae403a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Datastores Delete. - */ -public final class DatastoresDeleteSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Delete.json - */ - /** - * Sample code: Datastores_Delete. - * - * @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); - } -} 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 deleted file mode 100644 index 2c5247f2f96c3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Datastores Get. - */ -public final class DatastoresGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Get.json - */ - /** - * Sample code: Datastores_Get. - * - * @param manager Entry point to AvsManager. - */ - public static void datastoresGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.datastores() - .getWithResponse("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 58045a6f322fd..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Datastores List. - */ -public final class DatastoresListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_List.json - */ - /** - * Sample code: Datastores_List. - * - * @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); - } -} 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 deleted file mode 100644 index 5aecbd81a48c4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for GlobalReachConnections CreateOrUpdate. - */ -public final class GlobalReachConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_CreateOrUpdate.json - */ - /** - * Sample code: GlobalReachConnections_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void globalReachConnectionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.globalReachConnections() - .define("connection1") - .withExistingPrivateCloud("group1", "cloud1") - .withAuthorizationKey("01010101-0101-0101-0101-010101010101") - .withPeerExpressRouteCircuit( - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer") - .create(); - } -} 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 deleted file mode 100644 index 06f1615a7ee29..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for GlobalReachConnections Delete. - */ -public final class GlobalReachConnectionsDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} 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 deleted file mode 100644 index b1f7b81354758..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for GlobalReachConnections Get. - */ -public final class GlobalReachConnectionsGetSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_Get.json - */ - /** - * Sample code: GlobalReachConnections_Get. - * - * @param manager Entry point to AvsManager. - */ - public static void globalReachConnectionsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.globalReachConnections() - .getWithResponse("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 5f0e4f082a6df..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for GlobalReachConnections List. - */ -public final class GlobalReachConnectionsListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_List.json - */ - /** - * Sample code: GlobalReachConnections_List. - * - * @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); - } -} 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 deleted file mode 100644 index a849f8bcecd47..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for HcxEnterpriseSites CreateOrUpdate. - */ -public final class HcxEnterpriseSitesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json - */ - /** - * Sample code: HcxEnterpriseSites_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void hcxEnterpriseSitesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.hcxEnterpriseSites().define("site1").withExistingPrivateCloud("group1", "cloud1").create(); - } -} 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 deleted file mode 100644 index 2b06e2096f613..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for HcxEnterpriseSites Delete. - */ -public final class HcxEnterpriseSitesDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Delete.json - */ - /** - * Sample code: HcxEnterpriseSites_Delete. - * - * @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); - } -} 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 deleted file mode 100644 index 1eddf2c336155..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for HcxEnterpriseSites Get. - */ -public final class HcxEnterpriseSitesGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Get.json - */ - /** - * Sample code: HcxEnterpriseSites_Get. - * - * @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); - } -} 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 deleted file mode 100644 index 05ca3e74c74c1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for HcxEnterpriseSites List. - */ -public final class HcxEnterpriseSitesListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_List.json - */ - /** - * Sample code: HcxEnterpriseSites_List. - * - * @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); - } -} 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 deleted file mode 100644 index 1d9cc088d027e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; - -/** - * Samples for IscsiPaths CreateOrUpdate. - */ -public final class IscsiPathsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_CreateOrUpdate.json - */ - /** - * Sample code: IscsiPaths_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void iscsiPathsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.iscsiPaths() - .createOrUpdate("group1", "cloud1", new IscsiPathInner().withNetworkBlock("192.168.0.0/24"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java deleted file mode 100644 index f708583471a04..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for IscsiPaths Delete. - */ -public final class IscsiPathsDeleteSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Delete.json - */ - /** - * Sample code: IscsiPaths_Delete. - * - * @param manager Entry point to AvsManager. - */ - public static void iscsiPathsDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.iscsiPaths().delete("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java deleted file mode 100644 index f9cd3dd1ace64..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for IscsiPaths Get. - */ -public final class IscsiPathsGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Get.json - */ - /** - * Sample code: IscsiPaths_Get. - * - * @param manager Entry point to AvsManager. - */ - public static void iscsiPathsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.iscsiPaths().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java deleted file mode 100644 index b899da4906bad..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for IscsiPaths ListByPrivateCloud. - */ -public final class IscsiPathsListByPrivateCloudSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_List.json - */ - /** - * Sample code: IscsiPaths_ListByPrivateCloud. - * - * @param manager Entry point to AvsManager. - */ - public static void iscsiPathsListByPrivateCloud(com.azure.resourcemanager.avs.AvsManager manager) { - manager.iscsiPaths().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java deleted file mode 100644 index 299af5e659fbf..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Locations CheckQuotaAvailability. - */ -public final class LocationsCheckQuotaAvailabilitySamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckQuotaAvailability.json - */ - /** - * Sample code: Locations_CheckQuotaAvailability. - * - * @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); - } -} 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 deleted file mode 100644 index e1a9a86f9cfd3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Locations CheckTrialAvailability. - */ -public final class LocationsCheckTrialAvailabilitySamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckTrialAvailability.json - */ - /** - * Sample code: Locations_CheckTrialAvailability. - * - * @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); - } -} 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 deleted file mode 100644 index b845b9ddbba5f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} 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 deleted file mode 100644 index 9938adc789f6f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -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. - */ -public final class PlacementPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_CreateOrUpdate.json - */ - /** - * Sample code: PlacementPolicies_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void placementPoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.placementPolicies() - .define("policy1") - .withExistingCluster("group1", "cloud1", "cluster1") - .withProperties(new VmHostPlacementPolicyProperties().withVmMembers(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) - .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center")) - .withAffinityType(AffinityType.ANTI_AFFINITY) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) - .create(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java deleted file mode 100644 index 0db89e1afb8de..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PlacementPolicies Delete. - */ -public final class PlacementPoliciesDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Delete.json - */ - /** - * Sample code: PlacementPolicies_Delete. - * - * @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); - } -} 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 deleted file mode 100644 index 85f3661839764..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PlacementPolicies Get. - */ -public final class PlacementPoliciesGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} 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 deleted file mode 100644 index ccb6906c45cfa..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PlacementPolicies List. - */ -public final class PlacementPoliciesListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_List.json - */ - /** - * Sample code: PlacementPolicies_List. - * - * @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); - } -} 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 deleted file mode 100644 index 2aa70ada3c2e2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -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 PlacementPolicies Update. - */ -public final class PlacementPoliciesUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Update.json - */ - /** - * Sample code: PlacementPolicies_Update. - * - * @param manager Entry point to AvsManager. - */ - public static void placementPoliciesUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PlacementPolicy resource = manager.placementPolicies() - .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withState(PlacementPolicyState.DISABLED) - .withVmMembers(Arrays.asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) - .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center")) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST) - .apply(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java deleted file mode 100644 index 594fd76b0e80e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -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 PrivateClouds CreateOrUpdate. - */ -public final class PrivateCloudsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_CreateOrUpdate.json - */ - /** - * Sample code: PrivateClouds_CreateOrUpdate. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds() - .define("cloud1") - .withRegion("eastus2") - .withExistingResourceGroup("group1") - .withSku(new Sku().withName("AV36")) - .withTags(mapOf()) - .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .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; - } -} 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 deleted file mode 100644 index e8298c35a8001..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PrivateClouds Delete. - */ -public final class PrivateCloudsDeleteSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Delete.json - */ - /** - * Sample code: PrivateClouds_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); - } -} 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 deleted file mode 100644 index 711c342163e6c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PrivateClouds GetByResourceGroup. - */ -public final class PrivateCloudsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Get.json - */ - /** - * Sample code: PrivateClouds_Get. - * - * @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); - } -} 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 deleted file mode 100644 index ce4ac12400ab2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PrivateClouds ListAdminCredentials. - */ -public final class PrivateCloudsListAdminCredentialsSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListAdminCredentials.json - */ - /** - * Sample code: PrivateClouds_ListAdminCredentials. - * - * @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); - } -} 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 deleted file mode 100644 index 79301dacaabe2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PrivateClouds ListByResourceGroup. - */ -public final class PrivateCloudsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} 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 deleted file mode 100644 index ce4eeaeff954e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PrivateClouds List. - */ -public final class PrivateCloudsListSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListInSubscription.json - */ - /** - * Sample code: PrivateClouds_ListInSubscription. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().list(com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 516dd157deb4e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PrivateClouds RotateNsxtPassword. - */ -public final class PrivateCloudsRotateNsxtPasswordSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateNsxtPassword.json - */ - /** - * Sample code: PrivateClouds_RotateNsxtPassword. - * - * @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); - } -} 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 deleted file mode 100644 index 37e9f2c2e2c49..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for PrivateClouds RotateVcenterPassword. - */ -public final class PrivateCloudsRotateVcenterPasswordSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateVcenterPassword.json - */ - /** - * Sample code: PrivateClouds_RotateVcenterPassword. - * - * @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); - } -} 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 deleted file mode 100644 index bea03c9e87d4d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -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. - */ -public final class PrivateCloudsUpdateSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Update.json - */ - /** - * Sample code: PrivateClouds_Update. - * - * @param manager Entry point to AvsManager. - */ - public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = manager.privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.NONE)) - .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) - .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") - .withKeyVersion("fakeTokenPlaceholder") - .withKeyVaultUrl("fakeTokenPlaceholder"))) - .apply(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java deleted file mode 100644 index aa56cd829f728..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for ScriptCmdlets Get. - */ -public final class ScriptCmdletsGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptCmdlets_Get.json - */ - /** - * Sample code: ScriptCmdlets_Get. - * - * @param manager Entry point to AvsManager. - */ - public static void scriptCmdletsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptCmdlets() - .getWithResponse("group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", - com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index e1766cd9f2fe0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for ScriptCmdlets List. - */ -public final class ScriptCmdletsListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} 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 deleted file mode 100644 index 5c50d779a52fb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -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/Microsoft.AVS.Management/examples/2023-09-01/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(); - } -} 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 deleted file mode 100644 index c590bfe9df601..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for ScriptExecutions Delete. - */ -public final class ScriptExecutionsDeleteSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_Delete.json - */ - /** - * Sample code: ScriptExecutions_Delete. - * - * @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); - } -} 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 deleted file mode 100644 index 603de6272b4a0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -import java.util.Arrays; - -/** - * Samples for ScriptExecutions GetExecutionLogs. - */ -public final class ScriptExecutionsGetExecutionLogsSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_GetExecutionLogs.json - */ - /** - * Sample code: ScriptExecutions_GetExecutionLogs. - * - * @param manager Entry point to AvsManager. - */ - public static void scriptExecutionsGetExecutionLogs(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptExecutions() - .getExecutionLogsWithResponse("group1", "cloud1", "addSsoServer", - Arrays.asList(ScriptOutputStreamType.INFORMATION, ScriptOutputStreamType.fromString("Warnings"), - ScriptOutputStreamType.fromString("Errors"), ScriptOutputStreamType.OUTPUT), - com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index bf38624b65e48..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for ScriptExecutions Get. - */ -public final class ScriptExecutionsGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); - } -} 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 deleted file mode 100644 index 5a1d7a66607cd..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for ScriptExecutions List. - */ -public final class ScriptExecutionsListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_List.json - */ - /** - * Sample code: ScriptExecutions_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); - } -} 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 deleted file mode 100644 index 98629fafecf0e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for ScriptPackages Get. - */ -public final class ScriptPackagesGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_Get.json - */ - /** - * Sample code: ScriptPackages_Get. - * - * @param manager Entry point to AvsManager. - */ - public static void scriptPackagesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptPackages() - .getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index d49cb339e8f2a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for ScriptPackages List. - */ -public final class ScriptPackagesListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_List.json - */ - /** - * Sample code: ScriptPackages_List. - * - * @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); - } -} 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 deleted file mode 100644 index 784edb01eafcc..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for VirtualMachines Get. - */ -public final class VirtualMachinesGetSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_Get.json - */ - /** - * Sample code: VirtualMachines_Get. - * - * @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); - } -} 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 deleted file mode 100644 index 0a83950edafc7..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -/** - * Samples for VirtualMachines List. - */ -public final class VirtualMachinesListSamples { - /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_List.json - */ - /** - * Sample code: VirtualMachines_List. - * - * @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); - } -} 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 deleted file mode 100644 index 60447a8fe5dfd..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; -import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; - -/** - * Samples for VirtualMachines RestrictMovement. - */ -public final class VirtualMachinesRestrictMovementSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_RestrictMovement.json - */ - /** - * Sample code: VirtualMachines_RestrictMovement. - * - * @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); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java deleted file mode 100644 index 57b1d443f724b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; - -/** - * Samples for WorkloadNetworkDhcpConfigurations Update. - */ -public final class WorkloadNetworkDhcpConfigurationsUpdateSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDhcp.json - */ - /** - * Sample code: WorkloadNetworks_UpdateDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDhcp resource = manager.workloadNetworkDhcpConfigurations() - .getWithResponse("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(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java similarity index 77% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java index b45799974c134..2af63145f1c56 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java @@ -7,9 +7,9 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; /** - * Samples for WorkloadNetworkDhcpConfigurations Create. + * Samples for WorkloadNetworks CreateDhcp. */ -public final class WorkloadNetworkDhcpConfigurationsCreateSamples { +public final class WorkloadNetworksCreateDhcpSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDhcp.json @@ -20,9 +20,9 @@ public final class WorkloadNetworkDhcpConfigurationsCreateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDhcpConfigurations() - .define("dhcp1") - .withExistingPrivateCloud("group1", "cloud1") + manager.workloadNetworks() + .defineDhcp("dhcp1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") .withRevision(1L) .withServerAddress("40.1.5.1/24") diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java similarity index 79% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java index 610afad10ff9e..039e3bf951726 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java @@ -8,9 +8,9 @@ import java.util.Arrays; /** - * Samples for WorkloadNetworkDnsServices Create. + * Samples for WorkloadNetworks CreateDnsService. */ -public final class WorkloadNetworkDnsServicesCreateSamples { +public final class WorkloadNetworksCreateDnsServiceSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsService.json @@ -21,9 +21,9 @@ public final class WorkloadNetworkDnsServicesCreateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsServices() - .define("dnsService1") - .withExistingPrivateCloud("group1", "cloud1") + manager.workloadNetworks() + .defineDnsService("dnsService1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("dnsService1") .withDnsServiceIp("5.5.5.5") .withDefaultDnsZone("defaultDnsZone1") diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java similarity index 77% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java index 75c74a3aa5b5e..61c8eec0e76c7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java @@ -7,9 +7,9 @@ import java.util.Arrays; /** - * Samples for WorkloadNetworkDnsZones Create. + * Samples for WorkloadNetworks CreateDnsZone. */ -public final class WorkloadNetworkDnsZonesCreateSamples { +public final class WorkloadNetworksCreateDnsZoneSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsZone.json @@ -20,9 +20,9 @@ public final class WorkloadNetworkDnsZonesCreateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsZones() - .define("dnsZone1") - .withExistingPrivateCloud("group1", "cloud1") + manager.workloadNetworks() + .defineDnsZone("dnsZone1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("dnsZone1") .withDomain(Arrays.asList()) .withDnsServerIps(Arrays.asList("1.1.1.1")) diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java similarity index 76% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java index 6b0c71a02551e..6713e2bb7b07d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java @@ -7,9 +7,9 @@ import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; /** - * Samples for WorkloadNetworkPortMirroringProfiles Create. + * Samples for WorkloadNetworks CreatePortMirroring. */ -public final class WorkloadNetworkPortMirroringProfilesCreateSamples { +public final class WorkloadNetworksCreatePortMirroringSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePortMirroring.json @@ -20,9 +20,9 @@ public final class WorkloadNetworkPortMirroringProfilesCreateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPortMirroringProfiles() - .define("portMirroring1") - .withExistingPrivateCloud("group1", "cloud1") + manager.workloadNetworks() + .definePortMirroring("portMirroring1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("portMirroring1") .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) .withSource("vmGroup1") diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIPSamples.java similarity index 74% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIPSamples.java index 8c6000d4b7e43..da74d012f6b37 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIPSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkPublicIps Create. + * Samples for WorkloadNetworks CreatePublicIP. */ -public final class WorkloadNetworkPublicIpsCreateSamples { +public final class WorkloadNetworksCreatePublicIPSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePublicIP.json @@ -18,9 +18,9 @@ public final class WorkloadNetworkPublicIpsCreateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPublicIps() - .define("publicIP1") - .withExistingPrivateCloud("group1", "cloud1") + manager.workloadNetworks() + .definePublicIP("publicIP1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("publicIP1") .withNumberOfPublicIPs(32L) .create(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java similarity index 80% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java index af1eb3aca19f6..5f3c5f1544e6f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java @@ -8,9 +8,9 @@ import java.util.Arrays; /** - * Samples for WorkloadNetworkSegments Create. + * Samples for WorkloadNetworks CreateSegment. */ -public final class WorkloadNetworkSegmentsCreateSamples { +public final class WorkloadNetworksCreateSegmentSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateSegments.json @@ -21,9 +21,9 @@ public final class WorkloadNetworkSegmentsCreateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkSegments() - .define("segment1") - .withExistingPrivateCloud("group1", "cloud1") + manager.workloadNetworks() + .defineSegment("segment1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("segment1") .withConnectedGateway("/infra/tier-1s/gateway") .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java similarity index 69% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java index 0dbb1ba4a960f..fb88b1d1afe59 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkVmGroups Create. + * Samples for WorkloadNetworks CreateVMGroup. */ -public final class WorkloadNetworkVmGroupsCreateSamples { +public final class WorkloadNetworksCreateVMGroupSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateVMGroup.json @@ -18,6 +18,9 @@ public final class WorkloadNetworkVmGroupsCreateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVmGroups().define("vmGroup1").withExistingPrivateCloud("group1", "cloud1").create(); + manager.workloadNetworks() + .defineVMGroup("vmGroup1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java similarity index 69% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java index fee9efceca2b4..5553da7d7fd1e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkDhcpConfigurations Delete. + * Samples for WorkloadNetworks DeleteDhcp. */ -public final class WorkloadNetworkDhcpConfigurationsDeleteSamples { +public final class WorkloadNetworksDeleteDhcpSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDhcp.json @@ -18,7 +18,6 @@ public final class WorkloadNetworkDhcpConfigurationsDeleteSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDhcpConfigurations() - .delete("group1", "cloud1", "dhcp1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDhcp("group1", "cloud1", null, "dhcp1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java similarity index 71% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java index d4201c9f69519..46045808df2cc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkDnsServices Delete. + * Samples for WorkloadNetworks DeleteDnsService. */ -public final class WorkloadNetworkDnsServicesDeleteSamples { +public final class WorkloadNetworksDeleteDnsServiceSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsService.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkDnsServicesDeleteSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsServices() - .delete("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deleteDnsService("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java similarity index 79% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java index 64e69bd925c52..7dd438a13588a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkDnsZones Delete. + * Samples for WorkloadNetworks DeleteDnsZone. */ -public final class WorkloadNetworkDnsZonesDeleteSamples { +public final class WorkloadNetworksDeleteDnsZoneSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsZone.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkDnsZonesDeleteSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsZones().delete("group1", "dnsZone1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDnsZone("group1", "dnsZone1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java similarity index 69% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java index e9d96661635b5..004215f222580 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkPortMirroringProfiles Delete. + * Samples for WorkloadNetworks DeletePortMirroring. */ -public final class WorkloadNetworkPortMirroringProfilesDeleteSamples { +public final class WorkloadNetworksDeletePortMirroringSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePortMirroring.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkPortMirroringProfilesDeleteSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPortMirroringProfiles() - .delete("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deletePortMirroring("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIPSamples.java similarity index 79% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIPSamples.java index 11e268d0e8206..3d99b8cfec69e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIPSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkPublicIps Delete. + * Samples for WorkloadNetworks DeletePublicIP. */ -public final class WorkloadNetworkPublicIpsDeleteSamples { +public final class WorkloadNetworksDeletePublicIPSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePublicIP.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkPublicIpsDeleteSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeletePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPublicIps().delete("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deletePublicIP("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java similarity index 70% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java index 2870978dc3b7f..7106a8fddc881 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkSegments DeleteSegment. + * Samples for WorkloadNetworks DeleteSegment. */ -public final class WorkloadNetworkSegmentsDeleteSegmentSamples { +public final class WorkloadNetworksDeleteSegmentSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteSegment.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkSegmentsDeleteSegmentSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkSegments() - .deleteSegment("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deleteSegment("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java similarity index 79% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java index 15683d4d37780..b37fb6c3591a7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkVmGroups Delete. + * Samples for WorkloadNetworks DeleteVMGroup. */ -public final class WorkloadNetworkVmGroupsDeleteSamples { +public final class WorkloadNetworksDeleteVMGroupSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteVMGroup.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkVmGroupsDeleteSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVmGroups().delete("group1", "vmGroup1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteVMGroup("group1", "vmGroup1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java similarity index 68% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java index 5fdaa5f9547f6..71d91ef04f5af 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkDhcpConfigurations Get. + * Samples for WorkloadNetworks GetDhcp. */ -public final class WorkloadNetworkDhcpConfigurationsGetSamples { +public final class WorkloadNetworksGetDhcpSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDhcp.json @@ -18,7 +18,6 @@ public final class WorkloadNetworkDhcpConfigurationsGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDhcpConfigurations() - .getWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java similarity index 70% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java index 8b689190dd6d5..7282bd96a4288 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkDnsServices Get. + * Samples for WorkloadNetworks GetDnsService. */ -public final class WorkloadNetworkDnsServicesGetSamples { +public final class WorkloadNetworksGetDnsServiceSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsService.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkDnsServicesGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsServices() - .getWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java similarity index 71% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java index b1deb95ce9dc3..3c28c0ed357b3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkDnsZones Get. + * Samples for WorkloadNetworks GetDnsZone. */ -public final class WorkloadNetworkDnsZonesGetSamples { +public final class WorkloadNetworksGetDnsZoneSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsZone.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkDnsZonesGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsZones() - .getWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java similarity index 71% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java index 57dc11ea33ae1..0e288411efcd8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkGateways Get. + * Samples for WorkloadNetworks GetGateway. */ -public final class WorkloadNetworkGatewaysGetSamples { +public final class WorkloadNetworksGetGatewaySamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetGateway.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkGatewaysGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkGateways() - .getWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .getGatewayWithResponse("group1", "cloud1", null, "gateway1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java similarity index 68% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java index 793be8e76604c..970ff00057f66 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkPortMirroringProfiles Get. + * Samples for WorkloadNetworks GetPortMirroring. */ -public final class WorkloadNetworkPortMirroringProfilesGetSamples { +public final class WorkloadNetworksGetPortMirroringSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPortMirroring.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkPortMirroringProfilesGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPortMirroringProfiles() - .getWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPSamples.java similarity index 70% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPSamples.java index 6d7b9a2daff51..d4fc24c1ebd15 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkPublicIps Get. + * Samples for WorkloadNetworks GetPublicIP. */ -public final class WorkloadNetworkPublicIpsGetSamples { +public final class WorkloadNetworksGetPublicIPSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPublicIP.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkPublicIpsGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPublicIps() - .getWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .getPublicIPWithResponse("group1", "cloud1", null, "publicIP1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java index 330f7c14d3f16..106116b58401c 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 @@ -17,6 +17,6 @@ public final class WorkloadNetworksGetSamples { * @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); + manager.workloadNetworks().getWithResponse("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java similarity index 71% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java index 95569247bc526..3f183d9726930 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkSegments Get. + * Samples for WorkloadNetworks GetSegment. */ -public final class WorkloadNetworkSegmentsGetSamples { +public final class WorkloadNetworksGetSegmentSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetSegment.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkSegmentsGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkSegments() - .getWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java similarity index 71% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java index 5cdf0ad616d6a..54d05bb8027a8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkVmGroups Get. + * Samples for WorkloadNetworks GetVMGroup. */ -public final class WorkloadNetworkVmGroupsGetSamples { +public final class WorkloadNetworksGetVMGroupSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVMGroup.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkVmGroupsGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVmGroups() - .getWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java similarity index 70% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java index bc660163ff5f2..c9c34d31974b1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkVirtualMachines Get. + * Samples for WorkloadNetworks GetVirtualMachine. */ -public final class WorkloadNetworkVirtualMachinesGetSamples { +public final class WorkloadNetworksGetVirtualMachineSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVirtualMachine.json @@ -18,7 +18,7 @@ public final class WorkloadNetworkVirtualMachinesGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVirtualMachines() - .getWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .getVirtualMachineWithResponse("group1", "cloud1", null, "vm1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java similarity index 71% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java index b44f4909eb449..0f98aabb32a3f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkDhcpConfigurations List. + * Samples for WorkloadNetworks ListDhcp. */ -public final class WorkloadNetworkDhcpConfigurationsListSamples { +public final class WorkloadNetworksListDhcpSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDhcp.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkDhcpConfigurationsListSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDhcpConfigurations().list("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().listDhcp("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java similarity index 73% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java index 6eeed2d9bb873..eb274f9b77e5d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkDnsServices List. + * Samples for WorkloadNetworks ListDnsServices. */ -public final class WorkloadNetworkDnsServicesListSamples { +public final class WorkloadNetworksListDnsServicesSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsServices.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkDnsServicesListSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsServices().list("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().listDnsServices("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java similarity index 73% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java index 087692919d47e..4bfbf1d8ed0e5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkDnsZones List. + * Samples for WorkloadNetworks ListDnsZones. */ -public final class WorkloadNetworkDnsZonesListSamples { +public final class WorkloadNetworksListDnsZonesSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsZones.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkDnsZonesListSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkDnsZones().list("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().listDnsZones("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java similarity index 73% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java index c97cf59770c30..1c30ef32e2a78 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkGateways List. + * Samples for WorkloadNetworks ListGateways. */ -public final class WorkloadNetworkGatewaysListSamples { +public final class WorkloadNetworksListGatewaysSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListGateways.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkGatewaysListSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkGateways().list("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().listGateways("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java similarity index 71% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java index da9a441ebe4ea..5d5f43cfa013f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkPortMirroringProfiles List. + * Samples for WorkloadNetworks ListPortMirroring. */ -public final class WorkloadNetworkPortMirroringProfilesListSamples { +public final class WorkloadNetworksListPortMirroringSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPortMirroring.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkPortMirroringProfilesListSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPortMirroringProfiles().list("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().listPortMirroring("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java similarity index 73% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java index 66a06e9495721..aecad5d090f57 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkPublicIps List. + * Samples for WorkloadNetworks ListPublicIPs. */ -public final class WorkloadNetworkPublicIpsListSamples { +public final class WorkloadNetworksListPublicIPsSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPublicIPs.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkPublicIpsListSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkPublicIps().list("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().listPublicIPs("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java similarity index 73% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java index f0710d3f16534..b8e1b29a15e33 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkSegments List. + * Samples for WorkloadNetworks ListSegments. */ -public final class WorkloadNetworkSegmentsListSamples { +public final class WorkloadNetworksListSegmentsSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListSegments.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkSegmentsListSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkSegments().list("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().listSegments("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java similarity index 73% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java index fe3e9de318bd8..9a0084b4e8cdd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkVmGroups List. + * Samples for WorkloadNetworks ListVMGroups. */ -public final class WorkloadNetworkVmGroupsListSamples { +public final class WorkloadNetworksListVMGroupsSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVMGroups.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkVmGroupsListSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVmGroups().list("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().listVMGroups("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java similarity index 72% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java index 420cd7c58ab5d..06d0467a2808b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworkVirtualMachines List. + * Samples for WorkloadNetworks ListVirtualMachines. */ -public final class WorkloadNetworkVirtualMachinesListSamples { +public final class WorkloadNetworksListVirtualMachinesSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVirtualMachines.json @@ -18,6 +18,6 @@ public final class WorkloadNetworkVirtualMachinesListSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworkVirtualMachines().list("group1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().listVirtualMachines("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java similarity index 83% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesUpdateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java index 04a50dfad34d3..c2ebc87183805 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java @@ -9,9 +9,9 @@ import java.util.Arrays; /** - * Samples for WorkloadNetworkDnsServices Update. + * Samples for WorkloadNetworks UpdateDnsService. */ -public final class WorkloadNetworkDnsServicesUpdateSamples { +public final class WorkloadNetworksUpdateDnsServiceSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDnsService.json @@ -22,8 +22,8 @@ public final class WorkloadNetworkDnsServicesUpdateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDnsService resource = manager.workloadNetworkDnsServices() - .getWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE) + WorkloadNetworkDnsService resource = manager.workloadNetworks() + .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsService1") diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java similarity index 82% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesUpdateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java index c7bbbce58731b..1b55db56dcb41 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java @@ -8,9 +8,9 @@ import java.util.Arrays; /** - * Samples for WorkloadNetworkDnsZones Update. + * Samples for WorkloadNetworks UpdateDnsZone. */ -public final class WorkloadNetworkDnsZonesUpdateSamples { +public final class WorkloadNetworksUpdateDnsZoneSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDnsZone.json @@ -21,8 +21,8 @@ public final class WorkloadNetworkDnsZonesUpdateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDnsZone resource = manager.workloadNetworkDnsZones() - .getWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE) + WorkloadNetworkDnsZone resource = manager.workloadNetworks() + .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsZone1") diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java similarity index 80% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesUpdateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java index cd87c0ef96d09..fb4b28bdcfaab 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java @@ -8,9 +8,9 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; /** - * Samples for WorkloadNetworkPortMirroringProfiles Update. + * Samples for WorkloadNetworks UpdatePortMirroring. */ -public final class WorkloadNetworkPortMirroringProfilesUpdateSamples { +public final class WorkloadNetworksUpdatePortMirroringSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdatePortMirroring.json @@ -21,8 +21,8 @@ public final class WorkloadNetworkPortMirroringProfilesUpdateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkPortMirroring resource = manager.workloadNetworkPortMirroringProfiles() - .getWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) + WorkloadNetworkPortMirroring resource = manager.workloadNetworks() + .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java similarity index 78% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsUpdateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java index 38f620d108f2e..a0c9ac73d64d8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java @@ -7,9 +7,9 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; /** - * Samples for WorkloadNetworkSegments Update. + * Samples for WorkloadNetworks UpdateSegment. */ -public final class WorkloadNetworkSegmentsUpdateSamples { +public final class WorkloadNetworksUpdateSegmentSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateSegments.json @@ -20,8 +20,8 @@ public final class WorkloadNetworkSegmentsUpdateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkSegment resource = manager.workloadNetworkSegments() - .getWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) + WorkloadNetworkSegment resource = manager.workloadNetworks() + .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java similarity index 80% rename from sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsUpdateSamples.java rename to sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java index dca9033fc8513..1c41d67c723f8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java @@ -8,9 +8,9 @@ import java.util.Arrays; /** - * Samples for WorkloadNetworkVmGroups Update. + * Samples for WorkloadNetworks UpdateVMGroup. */ -public final class WorkloadNetworkVmGroupsUpdateSamples { +public final class WorkloadNetworksUpdateVMGroupSamples { /* * x-ms-original-file: * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateVMGroup.json @@ -21,8 +21,8 @@ public final class WorkloadNetworkVmGroupsUpdateSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkVMGroup resource = manager.workloadNetworkVmGroups() - .getWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) + WorkloadNetworkVMGroup resource = manager.workloadNetworks() + .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java index fc9ad39c0d99a..6f83330019136 100644 --- 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 @@ -12,15 +12,15 @@ public final class AddonArcPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonArcProperties model - = BinaryData.fromString("{\"addonType\":\"Arc\",\"vCenter\":\"sz\",\"provisioningState\":\"Succeeded\"}") + = BinaryData.fromString("{\"addonType\":\"Arc\",\"vCenter\":\"hxw\",\"provisioningState\":\"Succeeded\"}") .toObject(AddonArcProperties.class); - Assertions.assertEquals("sz", model.vCenter()); + Assertions.assertEquals("hxw", model.vCenter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonArcProperties model = new AddonArcProperties().withVCenter("sz"); + AddonArcProperties model = new AddonArcProperties().withVCenter("hxw"); model = BinaryData.fromObject(model).toObject(AddonArcProperties.class); - Assertions.assertEquals("sz", model.vCenter()); + Assertions.assertEquals("hxw", 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 index 9dab1f86e4f5c..b5ec19a965364 100644 --- 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 @@ -12,15 +12,15 @@ public final class AddonHcxPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonHcxProperties model - = BinaryData.fromString("{\"addonType\":\"HCX\",\"offer\":\"jervtia\",\"provisioningState\":\"Failed\"}") + = BinaryData.fromString("{\"addonType\":\"HCX\",\"offer\":\"bzpfzab\",\"provisioningState\":\"Failed\"}") .toObject(AddonHcxProperties.class); - Assertions.assertEquals("jervtia", model.offer()); + Assertions.assertEquals("bzpfzab", model.offer()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonHcxProperties model = new AddonHcxProperties().withOffer("jervtia"); + AddonHcxProperties model = new AddonHcxProperties().withOffer("bzpfzab"); model = BinaryData.fromObject(model).toObject(AddonHcxProperties.class); - Assertions.assertEquals("jervtia", model.offer()); + Assertions.assertEquals("bzpfzab", 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 index e01043bc81917..e2eecf1a228ef 100644 --- 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 @@ -12,7 +12,7 @@ public final class AddonInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonInner model = BinaryData.fromString( - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"rodtjinfwjlfl\",\"name\":\"kacjvefkdlfo\",\"type\":\"kggkfpa\"}") + "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"jancu\",\"name\":\"rhdwbavxbniw\",\"type\":\"jswztsdbpg\"}") .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 index 532901e961325..fc8929eac5850 100644 --- 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 @@ -12,8 +12,8 @@ public final class AddonListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Cancelled\"},\"id\":\"kqb\",\"name\":\"qu\",\"type\":\"paxh\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"ivpdtiir\",\"name\":\"tdqoaxoruzfgsq\",\"type\":\"yfxrx\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"ramxjezwlwnw\",\"name\":\"uqlcvydy\",\"type\":\"atdooaojkniod\"}],\"nextLink\":\"oebwnujhemms\"}") + "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"ankxmyskpbhenb\",\"name\":\"kcxywnyt\",\"type\":\"rsyn\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"by\",\"name\":\"czfc\",\"type\":\"haaxdbabphl\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Cancelled\"},\"id\":\"ktsthsucocmny\",\"name\":\"azt\",\"type\":\"bt\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"uedck\",\"name\":\"ywbiexzfeyueax\",\"type\":\"bxu\"}],\"nextLink\":\"bhqwalmuzyoxa\"}") .toObject(AddonList.class); - Assertions.assertEquals("oebwnujhemms", model.nextLink()); + Assertions.assertEquals("bhqwalmuzyoxa", 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 index 984df8afb9dad..b74cc70828d46 100644 --- 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 @@ -11,7 +11,7 @@ public final class AddonPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonProperties model - = BinaryData.fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"}") + = BinaryData.fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Building\"}") .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 index a83ae07bf20bf..6029f4e9f425a 100644 --- 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 @@ -11,16 +11,16 @@ public final class AddonVrPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AddonVrProperties model - = BinaryData.fromString("{\"addonType\":\"VR\",\"vrsCount\":1554130145,\"provisioningState\":\"Deleting\"}") - .toObject(AddonVrProperties.class); - Assertions.assertEquals(1554130145, model.vrsCount()); + AddonVrProperties model = BinaryData + .fromString("{\"addonType\":\"VR\",\"vrsCount\":1275335894,\"provisioningState\":\"Succeeded\"}") + .toObject(AddonVrProperties.class); + Assertions.assertEquals(1275335894, model.vrsCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonVrProperties model = new AddonVrProperties().withVrsCount(1554130145); + AddonVrProperties model = new AddonVrProperties().withVrsCount(1275335894); model = BinaryData.fromObject(model).toObject(AddonVrProperties.class); - Assertions.assertEquals(1554130145, model.vrsCount()); + Assertions.assertEquals(1275335894, 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 0bc0db4065a9a..0000000000000 --- 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) TypeSpec 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\":\"vxwlmzqwmvtxnj\",\"name\":\"xmcuqud\",\"type\":\"cvclxynpdk\"}"; - - 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("mmkjsvthnwpztek") - .withExistingPrivateCloud("vsg", "wohqfzizvu") - .withProperties(new AddonProperties()) - .create(); - - } -} 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 5543bcc2d8e52..0000000000000 --- 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) TypeSpec 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\":\"Updating\"},\"id\":\"lxxhljfp\",\"name\":\"picrmnzhrgmqgjsx\",\"type\":\"pqcbfrmbodthsq\"}"; - - 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("qpswokmvkhlggdhb", "mzqkz", "zu", 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 896c927799892..0000000000000 --- 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) TypeSpec 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\":\"Deleting\"},\"id\":\"haowj\",\"name\":\"mzvupor\",\"type\":\"zdfuydzvkfvxcnqm\"}]}"; - - 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("knidib", "qjxgpnrhgovfgp", com.azure.core.util.Context.NONE); - - } -} 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 index db8cd6890a4e4..07b525e0f8c0d 100644 --- 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 @@ -12,15 +12,15 @@ public final class CloudLinkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Deleting\",\"linkedCloud\":\"vayffimrzrt\"},\"id\":\"qogsexnevfd\",\"name\":\"wnwmewzs\",\"type\":\"yceuzsoib\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Deleting\",\"linkedCloud\":\"rgvtqag\"},\"id\":\"uynhijg\",\"name\":\"mebf\",\"type\":\"iarbutrcvpna\"}") .toObject(CloudLinkInner.class); - Assertions.assertEquals("vayffimrzrt", model.linkedCloud()); + Assertions.assertEquals("rgvtqag", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkInner model = new CloudLinkInner().withLinkedCloud("vayffimrzrt"); + CloudLinkInner model = new CloudLinkInner().withLinkedCloud("rgvtqag"); model = BinaryData.fromObject(model).toObject(CloudLinkInner.class); - Assertions.assertEquals("vayffimrzrt", model.linkedCloud()); + Assertions.assertEquals("rgvtqag", 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 index 959612d1c009c..55d540f1fdff7 100644 --- 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 @@ -12,9 +12,9 @@ public final class CloudLinkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Failed\",\"linkedCloud\":\"tcs\"},\"id\":\"cktqumiekkezzi\",\"name\":\"hlyfjhdgqgg\",\"type\":\"bdunygaeqid\"},{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Disconnected\",\"linkedCloud\":\"llrxcyjmoad\"},\"id\":\"varmywdmj\",\"name\":\"jqbjhhy\",\"type\":\"xrwlyc\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Disconnected\",\"linkedCloud\":\"kgymareqnajxqug\"},\"id\":\"ky\",\"name\":\"ubeddg\",\"type\":\"sofwqmzqalkrmnji\"}],\"nextLink\":\"xacqqudfnbyx\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Active\",\"linkedCloud\":\"mpvecxgodebfqk\"},\"id\":\"bmpukgriwflz\",\"name\":\"fbxzpuzycisp\",\"type\":\"qzahmgkbrp\"}],\"nextLink\":\"dhibnuq\"}") .toObject(CloudLinkList.class); - Assertions.assertEquals("tcs", model.value().get(0).linkedCloud()); - Assertions.assertEquals("xacqqudfnbyx", model.nextLink()); + Assertions.assertEquals("mpvecxgodebfqk", model.value().get(0).linkedCloud()); + Assertions.assertEquals("dhibnuq", 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 index b4f81c7d08f86..85e2b65b0da1c 100644 --- 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 @@ -12,15 +12,15 @@ public final class CloudLinkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkProperties model = BinaryData - .fromString("{\"provisioningState\":\"Succeeded\",\"status\":\"Disconnected\",\"linkedCloud\":\"xtrthz\"}") + .fromString("{\"provisioningState\":\"Failed\",\"status\":\"Deleting\",\"linkedCloud\":\"unmpxttd\"}") .toObject(CloudLinkProperties.class); - Assertions.assertEquals("xtrthz", model.linkedCloud()); + Assertions.assertEquals("unmpxttd", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("xtrthz"); + CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("unmpxttd"); model = BinaryData.fromObject(model).toObject(CloudLinkProperties.class); - Assertions.assertEquals("xtrthz", model.linkedCloud()); + Assertions.assertEquals("unmpxttd", 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 c0509fc703856..0000000000000 --- 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) TypeSpec 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\":\"Deleting\",\"linkedCloud\":\"lxpaglqivbgkcv\"},\"id\":\"pzvuqdflvo\",\"name\":\"iypfp\",\"type\":\"bcpzgpxtivh\"}"; - - 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("ygjbmzyospspsh") - .withExistingPrivateCloud("quhuxylrj", "m") - .withLinkedCloud("mspbpssdfpp") - .create(); - - Assertions.assertEquals("lxpaglqivbgkcv", response.linkedCloud()); - } -} 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 1a1436d00064d..0000000000000 --- 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) TypeSpec 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\":\"Canceled\",\"status\":\"Deleting\",\"linkedCloud\":\"t\"},\"id\":\"auunfprnjletlx\",\"name\":\"mr\",\"type\":\"ddoui\"}"; - - 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("quvre", "mrnjh", "sujz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("t", 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 1eabf866c6314..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":\"Failed\",\"linkedCloud\":\"pxbiygnugjknfs\"},\"id\":\"cttuxuu\",\"name\":\"i\",\"type\":\"flqo\"}]}"; - - 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("rgxffmshkw", "bkgozxwopdbydpi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pxbiygnugjknfs", response.iterator().next().linkedCloud()); - } -} 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 4adc81db767ca..0000000000000 --- 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) TypeSpec 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\":687861741,\"provisioningState\":\"Succeeded\",\"clusterId\":1053518025,\"hosts\":[\"vluwmncsttij\",\"y\",\"vpo\"],\"vsanDatastoreName\":\"rsg\"},\"sku\":{\"name\":\"gbdhuzqgnjdg\",\"tier\":\"Premium\",\"size\":\"cli\",\"family\":\"zvhxnk\",\"capacity\":144563900},\"id\":\"u\",\"name\":\"otppnv\",\"type\":\"xz\"}"; - - 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("mlqtmldgxob") - .withExistingPrivateCloud("gzuriglaecxndt", "cokpv") - .withSku(new Sku().withName("fvjlboxqvkjlmx") - .withTier(SkuTier.FREE) - .withSize("ynhdwdigum") - .withFamily("raauzzpt") - .withCapacity(1518095696)) - .withClusterSize(1763053171) - .withHosts(Arrays.asList("ayzri")) - .withVsanDatastoreName("hya") - .create(); - - Assertions.assertEquals("gbdhuzqgnjdg", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("cli", response.sku().size()); - Assertions.assertEquals("zvhxnk", response.sku().family()); - Assertions.assertEquals(144563900, response.sku().capacity()); - Assertions.assertEquals(687861741, response.clusterSize()); - Assertions.assertEquals("vluwmncsttij", response.hosts().get(0)); - Assertions.assertEquals("rsg", response.vsanDatastoreName()); - } -} 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 cc8f6a8a6854b..0000000000000 --- 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) TypeSpec 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\":1933240221,\"provisioningState\":\"Failed\",\"clusterId\":1386214001,\"hosts\":[\"ulapzwyrp\",\"ogtqxepnylbf\",\"ajlyjtlvofqzhv\",\"cib\"],\"vsanDatastoreName\":\"mowuxrk\"},\"sku\":{\"name\":\"pvdwxf\",\"tier\":\"Premium\",\"size\":\"vwzjbhyz\",\"family\":\"jrkambtrnegvmnv\",\"capacity\":531370640},\"id\":\"vldspa\",\"name\":\"tjb\",\"type\":\"kdmflvestmjlx\"}"; - - 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("xkzb", "msgeivsiykzk", "ncj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("pvdwxf", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("vwzjbhyz", response.sku().size()); - Assertions.assertEquals("jrkambtrnegvmnv", response.sku().family()); - Assertions.assertEquals(531370640, response.sku().capacity()); - Assertions.assertEquals(1933240221, response.clusterSize()); - Assertions.assertEquals("ulapzwyrp", response.hosts().get(0)); - Assertions.assertEquals("mowuxrk", 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 2569bc7d8aacb..0000000000000 --- 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) TypeSpec 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\":1426712657,\"provisioningState\":\"Cancelled\",\"clusterId\":128886656,\"hosts\":[\"l\",\"chp\",\"db\"],\"vsanDatastoreName\":\"vwrdnhfukuvsj\"},\"sku\":{\"name\":\"swsmys\",\"tier\":\"Premium\",\"size\":\"qypfcv\",\"family\":\"rchpqbmfpjbabwid\",\"capacity\":1095864620},\"id\":\"spuunnoxyhkxgq\",\"name\":\"drihpfhoqcaaewda\",\"type\":\"mdjvlpj\"}]}"; - - 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("n", "ntfpmvmemfnc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("swsmys", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); - Assertions.assertEquals("qypfcv", response.iterator().next().sku().size()); - Assertions.assertEquals("rchpqbmfpjbabwid", response.iterator().next().sku().family()); - Assertions.assertEquals(1095864620, response.iterator().next().sku().capacity()); - Assertions.assertEquals(1426712657, response.iterator().next().clusterSize()); - Assertions.assertEquals("l", response.iterator().next().hosts().get(0)); - Assertions.assertEquals("vwrdnhfukuvsj", 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 3578bd3d3dea5..0000000000000 --- 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) TypeSpec 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\":[\"gl\",\"dzgkr\"],\"zone\":\"eevt\"},{\"hosts\":[\"r\"],\"zone\":\"t\"},{\"hosts\":[\"tpzdmovzvfvaawzq\"],\"zone\":\"f\"}]}"; - - 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("levufuztcktyhj", "qedcgzulwm", "rqzz", com.azure.core.util.Context.NONE) - .getValue(); - - } -} 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 143833b2880da..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":\"t\"},\"diskPoolVolume\":{\"targetId\":\"dslqxihhrmooizqs\",\"lunName\":\"ypxiutcxap\",\"mountOption\":\"MOUNT\",\"path\":\"petogebjox\"},\"elasticSanVolume\":{\"targetId\":\"hvnh\"},\"status\":\"Unknown\"},\"id\":\"q\",\"name\":\"kkzjcjbtrga\",\"type\":\"hvv\"}"; - - 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("teyowclu") - .withExistingCluster("cuplcplcwkhih", "hlhzdsqtzbsrgno", "cjhfgmvecactxmw") - .withNetAppVolume(new NetAppVolume().withId("qvgqouw")) - .withDiskPoolVolume(new DiskPoolVolume().withTargetId("zmpjwyiv") - .withLunName("ikf") - .withMountOption(MountOptionEnum.ATTACH)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("kteusqczk")) - .create(); - - Assertions.assertEquals("t", response.netAppVolume().id()); - Assertions.assertEquals("dslqxihhrmooizqs", response.diskPoolVolume().targetId()); - Assertions.assertEquals("ypxiutcxap", response.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("hvnh", 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 3be3a4c511f63..0000000000000 --- 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) TypeSpec 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("nbtgkbugrjqctoj", "mi", "of", "eypefojyqd", 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 cd551340a1ee0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":\"hycav\"},\"diskPoolVolume\":{\"targetId\":\"ggxdb\",\"lunName\":\"esmi\",\"mountOption\":\"ATTACH\",\"path\":\"ra\"},\"elasticSanVolume\":{\"targetId\":\"aawiuagydwqfb\"},\"status\":\"Detached\"},\"id\":\"fgiagtcojocqwo\",\"name\":\"fnzjvusfzldm\",\"type\":\"zuxylfsbtkadpyso\"}"; - - 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("fcjnaeoisrvhmgor", "fukiscvwmzhw", "lefaxvxilcbtgn", "nzeyqxtjj", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hycav", response.netAppVolume().id()); - Assertions.assertEquals("ggxdb", response.diskPoolVolume().targetId()); - Assertions.assertEquals("esmi", response.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("aawiuagydwqfb", 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 aedf1e64269c0..0000000000000 --- 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) TypeSpec 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\":\"Failed\",\"netAppVolume\":{\"id\":\"nysuxmprafwgckh\"},\"diskPoolVolume\":{\"targetId\":\"xvd\",\"lunName\":\"ffwafq\",\"mountOption\":\"ATTACH\",\"path\":\"aspavehhr\"},\"elasticSanVolume\":{\"targetId\":\"bunzozudh\"},\"status\":\"DeadOrError\"},\"id\":\"moy\",\"name\":\"cdyuibhmfdnbzyd\",\"type\":\"f\"}]}"; - - 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("hihfrbbcevqagtlt", "hlfkqojpy", "vgtrdcnifmzzs", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nysuxmprafwgckh", response.iterator().next().netAppVolume().id()); - Assertions.assertEquals("xvd", response.iterator().next().diskPoolVolume().targetId()); - Assertions.assertEquals("ffwafq", response.iterator().next().diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, response.iterator().next().diskPoolVolume().mountOption()); - Assertions.assertEquals("bunzozudh", response.iterator().next().elasticSanVolume().targetId()); - } -} 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 47232aba946a1..0000000000000 --- 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) TypeSpec 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("hyuemslyn", "qyrp", "oobrlttyms", 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 e6d7606867a65..0000000000000 --- 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) TypeSpec 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("j", "uktalhsnvkcdmxz", "poaimlnwiaaomyl", 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 index 563c4efc19b22..9daa226e4032b 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"networkBlock\":\"kjprvk\"},\"id\":\"fz\",\"name\":\"ljyxgtczhe\",\"type\":\"dbsdshm\"}") + "{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"gx\"},\"id\":\"rslpmutwuoeg\",\"name\":\"pkhjwni\",\"type\":\"qsluicp\"}") .toObject(IscsiPathInner.class); - Assertions.assertEquals("kjprvk", model.networkBlock()); + Assertions.assertEquals("gx", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathInner model = new IscsiPathInner().withNetworkBlock("kjprvk"); + IscsiPathInner model = new IscsiPathInner().withNetworkBlock("gx"); model = BinaryData.fromObject(model).toObject(IscsiPathInner.class); - Assertions.assertEquals("kjprvk", model.networkBlock()); + Assertions.assertEquals("gx", 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 index 489c2c71d2501..b77f07e1dd72d 100644 --- 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 @@ -12,9 +12,9 @@ public final class IscsiPathListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"mvikl\"},\"id\":\"dvk\",\"name\":\"bejdznxcv\",\"type\":\"srhnjivo\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"ovqfzge\"},\"id\":\"dftuljltduce\",\"name\":\"mtmczuome\",\"type\":\"wcw\"}],\"nextLink\":\"ioknssxmoj\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"pxebmnzbt\"},\"id\":\"jpglkfgohdne\",\"name\":\"el\",\"type\":\"phsdyhto\"},{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"dowwquuvxzxclvit\"},\"id\":\"qzonosggbhcohf\",\"name\":\"dsjnka\",\"type\":\"jutiiswacff\"},{\"properties\":{\"provisioningState\":\"Pending\",\"networkBlock\":\"zewk\"},\"id\":\"hqcrailvpnpp\",\"name\":\"uflrwd\",\"type\":\"hdlxyjrxsagafcn\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"qapnedgfbcv\"},\"id\":\"vq\",\"name\":\"pkeqdcvdrhvoo\",\"type\":\"sotbob\"}],\"nextLink\":\"opcjwvnhd\"}") .toObject(IscsiPathListResult.class); - Assertions.assertEquals("mvikl", model.value().get(0).networkBlock()); - Assertions.assertEquals("ioknssxmoj", model.nextLink()); + Assertions.assertEquals("pxebmnzbt", model.value().get(0).networkBlock()); + Assertions.assertEquals("opcjwvnhd", 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 index db8a538a1cd77..aae545736b4a7 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathProperties model - = BinaryData.fromString("{\"provisioningState\":\"Building\",\"networkBlock\":\"aehvbbxuri\"}") + = BinaryData.fromString("{\"provisioningState\":\"Building\",\"networkBlock\":\"kzzlvmbmpaxmodf\"}") .toObject(IscsiPathProperties.class); - Assertions.assertEquals("aehvbbxuri", model.networkBlock()); + Assertions.assertEquals("kzzlvmbmpaxmodf", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("aehvbbxuri"); + IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("kzzlvmbmpaxmodf"); model = BinaryData.fromObject(model).toObject(IscsiPathProperties.class); - Assertions.assertEquals("aehvbbxuri", model.networkBlock()); + Assertions.assertEquals("kzzlvmbmpaxmodf", 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 250ca71fb41f0..0000000000000 --- 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) TypeSpec 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\":\"emmucfxh\"},\"id\":\"kflrmymy\",\"name\":\"nc\",\"type\":\"lhrisw\"}"; - - 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("xzecpaxwkufykhvu", "xepmrut", new IscsiPathInner().withNetworkBlock("aobn"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("emmucfxh", 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 95ac5c5ad5e10..0000000000000 --- 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) TypeSpec 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("lmiiiovg", "cgxuugqkctotiowl", 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 5d3ed7f360b5b..0000000000000 --- 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) TypeSpec 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\":\"Failed\",\"networkBlock\":\"desqplpvmjcdo\"},\"id\":\"bidyv\",\"name\":\"eowxvgpi\",\"type\":\"deugf\"}"; - - 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("lycsxz", "jks", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("desqplpvmjcdo", 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 3e2268282038d..0000000000000 --- 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) TypeSpec 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\":\"droznn\"},\"id\":\"rlktgjcsggu\",\"name\":\"hemlwywaee\",\"type\":\"zgfbukklelssx\"}]}"; - - 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("kcoeqswank", "t", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("droznn", 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 f617dc3425cf2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":{\"vyvnqqyb\":382394727},\"quotaEnabled\":\"Enabled\"}"; - - 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("orfmluiqt", 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 313c8a65432be..0000000000000 --- 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) TypeSpec 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\":\"TrialUsed\",\"availableHosts\":1122494487}"; - - 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("dlwwqfbumlkxt", - new Sku().withName("qjfsmlmbtxhw") - .withTier(SkuTier.FREE) - .withSize("rtawcoezb") - .withFamily("ubskhudygoookkq") - .withCapacity(280222728), - com.azure.core.util.Context.NONE) - .getValue(); - - } -} 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 0df2cf6cdc7a5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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.ActionType; -import com.azure.resourcemanager.avs.models.Operation; -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 OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"tfnhtbaxkgxywr\",\"isDataAction\":true,\"display\":{\"provider\":\"lyhpluodpvruud\",\"resource\":\"zibt\",\"operation\":\"stgktst\",\"description\":\"xeclzedqbcvhzlhp\"},\"origin\":\"system\",\"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); - - Assertions.assertEquals(ActionType.INTERNAL, response.iterator().next().actionType()); - } -} 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 e63814ca3cbd9..0000000000000 --- 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) TypeSpec 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\":\"Disabled\",\"displayName\":\"wfepbnwgfmx\",\"provisioningState\":\"Succeeded\"},\"id\":\"bjb\",\"name\":\"dlfgtdysnaq\",\"type\":\"flq\"}"; - - 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("qfecjxeygtuhx") - .withExistingCluster("gepuslvyjtc", "uwkasiz", "esfuught") - .withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("ewmrswnjlxu")) - .create(); - - Assertions.assertEquals(PlacementPolicyState.DISABLED, response.properties().state()); - Assertions.assertEquals("wfepbnwgfmx", 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 9f890bc98fef9..0000000000000 --- 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) TypeSpec 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("oxovnekhenlusf", "rd", "jxtxrdc", "tjvidt", 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 522cecf083a3d..0000000000000 --- 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) TypeSpec 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\":\"muowolbauiro\",\"provisioningState\":\"Succeeded\"},\"id\":\"szonwpngajinn\",\"name\":\"xjawrt\",\"type\":\"jfjmyccxlzh\"}"; - - 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("wrpqafgfugsnnf", "yetefyp", "coc", "fjgtixrjvzuy", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); - Assertions.assertEquals("muowolbauiro", 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 a9652a7e1a615..0000000000000 --- 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) TypeSpec 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\":\"Enabled\",\"displayName\":\"kqtob\",\"provisioningState\":\"Canceled\"},\"id\":\"ofshfphwpnulaiyw\",\"name\":\"e\",\"type\":\"ywhslwkojpllndnp\"}]}"; - - 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("pubowsepdfg", "mtdherngb", "c", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PlacementPolicyState.ENABLED, response.iterator().next().properties().state()); - Assertions.assertEquals("kqtob", 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 index 812ec7103817d..3c64dba063b69 100644 --- 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 @@ -13,10 +13,10 @@ public final class PlacementPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"wyznkbyku\",\"provisioningState\":\"Deleting\"},\"id\":\"hpagm\",\"name\":\"r\",\"type\":\"kdsnfdsdoakgtdl\"}],\"nextLink\":\"kzevdlhewpusds\"}") + "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"kdeemaofmxagkvtm\",\"provisioningState\":\"Failed\"},\"id\":\"krh\",\"name\":\"hvljuahaquh\",\"type\":\"dhmdua\"}],\"nextLink\":\"exq\"}") .toObject(PlacementPoliciesList.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.value().get(0).properties().state()); - Assertions.assertEquals("wyznkbyku", model.value().get(0).properties().displayName()); - Assertions.assertEquals("kzevdlhewpusds", model.nextLink()); + Assertions.assertEquals("kdeemaofmxagkvtm", model.value().get(0).properties().displayName()); + Assertions.assertEquals("exq", 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 index b2f59ceaa089b..a73cdd2edb51e 100644 --- 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 @@ -14,18 +14,18 @@ public final class PlacementPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"gvbbejdcng\",\"provisioningState\":\"Deleting\"},\"id\":\"akufgmjz\",\"name\":\"wr\",\"type\":\"grtwae\"}") + "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"mwsrcrgvxpvgo\",\"provisioningState\":\"Updating\"},\"id\":\"misgwbnb\",\"name\":\"e\",\"type\":\"dawkzbali\"}") .toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); - Assertions.assertEquals("gvbbejdcng", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); + Assertions.assertEquals("mwsrcrgvxpvgo", model.properties().displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyInner model = new PlacementPolicyInner().withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("gvbbejdcng")); + new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("mwsrcrgvxpvgo")); model = BinaryData.fromObject(model).toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); - Assertions.assertEquals("gvbbejdcng", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); + Assertions.assertEquals("mwsrcrgvxpvgo", 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 index 2649024e7c2cb..b1d6ade40407f 100644 --- 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 @@ -13,18 +13,18 @@ public final class PlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"kopbminrf\",\"provisioningState\":\"Canceled\"}") + "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"hakauhashsf\",\"provisioningState\":\"Building\"}") .toObject(PlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("kopbminrf", model.displayName()); + Assertions.assertEquals("hakauhashsf", model.displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyProperties model - = new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("kopbminrf"); + = new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("hakauhashsf"); model = BinaryData.fromObject(model).toObject(PlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("kopbminrf", model.displayName()); + Assertions.assertEquals("hakauhashsf", 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 index 89896d66e5826..25b7682321511 100644 --- 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 @@ -16,28 +16,28 @@ public final class PlacementPolicyUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdateProperties model = BinaryData.fromString( - "{\"state\":\"Enabled\",\"vmMembers\":[\"lfeadcygq\"],\"hostMembers\":[\"hejhzisx\",\"fpel\",\"lppvksrpq\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"None\"}") + "{\"state\":\"Disabled\",\"vmMembers\":[\"lrbpbewtghfgbl\",\"gw\",\"zvlvqhjkbegib\"],\"hostMembers\":[\"xiebwwaloayqcg\",\"rtzju\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}") .toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("lfeadcygq", model.vmMembers().get(0)); - Assertions.assertEquals("hejhzisx", model.hostMembers().get(0)); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("lrbpbewtghfgbl", model.vmMembers().get(0)); + Assertions.assertEquals("xiebwwaloayqcg", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); + Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyUpdateProperties model - = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.ENABLED) - .withVmMembers(Arrays.asList("lfeadcygq")) - .withHostMembers(Arrays.asList("hejhzisx", "fpel", "lppvksrpq")) + = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.DISABLED) + .withVmMembers(Arrays.asList("lrbpbewtghfgbl", "gw", "zvlvqhjkbegib")) + .withHostMembers(Arrays.asList("xiebwwaloayqcg", "rtzju")) .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.NONE); + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("lfeadcygq", model.vmMembers().get(0)); - Assertions.assertEquals("hejhzisx", model.hostMembers().get(0)); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("lrbpbewtghfgbl", model.vmMembers().get(0)); + Assertions.assertEquals("xiebwwaloayqcg", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); + 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 index f5dfd57f44288..600d871dc3cc9 100644 --- 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 @@ -16,27 +16,27 @@ public final class PlacementPolicyUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdate model = BinaryData.fromString( - "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"msweypqwdxggicc\",\"n\",\"qhuexm\"],\"hostMembers\":[\"lstvlzywe\",\"hz\",\"ncsdtclusiyp\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}}") + "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"klwndnhjdauwhv\",\"l\"],\"hostMembers\":[\"tdhxujznbmpowuwp\",\"zqlveualupjmkhf\",\"obbc\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\"}}") .toObject(PlacementPolicyUpdate.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("msweypqwdxggicc", model.vmMembers().get(0)); - Assertions.assertEquals("lstvlzywe", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); + Assertions.assertEquals("klwndnhjdauwhv", model.vmMembers().get(0)); + Assertions.assertEquals("tdhxujznbmpowuwp", 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("msweypqwdxggicc", "n", "qhuexm")) - .withHostMembers(Arrays.asList("lstvlzywe", "hz", "ncsdtclusiyp")) - .withAffinityStrength(AffinityStrength.MUST) + .withVmMembers(Arrays.asList("klwndnhjdauwhv", "l")) + .withHostMembers(Arrays.asList("tdhxujznbmpowuwp", "zqlveualupjmkhf", "obbc")) + .withAffinityStrength(AffinityStrength.SHOULD) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdate.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("msweypqwdxggicc", model.vmMembers().get(0)); - Assertions.assertEquals("lstvlzywe", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); + Assertions.assertEquals("klwndnhjdauwhv", model.vmMembers().get(0)); + Assertions.assertEquals("tdhxujznbmpowuwp", 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 index 6d07a89e39201..43da07287a5fc 100644 --- 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 @@ -6,7 +6,7 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; -import com.azure.resourcemanager.avs.models.ResourceIdentityType; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentityType; import org.junit.jupiter.api.Assertions; public final class PrivateCloudIdentityTests { @@ -15,13 +15,13 @@ public void testDeserialize() throws Exception { PrivateCloudIdentity model = BinaryData.fromString("{\"principalId\":\"gakeqsr\",\"tenantId\":\"bzqqedqytbciq\",\"type\":\"None\"}") .toObject(PrivateCloudIdentity.class); - Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); + Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateCloudIdentity model = new PrivateCloudIdentity().withType(ResourceIdentityType.NONE); + PrivateCloudIdentity model = new PrivateCloudIdentity().withType(SystemAssignedServiceIdentityType.NONE); model = BinaryData.fromObject(model).toObject(PrivateCloudIdentity.class); - Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); + Assertions.assertEquals(SystemAssignedServiceIdentityType.NONE, 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 145be9812bdc5..0000000000000 --- 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) TypeSpec 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("owzfttsttkt", "ahbqactxtgzuk", com.azure.core.util.Context.NONE); - - } -} 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 index 607e7710d1c35..f70d02327ead1 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptCmdletInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"ujxukndxd\",\"timeout\":\"rjguufzdmsyqtf\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"String\",\"name\":\"ingamvp\",\"description\":\"o\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"qamvdkfwynwcvtbv\",\"description\":\"yhmtnvyqiat\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"zcjaesgvvsccy\",\"description\":\"g\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Bool\",\"name\":\"lvdnkfx\",\"description\":\"emdwzrmuhapfc\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"qvpsvuoymg\",\"name\":\"celve\",\"type\":\"rypqlmfeo\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"tdbhhxsrzdzu\",\"timeout\":\"rsc\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"wjmy\",\"description\":\"dsslswt\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Bool\",\"name\":\"pyqs\",\"description\":\"wab\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"h\",\"description\":\"plvwiwubmwmbes\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"tppjflcx\",\"name\":\"gaokonzmnsikv\",\"type\":\"kqze\"}") .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 index dd91bd4e542b0..c92df1128224d 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptCmdletPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"description\":\"wkyhkobopgxe\",\"timeout\":\"owepbqpcrfkb\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"dw\",\"description\":\"p\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]}") + "{\"provisioningState\":\"Failed\",\"description\":\"l\",\"timeout\":\"zxmhhvhgu\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"dagxtibqd\",\"description\":\"xwak\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"kzgxhurip\",\"description\":\"podxunkb\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"ntwlrbqtkoie\",\"description\":\"eotg\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]}") .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 91453731d8a78..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":\"jnhgwydyyn\",\"timeout\":\"vkh\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Credential\",\"name\":\"rfdl\",\"description\":\"kh\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"zjcpeogk\",\"name\":\"nmg\",\"type\":\"ro\"}"; - - 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("nlgmtrwahzjmu", "ftbyrplro", "kpigqfusu", "kzmkwklsnoxaxmqe", - 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 b595ce65667ad..0000000000000 --- 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) TypeSpec 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\":\"Canceled\",\"description\":\"qekewvnqvcd\",\"timeout\":\"uaucmf\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Credential\",\"name\":\"un\",\"description\":\"ikczvvitacgxmf\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"vs\",\"description\":\"hlwntsjgq\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"uuuybnchrsziz\",\"name\":\"yuel\",\"type\":\"etndnbfqyggagf\"}]}"; - - 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("nsharujtjiqxfzyj", "ttvwkpqh", "penuy", 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 index a924ce6c52659..4208c68360a8c 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptCmdletsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"bbqwrvtldg\",\"timeout\":\"pgvmpipaslthaqfx\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"dsrezpdrhneuyow\",\"description\":\"d\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"bi\",\"name\":\"cgpik\",\"type\":\"zimejzanlfzx\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"bzonok\",\"timeout\":\"rjqc\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"azszrnwoiindfpw\",\"description\":\"ylwbtlhflsjcdhsz\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"eljag\",\"description\":\"mqhldvrii\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"ghfkvtvsexs\",\"name\":\"wueluqhhahhxv\",\"type\":\"hmzk\"}],\"nextLink\":\"jgwwspughftq\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"t\",\"timeout\":\"aqtdoqmcbx\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"String\",\"name\":\"bhsfxob\",\"description\":\"tkblmpewww\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"vshqjohxcr\",\"description\":\"fovasr\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"fsubcgjbirxbpy\",\"description\":\"rfbjf\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"t\",\"name\":\"tpvjzbexilzznfqq\",\"type\":\"vwpm\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"oujmkcjhwqytj\",\"timeout\":\"bnw\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"rvnaenqpeh\",\"description\":\"doy\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"d\",\"description\":\"sl\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"String\",\"name\":\"nduhavhqlkthum\",\"description\":\"olbgycduiertgccy\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"lqlfm\",\"description\":\"n\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"swiydmcwyhzdx\",\"name\":\"sadbz\",\"type\":\"nvdfznuda\"}],\"nextLink\":\"vxzbncb\"}") .toObject(ScriptCmdletsList.class); - Assertions.assertEquals("jgwwspughftq", model.nextLink()); + Assertions.assertEquals("vxzbncb", 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 76ac5e131f1d8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":\"bnujrywvtylbf\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"urdoi\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"iithtywu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xcbihw\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"fdntwjchrdgoih\"}],\"failureReason\":\"mwctondzjluudfd\",\"timeout\":\"wggytsbwtovvt\",\"retention\":\"einqf\",\"submittedAt\":\"2021-05-10T20:16:44Z\",\"startedAt\":\"2021-09-17T22:17:43Z\",\"finishedAt\":\"2021-10-13T18:52:56Z\",\"provisioningState\":\"Canceled\",\"output\":[\"nepttwqmsni\",\"fcdmqnrojlpijn\",\"rxfrddhc\"],\"namedOutputs\":{\"hftwesgog\":\"dataizzronasxiftozqy\",\"sxkkg\":\"datazhonnxkrlgnyhmo\",\"rghxjb\":\"datah\"},\"information\":[\"xvcxgfrpdsofbshr\",\"svbuswdvzyy\",\"ycnunvjsrtk\",\"awnopqgikyzirtxd\"],\"warnings\":[\"zejntps\"],\"errors\":[\"ioilqukrydxtq\",\"ieoxorggufhyaomt\"]},\"id\":\"hhavgrvkffovjz\",\"name\":\"pjbi\",\"type\":\"gjmfxumvfcl\"}") - .toObject(ScriptExecutionInner.class); - Assertions.assertEquals("bnujrywvtylbf", model.scriptCmdletId()); - Assertions.assertEquals("urdoi", model.parameters().get(0).name()); - Assertions.assertEquals("fdntwjchrdgoih", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("mwctondzjluudfd", model.failureReason()); - Assertions.assertEquals("wggytsbwtovvt", model.timeout()); - Assertions.assertEquals("einqf", model.retention()); - Assertions.assertEquals("nepttwqmsni", model.output().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("bnujrywvtylbf") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("urdoi"), - new ScriptExecutionParameter().withName("iithtywu"), new ScriptExecutionParameter().withName("xcbihw"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("fdntwjchrdgoih"))) - .withFailureReason("mwctondzjluudfd") - .withTimeout("wggytsbwtovvt") - .withRetention("einqf") - .withOutput(Arrays.asList("nepttwqmsni", "fcdmqnrojlpijn", "rxfrddhc")) - .withNamedOutputs( - mapOf("hftwesgog", "dataizzronasxiftozqy", "sxkkg", "datazhonnxkrlgnyhmo", "rghxjb", "datah")); - model = BinaryData.fromObject(model).toObject(ScriptExecutionInner.class); - Assertions.assertEquals("bnujrywvtylbf", model.scriptCmdletId()); - Assertions.assertEquals("urdoi", model.parameters().get(0).name()); - Assertions.assertEquals("fdntwjchrdgoih", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("mwctondzjluudfd", model.failureReason()); - Assertions.assertEquals("wggytsbwtovvt", model.timeout()); - Assertions.assertEquals("einqf", model.retention()); - Assertions.assertEquals("nepttwqmsni", 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 40fa91549dd47..0000000000000 --- 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) TypeSpec 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\":\"zjxvydfcea\"}") - .toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("zjxvydfcea", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionParameter model = new ScriptExecutionParameter().withName("zjxvydfcea"); - model = BinaryData.fromObject(model).toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("zjxvydfcea", 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 1f37d365eb420..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":\"ovwxnbkfezzxsc\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"zdgiruj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"zbomvzzbtdcqvpni\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ujviylwdshfs\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"bgye\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rymsgaojfmw\"}],\"failureReason\":\"otmrfhir\",\"timeout\":\"tymoxoftp\",\"retention\":\"iwyczuh\",\"submittedAt\":\"2021-09-05T19:51:12Z\",\"startedAt\":\"2021-11-29T08:27:09Z\",\"finishedAt\":\"2021-01-05T07:46:41Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"usps\",\"asdvl\"],\"namedOutputs\":{\"uzvx\":\"datadgzxulucvpamrsr\",\"xmrhu\":\"datarisjnhnytxifqjz\",\"cesutrgjupauut\":\"datalw\"},\"information\":[\"qhih\"],\"warnings\":[\"g\"],\"errors\":[\"nfqn\",\"cypsxjv\",\"oimwkslirc\"]}") - .toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("ovwxnbkfezzxsc", model.scriptCmdletId()); - Assertions.assertEquals("zdgiruj", model.parameters().get(0).name()); - Assertions.assertEquals("bgye", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("otmrfhir", model.failureReason()); - Assertions.assertEquals("tymoxoftp", model.timeout()); - Assertions.assertEquals("iwyczuh", model.retention()); - Assertions.assertEquals("usps", model.output().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("ovwxnbkfezzxsc") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("zdgiruj"), - new ScriptExecutionParameter().withName("zbomvzzbtdcqvpni"), - new ScriptExecutionParameter().withName("ujviylwdshfs"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("bgye"), - new ScriptExecutionParameter().withName("rymsgaojfmw"))) - .withFailureReason("otmrfhir") - .withTimeout("tymoxoftp") - .withRetention("iwyczuh") - .withOutput(Arrays.asList("usps", "asdvl")) - .withNamedOutputs( - mapOf("uzvx", "datadgzxulucvpamrsr", "xmrhu", "datarisjnhnytxifqjz", "cesutrgjupauut", "datalw")); - model = BinaryData.fromObject(model).toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("ovwxnbkfezzxsc", model.scriptCmdletId()); - Assertions.assertEquals("zdgiruj", model.parameters().get(0).name()); - Assertions.assertEquals("bgye", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("otmrfhir", model.failureReason()); - Assertions.assertEquals("tymoxoftp", model.timeout()); - Assertions.assertEquals("iwyczuh", model.retention()); - Assertions.assertEquals("usps", 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 4082dc3b927ca..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":\"ycxnmskw\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jyslurl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"shhkvpedw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"slsrhmpq\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"skondcbrwimu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qejo\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ovyrrleaesinu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"tljqobbpih\"}],\"failureReason\":\"cecybmrqbrjbbmpx\",\"timeout\":\"lvykfrex\",\"retention\":\"s\",\"submittedAt\":\"2021-03-29T05:59:10Z\",\"startedAt\":\"2021-04-17T14:29:37Z\",\"finishedAt\":\"2021-05-27T00:32:10Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"zhxogjggsvo\",\"jkxibda\"],\"namedOutputs\":{\"y\":\"datakmdyomkxfbvfbh\",\"gddeimaw\":\"datarhpw\"},\"information\":[\"gkkumuikjcj\"],\"warnings\":[\"tbw\",\"nsq\"],\"errors\":[\"wcoml\"]},\"id\":\"ytwvczcswkacve\",\"name\":\"yfdvlvhbwrnfxtgd\",\"type\":\"pqthehnmnaoya\"}"; - - 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("vlwyzg") - .withExistingPrivateCloud("idqlvhu", "oveofizrvjfnmj") - .withScriptCmdletId("kujrllfojui") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("uuyjucejikz"), - new ScriptExecutionParameter().withName("eovvtzej"), - new ScriptExecutionParameter().withName("tjklntikyjuzk"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("zolxrzvhqjwtr"), - new ScriptExecutionParameter().withName("tgvgzp"), - new ScriptExecutionParameter().withName("rrkolawjmjs"))) - .withFailureReason("rokcdxfzzzwyjaf") - .withTimeout("tlhguynuchl") - .withRetention("ltxdwhmozu") - .withOutput(Arrays.asList("fpafolpymwamxq", "rag", "gdphtvdula", "vl")) - .withNamedOutputs(mapOf("nrupdwvnphcnzqtp", "datahcsrlzknmzl")) - .create(); - - Assertions.assertEquals("ycxnmskw", response.scriptCmdletId()); - Assertions.assertEquals("jyslurl", response.parameters().get(0).name()); - Assertions.assertEquals("skondcbrwimu", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("cecybmrqbrjbbmpx", response.failureReason()); - Assertions.assertEquals("lvykfrex", response.timeout()); - Assertions.assertEquals("s", response.retention()); - Assertions.assertEquals("zhxogjggsvo", 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 e54011f5ae00e..0000000000000 --- 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) TypeSpec 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("ydsx", "efoh", "cbvopwndyqleallk", 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 8f85967511f52..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":\"szhv\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"c\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hvtrrmhwrbfdpyf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ubhvj\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ocu\"}],\"failureReason\":\"lw\",\"timeout\":\"hmem\",\"retention\":\"oclu\",\"submittedAt\":\"2021-08-23T19:22:29Z\",\"startedAt\":\"2021-11-26T19:05Z\",\"finishedAt\":\"2021-08-15T12:03:46Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"mmyky\",\"jxsglhsr\",\"rye\",\"ylmbkzudni\"],\"namedOutputs\":{\"refqy\":\"dataihotjewlpxuzzjg\",\"kwpzdqtvh\":\"dataqotoihiqakydiwfb\"},\"information\":[\"odaqaxsi\",\"ietgbebjfu\"],\"warnings\":[\"oichdlpnfpubnt\",\"batzviqsows\",\"aelcat\",\"cjuhplrvkm\"],\"errors\":[\"mjvlgfgg\"]},\"id\":\"kyylizr\",\"name\":\"bjpsfxsfuztlvtm\",\"type\":\"agb\"}"; - - 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("mtkhlowkxxpvbr", "fjmzsyzfho", "lhikcyychunsj", - Arrays.asList(ScriptOutputStreamType.WARNING, ScriptOutputStreamType.INFORMATION), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("szhv", response.scriptCmdletId()); - Assertions.assertEquals("c", response.parameters().get(0).name()); - Assertions.assertEquals("ocu", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("lw", response.failureReason()); - Assertions.assertEquals("hmem", response.timeout()); - Assertions.assertEquals("oclu", response.retention()); - Assertions.assertEquals("mmyky", 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 17512103047a6..0000000000000 --- 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) TypeSpec 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\":\"wffplfmuvapc\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"rrvwey\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xoy\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"phaimmoi\"}],\"failureReason\":\"qboshbra\",\"timeout\":\"apyyrmfsvbpavbo\",\"retention\":\"ppdbwnupgahxkum\",\"submittedAt\":\"2021-11-16T21:33:34Z\",\"startedAt\":\"2021-05-10T22:23:02Z\",\"finishedAt\":\"2021-10-15T01:30:32Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"cpugm\"],\"namedOutputs\":{\"oqhnlb\":\"dataepvufhbzehew\",\"krsrrmoucs\":\"datanbldxeaclgschori\",\"abeolhbhlvbm\":\"datafldpuviyfc\"},\"information\":[\"ibsxtkcud\"],\"warnings\":[\"farfs\"],\"errors\":[\"lkjxnqpvwgf\",\"tmhqykiz\"]},\"id\":\"ksaoafcluqvox\",\"name\":\"ycjimryvwgcwwpbm\",\"type\":\"gwe\"}"; - - 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("yuicdhzbdy", "wwgbdv", "bid", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wffplfmuvapc", response.scriptCmdletId()); - Assertions.assertEquals("rrvwey", response.parameters().get(0).name()); - Assertions.assertEquals("phaimmoi", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("qboshbra", response.failureReason()); - Assertions.assertEquals("apyyrmfsvbpavbo", response.timeout()); - Assertions.assertEquals("ppdbwnupgahxkum", response.retention()); - Assertions.assertEquals("cpugm", 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 7c1da6beb05b1..0000000000000 --- 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) TypeSpec 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\":\"pdulon\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"np\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"w\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ehtuevrhr\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"oogwxhnsduugwb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"reur\"}],\"failureReason\":\"kfuarenlv\",\"timeout\":\"htkln\",\"retention\":\"afvvk\",\"submittedAt\":\"2021-04-06T11:17:07Z\",\"startedAt\":\"2021-01-30T13:56:43Z\",\"finishedAt\":\"2021-11-11T21:24:27Z\",\"provisioningState\":\"Failed\",\"output\":[\"cqxypokkhminq\",\"ymc\",\"ngnbdxxew\"],\"namedOutputs\":{\"ct\":\"datanvudbchaqdtvqecr\",\"ytxzvtznapxbanno\":\"dataxxdtddmflh\"},\"information\":[\"xc\",\"ytprwnwvroev\"],\"warnings\":[\"yo\",\"rrrouuxvnsa\",\"bcrymodizrx\"],\"errors\":[\"bdxnaz\",\"mkmlmvevfx\",\"op\",\"hbzxli\"]},\"id\":\"rdddtfgxqbawpcb\",\"name\":\"nzqcy\",\"type\":\"napqo\"}]}"; - - 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("xddbhfhpfpaz", "zoyw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pdulon", response.iterator().next().scriptCmdletId()); - Assertions.assertEquals("np", response.iterator().next().parameters().get(0).name()); - Assertions.assertEquals("oogwxhnsduugwb", response.iterator().next().hiddenParameters().get(0).name()); - Assertions.assertEquals("kfuarenlv", response.iterator().next().failureReason()); - Assertions.assertEquals("htkln", response.iterator().next().timeout()); - Assertions.assertEquals("afvvk", response.iterator().next().retention()); - Assertions.assertEquals("cqxypokkhminq", 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 f198c861818e6..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.implementation.models.ScriptExecutionsList; -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\":\"dvypgikdgsz\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"birryuzhl\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"oqrvqqaatjin\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"vgoup\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fiibfggjioolvr\"}],\"failureReason\":\"kvtkkg\",\"timeout\":\"lqwjygvjayvblm\",\"retention\":\"k\",\"submittedAt\":\"2021-12-10T06:42:49Z\",\"startedAt\":\"2020-12-21T03:49:07Z\",\"finishedAt\":\"2021-08-14T02:32:59Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"pbyrqufegxu\",\"wz\",\"bnhlmc\"],\"namedOutputs\":{\"itvgbmhrixkwm\":\"datadn\"},\"information\":[\"ejvegrhbpnaixex\",\"cbdreaxhcexd\"],\"warnings\":[\"qahqkghtpwijn\",\"yjsvfyc\",\"z\"],\"errors\":[\"oowvrv\",\"t\"]},\"id\":\"qp\",\"name\":\"y\",\"type\":\"s\"},{\"properties\":{\"scriptCmdletId\":\"nzm\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"fipns\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"kmcwaekrrjreafx\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"umh\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"glikkxwslolb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"pvuzlmv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"elfk\"}],\"failureReason\":\"plcrpwjxeznoig\",\"timeout\":\"rnjwmw\",\"retention\":\"nbsazejjoqkag\",\"submittedAt\":\"2021-03-05T04:18:27Z\",\"startedAt\":\"2021-09-12T22:34:01Z\",\"finishedAt\":\"2021-03-18T10:35:55Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"nfaazpxdtnkdmkq\",\"jlwuenvrkp\",\"ou\"],\"namedOutputs\":{\"xqtnq\":\"datarebqaaysjk\"},\"information\":[\"zlwfffiakp\"],\"warnings\":[\"qmt\",\"d\",\"tmmjihyeozph\"],\"errors\":[\"uyqncygupkvipmd\",\"cwxqu\",\"evzhfsto\"]},\"id\":\"hojujbypelmcuv\",\"name\":\"ixbjx\",\"type\":\"fw\"}],\"nextLink\":\"lrcoolsttpki\"}") - .toObject(ScriptExecutionsList.class); - Assertions.assertEquals("dvypgikdgsz", model.value().get(0).scriptCmdletId()); - Assertions.assertEquals("birryuzhl", model.value().get(0).parameters().get(0).name()); - Assertions.assertEquals("oqrvqqaatjin", model.value().get(0).hiddenParameters().get(0).name()); - Assertions.assertEquals("kvtkkg", model.value().get(0).failureReason()); - Assertions.assertEquals("lqwjygvjayvblm", model.value().get(0).timeout()); - Assertions.assertEquals("k", model.value().get(0).retention()); - Assertions.assertEquals("pbyrqufegxu", model.value().get(0).output().get(0)); - Assertions.assertEquals("lrcoolsttpki", model.nextLink()); - } -} 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 index ebf1513c85539..98978693aadd0 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptPackageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ibdeibq\",\"version\":\"qkgh\",\"company\":\"ndzwmkrefa\",\"uri\":\"jorwkqnyhgbij\"},\"id\":\"ivfxzsjabibsyst\",\"name\":\"wfsdjpvkvpbj\",\"type\":\"bkzbzkd\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ceopzfqrhhuaopp\",\"version\":\"qeqxo\",\"company\":\"dahzxctobg\",\"uri\":\"dmoizpostmg\"},\"id\":\"fbunrmfqjhhk\",\"name\":\"bpvjymjhx\",\"type\":\"j\"}") .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 index 527d80dd6da4d..1f73f547a5c3b 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptPackagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"description\":\"abudurgk\",\"version\":\"mokzhjjklf\",\"company\":\"mouwqlgzrfzeey\",\"uri\":\"izikayuhq\"}") + "{\"provisioningState\":\"Canceled\",\"description\":\"divkrt\",\"version\":\"bxqz\",\"company\":\"zjf\",\"uri\":\"vjfdx\"}") .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 f29767f50688c..0000000000000 --- 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) TypeSpec 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\":\"buhhlkyqlt\",\"version\":\"rogtuwkf\",\"company\":\"jk\",\"uri\":\"ysidfvclgl\"},\"id\":\"fuijtkbus\",\"name\":\"ogsf\",\"type\":\"kayi\"}"; - - 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("vcjkgd", "razftxejwabmdujt", "vcopex", 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 62ef62c4c2c41..0000000000000 --- 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) TypeSpec 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\":\"antkwcegyamlbns\",\"version\":\"ac\",\"company\":\"vpilg\",\"uri\":\"oq\"},\"id\":\"gmditgueiookjbs\",\"name\":\"hrtdtpdelq\",\"type\":\"cslmotoebnfxo\"}]}"; - - 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("ctqhamzjrwdk", "zeqyjleziun", 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 index f57ed436104fe..b107c5926b920 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptPackagesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackagesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"dw\",\"version\":\"tswiby\",\"company\":\"dl\",\"uri\":\"shfwpracstwity\"},\"id\":\"evxccedcp\",\"name\":\"md\",\"type\":\"odn\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"jc\",\"version\":\"hlt\",\"company\":\"gcxn\",\"uri\":\"vwxqibyqunyo\"},\"id\":\"wlmdjrkv\",\"name\":\"g\",\"type\":\"vfvpdbodaciz\"}],\"nextLink\":\"q\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ngmtsavjcb\",\"version\":\"xqpsrknftguv\",\"company\":\"uhprwmdyvxqt\",\"uri\":\"riwwroy\"},\"id\":\"exrmcqibycnojvk\",\"name\":\"mefqsgzvahapjyzh\",\"type\":\"vgqzcjrvxd\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"lxkvu\",\"version\":\"hzovawjvzunlut\",\"company\":\"n\",\"uri\":\"nxipeil\"},\"id\":\"zuaejxd\",\"name\":\"ltskzbbtd\",\"type\":\"umveekgpwozuhkf\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"ofd\",\"version\":\"uusdttouwa\",\"company\":\"ekqvkeln\",\"uri\":\"vbxwyjsflhh\"},\"id\":\"aln\",\"name\":\"ixisxyawjoy\",\"type\":\"qcslyjpkiid\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"nelixhnrztfo\",\"version\":\"bnxknalaulppg\",\"company\":\"tpnapnyiropuhpig\",\"uri\":\"gylgqgitxmedjvcs\"},\"id\":\"n\",\"name\":\"wwncwzzhxgk\",\"type\":\"rmgucnap\"}],\"nextLink\":\"eoellwptfdygp\"}") .toObject(ScriptPackagesList.class); - Assertions.assertEquals("q", model.nextLink()); + Assertions.assertEquals("eoellwptfdygp", 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 index 3ae8c767b79ca..15351aeb1b8ad 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptParameter model = BinaryData.fromString( - "{\"type\":\"Int\",\"name\":\"tjsyin\",\"description\":\"fq\",\"visibility\":\"Visible\",\"optional\":\"Required\"}") + "{\"type\":\"String\",\"name\":\"lauwzizxbmpgcjef\",\"description\":\"muvp\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}") .toObject(ScriptParameter.class); - Assertions.assertEquals("tjsyin", model.name()); + Assertions.assertEquals("lauwzizxbmpgcjef", 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 032f311acefa7..0000000000000 --- 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) TypeSpec 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\":\"lhvygdyftu\",\"name\":\"rtwnawjslbi\"}") - .toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("rtwnawjslbi", model.name()); - Assertions.assertEquals("lhvygdyftu", model.secureValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptSecureStringExecutionParameter model - = new ScriptSecureStringExecutionParameter().withName("rtwnawjslbi").withSecureValue("lhvygdyftu"); - model = BinaryData.fromObject(model).toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("rtwnawjslbi", model.name()); - Assertions.assertEquals("lhvygdyftu", 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 7f091137fd91d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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\":\"ojgcyzt\",\"name\":\"fmznba\"}") - .toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("fmznba", model.name()); - Assertions.assertEquals("ojgcyzt", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptStringExecutionParameter model - = new ScriptStringExecutionParameter().withName("fmznba").withValue("ojgcyzt"); - model = BinaryData.fromObject(model).toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("fmznba", model.name()); - Assertions.assertEquals("ojgcyzt", model.value()); - } -} 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 index 1d156729303d0..5fc63066e5f3a 100644 --- 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 @@ -11,7 +11,7 @@ public final class VirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"v\",\"moRefId\":\"pzfoqoui\",\"folderPath\":\"bxarzgszufoxci\",\"restrictMovement\":\"Enabled\"},\"id\":\"doamciodhkha\",\"name\":\"xkhnzbonlwnto\",\"type\":\"gokdwbwhks\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xv\",\"moRefId\":\"u\",\"folderPath\":\"pz\",\"restrictMovement\":\"Disabled\"},\"id\":\"dzhlrq\",\"name\":\"bh\",\"type\":\"kfrlhrxsbky\"}") .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 index 862c0d7469fd4..dc545be2675b6 100644 --- 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 @@ -11,7 +11,7 @@ public final class VirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"displayName\":\"rvexztvb\",\"moRefId\":\"gsfraoyzkoow\",\"folderPath\":\"mnguxawqaldsyu\",\"restrictMovement\":\"Disabled\"}") + "{\"provisioningState\":\"Succeeded\",\"displayName\":\"anuzbpzkafkuw\",\"moRefId\":\"rnwb\",\"folderPath\":\"hhseyv\",\"restrictMovement\":\"Disabled\"}") .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 index ea199a37c62ba..38137b2b78ded 100644 --- 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 @@ -12,16 +12,16 @@ public final class VirtualMachineRestrictMovementTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Enabled\"}") + VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Disabled\"}") .toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, model.restrictMovement()); + Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineRestrictMovement model - = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED); + = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.DISABLED); model = BinaryData.fromObject(model).toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, model.restrictMovement()); + Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java deleted file mode 100644 index 911c966737153..0000000000000 --- 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) TypeSpec 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\":\"Failed\",\"displayName\":\"chnmna\",\"moRefId\":\"nxhkxjqi\",\"folderPath\":\"rweooxffifhx\",\"restrictMovement\":\"Disabled\"},\"id\":\"ewmozqvbu\",\"name\":\"qmamhsycxhxzga\",\"type\":\"ttaboidvmfqh\"}"; - - 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("jwpfilkm", "kholvd", "dviauogp", "uartvti", 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 7d815f9b9f145..0000000000000 --- 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) TypeSpec 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\":\"Failed\",\"displayName\":\"ipq\",\"moRefId\":\"edmurrxxge\",\"folderPath\":\"ktvqylkmqpzoy\",\"restrictMovement\":\"Disabled\"},\"id\":\"cgwgcloxoebqinji\",\"name\":\"nwjfu\",\"type\":\"qlafcbahhpzpofoi\"}]}"; - - 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("gfabuiyjibuzphdu", "neiknpg", "xgjiuqh", 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 index 9eece92dc090f..39d6765a9f00c 100644 --- 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 @@ -12,8 +12,8 @@ public final class VirtualMachinesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"f\",\"moRefId\":\"eyvpnqicvinvkj\",\"folderPath\":\"dxrbuukzcle\",\"restrictMovement\":\"Disabled\"},\"id\":\"lw\",\"name\":\"aztz\",\"type\":\"ofncckwyfzqwhxxb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"zfeqztppri\",\"moRefId\":\"xorjaltolmncwsob\",\"folderPath\":\"csdbnwdcfhuc\",\"restrictMovement\":\"Disabled\"},\"id\":\"uvglsbjjcanvx\",\"name\":\"vtvudutncormr\",\"type\":\"xqtvcofu\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"gj\",\"moRefId\":\"gdknnqv\",\"folderPath\":\"znqntoru\",\"restrictMovement\":\"Disabled\"},\"id\":\"a\",\"name\":\"mkycgra\",\"type\":\"wjue\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ruvdmov\",\"moRefId\":\"zlxwabmqoefkifr\",\"folderPath\":\"puqujmqlgkfbtn\",\"restrictMovement\":\"Enabled\"},\"id\":\"n\",\"name\":\"bjcntujitc\",\"type\":\"ed\"}],\"nextLink\":\"wwa\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"bbovplwzbhvgyugu\",\"moRefId\":\"vmkfssxqu\",\"folderPath\":\"fpl\",\"restrictMovement\":\"Disabled\"},\"id\":\"xnkjzkdesl\",\"name\":\"vlopwiyighx\",\"type\":\"kdwzbaiuebbaumny\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"eojnabc\",\"moRefId\":\"smtxpsieb\",\"folderPath\":\"hvpesapskrdqm\",\"restrictMovement\":\"Disabled\"},\"id\":\"htldwk\",\"name\":\"zxuutkncwscwsvl\",\"type\":\"otogtwrupqs\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"cykvceo\",\"moRefId\":\"ilovnot\",\"folderPath\":\"jfcn\",\"restrictMovement\":\"Enabled\"},\"id\":\"nxdhbt\",\"name\":\"kphywpnvjto\",\"type\":\"nermcl\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"oxuscrpabgyepsbj\",\"moRefId\":\"zq\",\"folderPath\":\"xywpmueefjzwfqkq\",\"restrictMovement\":\"Enabled\"},\"id\":\"suyonobglaocq\",\"name\":\"tcc\",\"type\":\"g\"}],\"nextLink\":\"dxyt\"}") .toObject(VirtualMachinesList.class); - Assertions.assertEquals("wwa", model.nextLink()); + Assertions.assertEquals("dxyt", 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 index cf5482ae4d22e..1e66b68afba4a 100644 --- 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 @@ -17,13 +17,13 @@ public final class VmHostPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmHostPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmHost\",\"vmMembers\":[\"icslfaoq\",\"piyylhalnswhccsp\"],\"hostMembers\":[\"aivwitqscywu\",\"gwol\"],\"affinityType\":\"Affinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"ai\",\"provisioningState\":\"Succeeded\"}") + "{\"type\":\"VmHost\",\"vmMembers\":[\"uojgj\",\"wjue\",\"otwmcdyt\"],\"hostMembers\":[\"wit\"],\"affinityType\":\"AntiAffinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"gxhnisk\",\"provisioningState\":\"Failed\"}") .toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("ai", model.displayName()); - Assertions.assertEquals("icslfaoq", model.vmMembers().get(0)); - Assertions.assertEquals("aivwitqscywu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); + Assertions.assertEquals("gxhnisk", model.displayName()); + Assertions.assertEquals("uojgj", model.vmMembers().get(0)); + Assertions.assertEquals("wit", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } @@ -32,18 +32,18 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { VmHostPlacementPolicyProperties model = new VmHostPlacementPolicyProperties().withState(PlacementPolicyState.DISABLED) - .withDisplayName("ai") - .withVmMembers(Arrays.asList("icslfaoq", "piyylhalnswhccsp")) - .withHostMembers(Arrays.asList("aivwitqscywu", "gwol")) - .withAffinityType(AffinityType.AFFINITY) + .withDisplayName("gxhnisk") + .withVmMembers(Arrays.asList("uojgj", "wjue", "otwmcdyt")) + .withHostMembers(Arrays.asList("wit")) + .withAffinityType(AffinityType.ANTI_AFFINITY) .withAffinityStrength(AffinityStrength.SHOULD) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("ai", model.displayName()); - Assertions.assertEquals("icslfaoq", model.vmMembers().get(0)); - Assertions.assertEquals("aivwitqscywu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); + Assertions.assertEquals("gxhnisk", model.displayName()); + Assertions.assertEquals("uojgj", model.vmMembers().get(0)); + Assertions.assertEquals("wit", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java index 80c50dd45481f..9dfee0659c2ee 100644 --- 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 @@ -15,24 +15,24 @@ public final class VmPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmVm\",\"vmMembers\":[\"uhhziuiefozbhdm\",\"mlmz\"],\"affinityType\":\"Affinity\",\"state\":\"Enabled\",\"displayName\":\"rmaequ\",\"provisioningState\":\"Deleting\"}") + "{\"type\":\"VmVm\",\"vmMembers\":[\"owzxcu\",\"i\",\"jooxdjebw\"],\"affinityType\":\"Affinity\",\"state\":\"Enabled\",\"displayName\":\"fvovbvmeuecivy\",\"provisioningState\":\"Failed\"}") .toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("rmaequ", model.displayName()); - Assertions.assertEquals("uhhziuiefozbhdm", model.vmMembers().get(0)); + Assertions.assertEquals("fvovbvmeuecivy", model.displayName()); + Assertions.assertEquals("owzxcu", model.vmMembers().get(0)); Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VmPlacementPolicyProperties model = new VmPlacementPolicyProperties().withState(PlacementPolicyState.ENABLED) - .withDisplayName("rmaequ") - .withVmMembers(Arrays.asList("uhhziuiefozbhdm", "mlmz")) + .withDisplayName("fvovbvmeuecivy") + .withVmMembers(Arrays.asList("owzxcu", "i", "jooxdjebw")) .withAffinityType(AffinityType.AFFINITY); model = BinaryData.fromObject(model).toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("rmaequ", model.displayName()); - Assertions.assertEquals("uhhziuiefozbhdm", model.vmMembers().get(0)); + Assertions.assertEquals("fvovbvmeuecivy", model.displayName()); + Assertions.assertEquals("owzxcu", model.vmMembers().get(0)); Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java deleted file mode 100644 index a0dc3710e550e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDhcpConfigurationsDeleteMockTests { - @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.workloadNetworkDhcpConfigurations() - .delete("jpahlxvea", "f", "xnmwmqtibxyijddt", com.azure.core.util.Context.NONE); - - } -} 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 index b0e37493d43aa..01f6807886d51 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkDhcpEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpEntity model = BinaryData.fromString( - "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"kv\",\"segments\":[\"lmqkrhahvlj\",\"ahaquh\"],\"provisioningState\":\"Failed\",\"revision\":4716171323603349027}") + "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"atpxl\",\"segments\":[\"cyjmoadsuvarmy\",\"dmjsjqb\",\"hhyxxrw\",\"yc\"],\"provisioningState\":\"Building\",\"revision\":609111947256097194}") .toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("kv", model.displayName()); - Assertions.assertEquals(4716171323603349027L, model.revision()); + Assertions.assertEquals("atpxl", model.displayName()); + Assertions.assertEquals(609111947256097194L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkDhcpEntity model - = new WorkloadNetworkDhcpEntity().withDisplayName("kv").withRevision(4716171323603349027L); + = new WorkloadNetworkDhcpEntity().withDisplayName("atpxl").withRevision(609111947256097194L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("kv", model.displayName()); - Assertions.assertEquals(4716171323603349027L, model.revision()); + Assertions.assertEquals("atpxl", model.displayName()); + Assertions.assertEquals(609111947256097194L, 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 index 5f5137d2db097..563378f411918 100644 --- 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 @@ -13,18 +13,18 @@ public final class WorkloadNetworkDhcpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpInner model = BinaryData.fromString( - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"uwbc\",\"segments\":[\"bmehh\"],\"provisioningState\":\"Deleting\",\"revision\":2958870513291350994},\"id\":\"rts\",\"name\":\"hspkdeemao\",\"type\":\"mx\"}") + "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"l\",\"segments\":[\"mjwosytx\",\"tcs\"],\"provisioningState\":\"Updating\",\"revision\":2011726072634273746},\"id\":\"miekkezzikhlyfjh\",\"name\":\"gqggebdunygae\",\"type\":\"idb\"}") .toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("uwbc", model.properties().displayName()); - Assertions.assertEquals(2958870513291350994L, model.properties().revision()); + Assertions.assertEquals("l", model.properties().displayName()); + Assertions.assertEquals(2011726072634273746L, model.properties().revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner() - .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("uwbc").withRevision(2958870513291350994L)); + .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("l").withRevision(2011726072634273746L)); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("uwbc", model.properties().displayName()); - Assertions.assertEquals(2958870513291350994L, model.properties().revision()); + Assertions.assertEquals("l", model.properties().displayName()); + Assertions.assertEquals(2011726072634273746L, 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 index 2524648dd187c..d5def62bae11e 100644 --- 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 @@ -12,10 +12,10 @@ public final class WorkloadNetworkDhcpListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"mgyudxytlmoyrxv\",\"segments\":[\"dw\"],\"provisioningState\":\"Building\",\"revision\":6478150774243714531},\"id\":\"zhlrqjb\",\"name\":\"ck\",\"type\":\"rlhrxs\"}],\"nextLink\":\"yvpycanuzbpzk\"}") + "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"szkkfoqre\",\"segments\":[\"zi\",\"fjawneaivxwczel\",\"c\",\"r\"],\"provisioningState\":\"Failed\",\"revision\":2411008459227076557},\"id\":\"nwabfatkldd\",\"name\":\"bjhwuaan\",\"type\":\"zjosp\"}],\"nextLink\":\"oulpjrv\"}") .toObject(WorkloadNetworkDhcpList.class); - Assertions.assertEquals("mgyudxytlmoyrxv", model.value().get(0).properties().displayName()); - Assertions.assertEquals(6478150774243714531L, model.value().get(0).properties().revision()); - Assertions.assertEquals("yvpycanuzbpzk", model.nextLink()); + Assertions.assertEquals("szkkfoqre", model.value().get(0).properties().displayName()); + Assertions.assertEquals(2411008459227076557L, model.value().get(0).properties().revision()); + Assertions.assertEquals("oulpjrv", 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 index ae22f0c35bcd6..69a66844c13dc 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkDhcpRelayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpRelay model = BinaryData.fromString( - "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"isgwbnbbeldawkz\",\"ali\"],\"displayName\":\"rqhakauha\",\"segments\":[\"fwxosowzxcu\",\"i\",\"jooxdjebw\"],\"provisioningState\":\"Succeeded\",\"revision\":7246200145127571189}") + "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"qudf\"],\"displayName\":\"yxbaaabjyvayf\",\"segments\":[\"rzrtuzqogsex\"],\"provisioningState\":\"Succeeded\",\"revision\":3349292627980189663}") .toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("rqhakauha", model.displayName()); - Assertions.assertEquals(7246200145127571189L, model.revision()); - Assertions.assertEquals("isgwbnbbeldawkz", model.serverAddresses().get(0)); + Assertions.assertEquals("yxbaaabjyvayf", model.displayName()); + Assertions.assertEquals(3349292627980189663L, model.revision()); + Assertions.assertEquals("qudf", model.serverAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("rqhakauha") - .withRevision(7246200145127571189L) - .withServerAddresses(Arrays.asList("isgwbnbbeldawkz", "ali")); + WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("yxbaaabjyvayf") + .withRevision(3349292627980189663L) + .withServerAddresses(Arrays.asList("qudf")); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("rqhakauha", model.displayName()); - Assertions.assertEquals(7246200145127571189L, model.revision()); - Assertions.assertEquals("isgwbnbbeldawkz", model.serverAddresses().get(0)); + Assertions.assertEquals("yxbaaabjyvayf", model.displayName()); + Assertions.assertEquals(3349292627980189663L, model.revision()); + Assertions.assertEquals("qudf", 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 index 8517c0d6855b9..11578f2fe4984 100644 --- 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 @@ -12,24 +12,24 @@ public final class WorkloadNetworkDhcpServerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpServer model = BinaryData.fromString( - "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"laexqp\",\"leaseTime\":3403871146459803360,\"displayName\":\"ws\",\"segments\":[\"gvxp\"],\"provisioningState\":\"Deleting\",\"revision\":7205793596406177755}") + "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"kgymareqnajxqug\",\"leaseTime\":1857528814684738489,\"displayName\":\"ubeddg\",\"segments\":[\"fwqmzqalkrmn\"],\"provisioningState\":\"Deleting\",\"revision\":4245550544561236483}") .toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("ws", model.displayName()); - Assertions.assertEquals(7205793596406177755L, model.revision()); - Assertions.assertEquals("laexqp", model.serverAddress()); - Assertions.assertEquals(3403871146459803360L, model.leaseTime()); + Assertions.assertEquals("ubeddg", model.displayName()); + Assertions.assertEquals(4245550544561236483L, model.revision()); + Assertions.assertEquals("kgymareqnajxqug", model.serverAddress()); + Assertions.assertEquals(1857528814684738489L, model.leaseTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("ws") - .withRevision(7205793596406177755L) - .withServerAddress("laexqp") - .withLeaseTime(3403871146459803360L); + WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("ubeddg") + .withRevision(4245550544561236483L) + .withServerAddress("kgymareqnajxqug") + .withLeaseTime(1857528814684738489L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("ws", model.displayName()); - Assertions.assertEquals(7205793596406177755L, model.revision()); - Assertions.assertEquals("laexqp", model.serverAddress()); - Assertions.assertEquals(3403871146459803360L, model.leaseTime()); + Assertions.assertEquals("ubeddg", model.displayName()); + Assertions.assertEquals(4245550544561236483L, model.revision()); + Assertions.assertEquals("kgymareqnajxqug", model.serverAddress()); + Assertions.assertEquals(1857528814684738489L, 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 index da403e9b2681e..384d83e2e41de 100644 --- 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 @@ -14,30 +14,30 @@ public final class WorkloadNetworkDnsServiceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"utiiswacf\",\"dnsServiceIp\":\"dkzzewkfvhqcrail\",\"defaultDnsZone\":\"n\",\"fqdnZones\":[\"uflrwd\",\"hdlxyjrxsagafcn\",\"hgw\"],\"logLevel\":\"WARNING\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3702419407947008695},\"id\":\"kcvqvpke\",\"name\":\"dcvd\",\"type\":\"hvoodsotbobzd\"}") + "{\"properties\":{\"displayName\":\"uwqlgzrfzeey\",\"dnsServiceIp\":\"izikayuhq\",\"defaultDnsZone\":\"jbsybbqw\",\"fqdnZones\":[\"ldgmfpgvmpip\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":768699206851816710},\"id\":\"mwutwbdsre\",\"name\":\"pdrhne\",\"type\":\"yowqkdwytisibir\"}") .toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("utiiswacf", model.displayName()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.dnsServiceIp()); - Assertions.assertEquals("n", model.defaultDnsZone()); - Assertions.assertEquals("uflrwd", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(3702419407947008695L, model.revision()); + Assertions.assertEquals("uwqlgzrfzeey", model.displayName()); + Assertions.assertEquals("izikayuhq", model.dnsServiceIp()); + Assertions.assertEquals("jbsybbqw", model.defaultDnsZone()); + Assertions.assertEquals("ldgmfpgvmpip", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); + Assertions.assertEquals(768699206851816710L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("utiiswacf") - .withDnsServiceIp("dkzzewkfvhqcrail") - .withDefaultDnsZone("n") - .withFqdnZones(Arrays.asList("uflrwd", "hdlxyjrxsagafcn", "hgw")) - .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(3702419407947008695L); + WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("uwqlgzrfzeey") + .withDnsServiceIp("izikayuhq") + .withDefaultDnsZone("jbsybbqw") + .withFqdnZones(Arrays.asList("ldgmfpgvmpip")) + .withLogLevel(DnsServiceLogLevelEnum.DEBUG) + .withRevision(768699206851816710L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("utiiswacf", model.displayName()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.dnsServiceIp()); - Assertions.assertEquals("n", model.defaultDnsZone()); - Assertions.assertEquals("uflrwd", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(3702419407947008695L, model.revision()); + Assertions.assertEquals("uwqlgzrfzeey", model.displayName()); + Assertions.assertEquals("izikayuhq", model.dnsServiceIp()); + Assertions.assertEquals("jbsybbqw", model.defaultDnsZone()); + Assertions.assertEquals("ldgmfpgvmpip", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); + Assertions.assertEquals(768699206851816710L, 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 index 18344793c00e5..689b390599bd6 100644 --- 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 @@ -14,30 +14,30 @@ public final class WorkloadNetworkDnsServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceProperties model = BinaryData.fromString( - "{\"displayName\":\"cjwvn\",\"dnsServiceIp\":\"ld\",\"defaultDnsZone\":\"gx\",\"fqdnZones\":[\"slpmutwuo\",\"grpkhjwniyqs\",\"uicpd\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":2377355799268639179}") + "{\"displayName\":\"pikpz\",\"dnsServiceIp\":\"ejzanlfz\",\"defaultDnsZone\":\"av\",\"fqdnZones\":[\"zonokixrjqci\",\"gzpfrla\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":1759449267384215724}") .toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("cjwvn", model.displayName()); - Assertions.assertEquals("ld", model.dnsServiceIp()); - Assertions.assertEquals("gx", model.defaultDnsZone()); - Assertions.assertEquals("slpmutwuo", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(2377355799268639179L, model.revision()); + Assertions.assertEquals("pikpz", model.displayName()); + Assertions.assertEquals("ejzanlfz", model.dnsServiceIp()); + Assertions.assertEquals("av", model.defaultDnsZone()); + Assertions.assertEquals("zonokixrjqci", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, model.logLevel()); + Assertions.assertEquals(1759449267384215724L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("cjwvn") - .withDnsServiceIp("ld") - .withDefaultDnsZone("gx") - .withFqdnZones(Arrays.asList("slpmutwuo", "grpkhjwniyqs", "uicpd")) - .withLogLevel(DnsServiceLogLevelEnum.DEBUG) - .withRevision(2377355799268639179L); + WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("pikpz") + .withDnsServiceIp("ejzanlfz") + .withDefaultDnsZone("av") + .withFqdnZones(Arrays.asList("zonokixrjqci", "gzpfrla")) + .withLogLevel(DnsServiceLogLevelEnum.INFO) + .withRevision(1759449267384215724L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("cjwvn", model.displayName()); - Assertions.assertEquals("ld", model.dnsServiceIp()); - Assertions.assertEquals("gx", model.defaultDnsZone()); - Assertions.assertEquals("slpmutwuo", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(2377355799268639179L, model.revision()); + Assertions.assertEquals("pikpz", model.displayName()); + Assertions.assertEquals("ejzanlfz", model.dnsServiceIp()); + Assertions.assertEquals("av", model.defaultDnsZone()); + Assertions.assertEquals("zonokixrjqci", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, model.logLevel()); + Assertions.assertEquals(1759449267384215724L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java deleted file mode 100644 index c25b37e0e11ff..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsServicesDeleteMockTests { - @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.workloadNetworkDnsServices().delete("aglkafhon", "juj", "ickpz", com.azure.core.util.Context.NONE); - - } -} 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 index 6b536cdc00c87..c0d5495d39575 100644 --- 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 @@ -13,14 +13,14 @@ public final class WorkloadNetworkDnsServicesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServicesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"xe\",\"dnsServiceIp\":\"nzbtbhj\",\"defaultDnsZone\":\"lkfg\",\"fqdnZones\":[\"neuelfphsdyhtoz\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":5092229497552336172},\"id\":\"xzxcl\",\"name\":\"ithhqzon\",\"type\":\"sg\"}],\"nextLink\":\"hcohfwdsjnk\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"itykhevx\",\"dnsServiceIp\":\"edcpnmdyodnwzxl\",\"defaultDnsZone\":\"cvnhltiugc\",\"fqdnZones\":[\"vvwxqi\",\"y\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":8184174444781433747},\"id\":\"jrkvfgbvfvpdbo\",\"name\":\"acizsjqlhkrr\",\"type\":\"bdeibqipqk\"},{\"properties\":{\"displayName\":\"xndzwm\",\"dnsServiceIp\":\"efajpj\",\"defaultDnsZone\":\"wkqnyhg\",\"fqdnZones\":[\"tjivfxzsjabib\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":4706533550715277959},\"id\":\"vkvp\",\"name\":\"jxbkzbzkdvn\",\"type\":\"jabudurgkakmo\"}],\"nextLink\":\"hjjklff\"}") .toObject(WorkloadNetworkDnsServicesList.class); - Assertions.assertEquals("xe", model.value().get(0).displayName()); - Assertions.assertEquals("nzbtbhj", model.value().get(0).dnsServiceIp()); - Assertions.assertEquals("lkfg", model.value().get(0).defaultDnsZone()); - Assertions.assertEquals("neuelfphsdyhtoz", model.value().get(0).fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.value().get(0).logLevel()); - Assertions.assertEquals(5092229497552336172L, model.value().get(0).revision()); - Assertions.assertEquals("hcohfwdsjnk", model.nextLink()); + Assertions.assertEquals("itykhevx", model.value().get(0).displayName()); + Assertions.assertEquals("edcpnmdyodnwzxl", model.value().get(0).dnsServiceIp()); + Assertions.assertEquals("cvnhltiugc", model.value().get(0).defaultDnsZone()); + Assertions.assertEquals("vvwxqi", model.value().get(0).fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, model.value().get(0).logLevel()); + Assertions.assertEquals(8184174444781433747L, model.value().get(0).revision()); + Assertions.assertEquals("hjjklff", 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 index 595d674a2b4b8..d98b7ad8071c9 100644 --- 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 @@ -13,30 +13,30 @@ public final class WorkloadNetworkDnsZoneInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"smypyynpc\",\"domain\":[\"mnzgmwznmabi\",\"nsorgjhxbldt\",\"wwrlkdmtncv\",\"kotl\"],\"dnsServerIps\":[\"yhgsy\"],\"sourceIp\":\"ogjltdtbnnhad\",\"dnsServices\":2230966046874594524,\"provisioningState\":\"Canceled\",\"revision\":5398551830021510565},\"id\":\"nvpamq\",\"name\":\"x\",\"type\":\"queziky\"}") + "{\"properties\":{\"displayName\":\"wjygvjayvblmhvk\",\"domain\":[\"bxvvyhg\",\"opbyrqufegxu\",\"wz\",\"bnhlmc\"],\"dnsServerIps\":[\"dn\"],\"sourceIp\":\"tvgbmhrixkwmy\",\"dnsServices\":7002191229633475908,\"provisioningState\":\"Failed\",\"revision\":2235045579103867231},\"id\":\"pna\",\"name\":\"xexccbdreaxhcexd\",\"type\":\"rvqahqkghtpwi\"}") .toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("smypyynpc", model.displayName()); - Assertions.assertEquals("mnzgmwznmabi", model.domain().get(0)); - Assertions.assertEquals("yhgsy", model.dnsServerIps().get(0)); - Assertions.assertEquals("ogjltdtbnnhad", model.sourceIp()); - Assertions.assertEquals(2230966046874594524L, model.dnsServices()); - Assertions.assertEquals(5398551830021510565L, model.revision()); + Assertions.assertEquals("wjygvjayvblmhvk", model.displayName()); + Assertions.assertEquals("bxvvyhg", model.domain().get(0)); + Assertions.assertEquals("dn", model.dnsServerIps().get(0)); + Assertions.assertEquals("tvgbmhrixkwmy", model.sourceIp()); + Assertions.assertEquals(7002191229633475908L, model.dnsServices()); + Assertions.assertEquals(2235045579103867231L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("smypyynpc") - .withDomain(Arrays.asList("mnzgmwznmabi", "nsorgjhxbldt", "wwrlkdmtncv", "kotl")) - .withDnsServerIps(Arrays.asList("yhgsy")) - .withSourceIp("ogjltdtbnnhad") - .withDnsServices(2230966046874594524L) - .withRevision(5398551830021510565L); + WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("wjygvjayvblmhvk") + .withDomain(Arrays.asList("bxvvyhg", "opbyrqufegxu", "wz", "bnhlmc")) + .withDnsServerIps(Arrays.asList("dn")) + .withSourceIp("tvgbmhrixkwmy") + .withDnsServices(7002191229633475908L) + .withRevision(2235045579103867231L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("smypyynpc", model.displayName()); - Assertions.assertEquals("mnzgmwznmabi", model.domain().get(0)); - Assertions.assertEquals("yhgsy", model.dnsServerIps().get(0)); - Assertions.assertEquals("ogjltdtbnnhad", model.sourceIp()); - Assertions.assertEquals(2230966046874594524L, model.dnsServices()); - Assertions.assertEquals(5398551830021510565L, model.revision()); + Assertions.assertEquals("wjygvjayvblmhvk", model.displayName()); + Assertions.assertEquals("bxvvyhg", model.domain().get(0)); + Assertions.assertEquals("dn", model.dnsServerIps().get(0)); + Assertions.assertEquals("tvgbmhrixkwmy", model.sourceIp()); + Assertions.assertEquals(7002191229633475908L, model.dnsServices()); + Assertions.assertEquals(2235045579103867231L, 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 index 024e18631d993..499a1bf190759 100644 --- 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 @@ -13,30 +13,30 @@ public final class WorkloadNetworkDnsZonePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneProperties model = BinaryData.fromString( - "{\"displayName\":\"gxk\",\"domain\":[\"atmelwui\"],\"dnsServerIps\":[\"cjzkzivgvvcna\",\"rhyrnxxmueed\",\"drd\"],\"sourceIp\":\"tkwqqtchealm\",\"dnsServices\":2875480604821792642,\"provisioningState\":\"Canceled\",\"revision\":2951445315314991952}") + "{\"displayName\":\"hyjsvfycx\",\"domain\":[\"voowvr\",\"mtg\"],\"dnsServerIps\":[\"pyostronzmyhgfi\",\"nsxkmcwaekrrjr\",\"afxtsgum\",\"jglikkxwslolb\"],\"sourceIp\":\"vuzlm\",\"dnsServices\":4397404082163755540,\"provisioningState\":\"Failed\",\"revision\":8984187394901716724}") .toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("gxk", model.displayName()); - Assertions.assertEquals("atmelwui", model.domain().get(0)); - Assertions.assertEquals("cjzkzivgvvcna", model.dnsServerIps().get(0)); - Assertions.assertEquals("tkwqqtchealm", model.sourceIp()); - Assertions.assertEquals(2875480604821792642L, model.dnsServices()); - Assertions.assertEquals(2951445315314991952L, model.revision()); + Assertions.assertEquals("hyjsvfycx", model.displayName()); + Assertions.assertEquals("voowvr", model.domain().get(0)); + Assertions.assertEquals("pyostronzmyhgfi", model.dnsServerIps().get(0)); + Assertions.assertEquals("vuzlm", model.sourceIp()); + Assertions.assertEquals(4397404082163755540L, model.dnsServices()); + Assertions.assertEquals(8984187394901716724L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("gxk") - .withDomain(Arrays.asList("atmelwui")) - .withDnsServerIps(Arrays.asList("cjzkzivgvvcna", "rhyrnxxmueed", "drd")) - .withSourceIp("tkwqqtchealm") - .withDnsServices(2875480604821792642L) - .withRevision(2951445315314991952L); + WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("hyjsvfycx") + .withDomain(Arrays.asList("voowvr", "mtg")) + .withDnsServerIps(Arrays.asList("pyostronzmyhgfi", "nsxkmcwaekrrjr", "afxtsgum", "jglikkxwslolb")) + .withSourceIp("vuzlm") + .withDnsServices(4397404082163755540L) + .withRevision(8984187394901716724L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("gxk", model.displayName()); - Assertions.assertEquals("atmelwui", model.domain().get(0)); - Assertions.assertEquals("cjzkzivgvvcna", model.dnsServerIps().get(0)); - Assertions.assertEquals("tkwqqtchealm", model.sourceIp()); - Assertions.assertEquals(2875480604821792642L, model.dnsServices()); - Assertions.assertEquals(2951445315314991952L, model.revision()); + Assertions.assertEquals("hyjsvfycx", model.displayName()); + Assertions.assertEquals("voowvr", model.domain().get(0)); + Assertions.assertEquals("pyostronzmyhgfi", model.dnsServerIps().get(0)); + Assertions.assertEquals("vuzlm", model.sourceIp()); + Assertions.assertEquals(4397404082163755540L, model.dnsServices()); + Assertions.assertEquals(8984187394901716724L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java deleted file mode 100644 index 09d8a85841991..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkDnsZonesDeleteMockTests { - @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.workloadNetworkDnsZones() - .delete("gehkfkimrtixokff", "yinljqe", "qwhix", com.azure.core.util.Context.NONE); - - } -} 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 index e774e2d7a96ba..81777a7cd9d4a 100644 --- 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 @@ -12,14 +12,14 @@ public final class WorkloadNetworkDnsZonesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZonesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"modfvuefywsbpfvm\",\"domain\":[\"rfouyftaakcpw\",\"yzvqt\"],\"dnsServerIps\":[\"bexkpzksmondj\"],\"sourceIp\":\"uxvypomgkopkwh\",\"dnsServices\":47183864428618035,\"provisioningState\":\"Canceled\",\"revision\":6027886219408436897},\"id\":\"smocmbq\",\"name\":\"qvmkcxo\",\"type\":\"apvhelxprgly\"},{\"properties\":{\"displayName\":\"dckcbc\",\"domain\":[\"rjxgciqib\",\"hos\",\"sdqrhzoymibmrq\",\"ibahwflus\"],\"dnsServerIps\":[\"mhrkwofyyvoqacp\",\"expbtg\",\"wbwo\",\"nwashrtd\"],\"sourceIp\":\"cnqxwbpokulpi\",\"dnsServices\":6830630218833714201,\"provisioningState\":\"Deleting\",\"revision\":1202571290361403211},\"id\":\"iobyu\",\"name\":\"erpqlpqwcciuqg\",\"type\":\"dbutauvfbtkuwhh\"},{\"properties\":{\"displayName\":\"k\",\"domain\":[\"xafnndlpichko\",\"mkcdyhbpkkpwdre\"],\"dnsServerIps\":[\"vvqfovljxyws\",\"w\",\"yrs\",\"dsytgadgvr\"],\"sourceIp\":\"aeneqnzarrwl\",\"dnsServices\":6003700384655384876,\"provisioningState\":\"Updating\",\"revision\":1802422075284970664},\"id\":\"e\",\"name\":\"iipfpubj\",\"type\":\"bwwift\"},{\"properties\":{\"displayName\":\"kvpuvksgplsaknyn\",\"domain\":[\"n\"],\"dnsServerIps\":[\"huopxodlqiynto\"],\"sourceIp\":\"ihleos\",\"dnsServices\":1042560535262747024,\"provisioningState\":\"Failed\",\"revision\":9060898955426619734},\"id\":\"rpzbchckqqzqi\",\"name\":\"xiy\",\"type\":\"uiizynke\"}],\"nextLink\":\"atrwyhqmibzyh\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"wp\",\"domain\":[\"wbtlhflsjcdh\",\"zfjvfbgofe\"],\"dnsServerIps\":[\"grqmqhldvrii\"],\"sourceIp\":\"jnalghf\",\"dnsServices\":3278506032102071495,\"provisioningState\":\"Canceled\",\"revision\":5911736298386623168},\"id\":\"ueluqhhahhxvrhmz\",\"name\":\"wpjgwws\",\"type\":\"ughftqsx\"},{\"properties\":{\"displayName\":\"ujxukndxd\",\"domain\":[\"jguufzdm\",\"yqtfihwh\",\"otzi\",\"gamv\"],\"dnsServerIps\":[\"o\"],\"sourceIp\":\"qzudphq\",\"dnsServices\":5906837724043027810,\"provisioningState\":\"Canceled\",\"revision\":8658128574697224769},\"id\":\"cvtbv\",\"name\":\"ayhmtnvyqiatkz\",\"type\":\"pcnp\"},{\"properties\":{\"displayName\":\"jaesgvvsccya\",\"domain\":[\"qfhwyg\"],\"dnsServerIps\":[\"dnkfx\",\"semdwzrmu\",\"apfcqdpsq\"],\"sourceIp\":\"vpsvuoymgcce\",\"dnsServices\":7407196234438308565,\"provisioningState\":\"Building\",\"revision\":251712560668340421},\"id\":\"feo\",\"name\":\"erqwkyhkobopg\",\"type\":\"edkowepbqpcrfk\"},{\"properties\":{\"displayName\":\"csnjvcdwxlpqekft\",\"domain\":[\"tjsyin\",\"wfqatmtd\"],\"dnsServerIps\":[\"dvypgikdgsz\"],\"sourceIp\":\"kbir\",\"dnsServices\":2468951178814203092,\"provisioningState\":\"Building\",\"revision\":2252515332247075185},\"id\":\"qrvqq\",\"name\":\"atjinrvgoupmfiib\",\"type\":\"ggjioolvr\"}],\"nextLink\":\"kvtkkg\"}") .toObject(WorkloadNetworkDnsZonesList.class); - Assertions.assertEquals("modfvuefywsbpfvm", model.value().get(0).displayName()); - Assertions.assertEquals("rfouyftaakcpw", model.value().get(0).domain().get(0)); - Assertions.assertEquals("bexkpzksmondj", model.value().get(0).dnsServerIps().get(0)); - Assertions.assertEquals("uxvypomgkopkwh", model.value().get(0).sourceIp()); - Assertions.assertEquals(47183864428618035L, model.value().get(0).dnsServices()); - Assertions.assertEquals(6027886219408436897L, model.value().get(0).revision()); - Assertions.assertEquals("atrwyhqmibzyh", model.nextLink()); + Assertions.assertEquals("wp", model.value().get(0).displayName()); + Assertions.assertEquals("wbtlhflsjcdh", model.value().get(0).domain().get(0)); + Assertions.assertEquals("grqmqhldvrii", model.value().get(0).dnsServerIps().get(0)); + Assertions.assertEquals("jnalghf", model.value().get(0).sourceIp()); + Assertions.assertEquals(3278506032102071495L, model.value().get(0).dnsServices()); + Assertions.assertEquals(5911736298386623168L, model.value().get(0).revision()); + Assertions.assertEquals("kvtkkg", 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 index c2f559508cd7a..69ce5eb99450e 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkGatewayInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"auwhvylwzbtdhx\",\"path\":\"znbmpowuwprzq\"},\"id\":\"eualupjmkhf\",\"name\":\"obbc\",\"type\":\"wsrtjriplrbpbe\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"jhemms\",\"path\":\"dkcrodt\"},\"id\":\"nfwjlfltkacjvefk\",\"name\":\"lfoakg\",\"type\":\"kfpagao\"}") .toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("auwhvylwzbtdhx", model.displayName()); + Assertions.assertEquals("jhemms", 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 index d263d1eb89651..64c3dc5f3f7f8 100644 --- 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 @@ -12,9 +12,9 @@ public final class WorkloadNetworkGatewayListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"meue\",\"path\":\"vyhzceuojgjrwj\"},\"id\":\"iotwmcdytdxwit\",\"name\":\"nrjawgqwg\",\"type\":\"hniskxfbkpyc\"}],\"nextLink\":\"lwn\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"wzsyyceuzs\",\"path\":\"bjudpfrxtrthzv\"},\"id\":\"tdwkqbrq\",\"name\":\"bpaxhexiilivpdt\",\"type\":\"irqtdqoa\"},{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"fgsqu\",\"path\":\"xrxxlep\"},\"id\":\"amxjezwlw\",\"name\":\"wxuqlcvydypatdoo\",\"type\":\"ojknio\"}],\"nextLink\":\"oo\"}") .toObject(WorkloadNetworkGatewayList.class); - Assertions.assertEquals("meue", model.value().get(0).displayName()); - Assertions.assertEquals("lwn", model.nextLink()); + Assertions.assertEquals("wzsyyceuzs", model.value().get(0).displayName()); + Assertions.assertEquals("oo", 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 index 8dcb6adc036ab..eeee12af55fd7 100644 --- 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 @@ -11,9 +11,9 @@ public final class WorkloadNetworkGatewayPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkGatewayProperties model - = BinaryData.fromString("{\"provisioningState\":\"Updating\",\"displayName\":\"fgb\",\"path\":\"gw\"}") - .toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("fgb", model.displayName()); + WorkloadNetworkGatewayProperties model = BinaryData + .fromString("{\"provisioningState\":\"Updating\",\"displayName\":\"pqblylsyxkqjnsj\",\"path\":\"vti\"}") + .toObject(WorkloadNetworkGatewayProperties.class); + Assertions.assertEquals("pqblylsyxkqjnsj", 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 index 012f68835bfe6..f8db248d68300 100644 --- 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 @@ -11,7 +11,7 @@ public final class WorkloadNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"nehmpvecx\",\"name\":\"odebfqkkrbmpu\",\"type\":\"gr\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"rq\",\"name\":\"ibahwflus\",\"type\":\"dtmhrkwofyyvoqa\"}") .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 index abe447675fb70..9ed7e0ad24bc7 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"xzpuzycisp\",\"name\":\"qzahmgkbrp\",\"type\":\"y\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"uqqkpik\",\"name\":\"drgvtqagn\",\"type\":\"uynhijg\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"siarbutrcvpn\",\"name\":\"zzmhjrunmpxttd\",\"type\":\"hrbnlankxmyskpbh\"}],\"nextLink\":\"btkcxywnytnrsyn\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"sbpfvmwyhr\",\"name\":\"ouyftaakc\",\"type\":\"wiyzvqtmnubexkp\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"ndjmquxvyp\",\"name\":\"mg\",\"type\":\"opkwhojv\"},{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"xysmoc\",\"name\":\"bq\",\"type\":\"qvmkcxo\"},{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"elxprglyatddck\",\"name\":\"bcuejrjxgci\",\"type\":\"ibrhosxsdqr\"}],\"nextLink\":\"o\"}") .toObject(WorkloadNetworkList.class); - Assertions.assertEquals("btkcxywnytnrsyn", model.nextLink()); + Assertions.assertEquals("o", 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 index ba2f8da9bad0b..ea056d6ce0ba3 100644 --- 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 @@ -13,27 +13,27 @@ public final class WorkloadNetworkPortMirroringInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"xknalaulppg\",\"direction\":\"INGRESS\",\"source\":\"napnyiropuhpigv\",\"destination\":\"ylgqgitxmedjvcsl\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":1214544725492398973},\"id\":\"zhxgktrmgucn\",\"name\":\"pkteo\",\"type\":\"llwptfdy\"}") + "{\"properties\":{\"displayName\":\"xbvtvudu\",\"direction\":\"EGRESS\",\"source\":\"rmrlxqtvcof\",\"destination\":\"f\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":8171649502486820994},\"id\":\"knnqvsaznq\",\"name\":\"tor\",\"type\":\"dsg\"}") .toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("xknalaulppg", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("napnyiropuhpigv", model.source()); - Assertions.assertEquals("ylgqgitxmedjvcsl", model.destination()); - Assertions.assertEquals(1214544725492398973L, model.revision()); + Assertions.assertEquals("xbvtvudu", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); + Assertions.assertEquals("rmrlxqtvcof", model.source()); + Assertions.assertEquals("f", model.destination()); + Assertions.assertEquals(8171649502486820994L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("xknalaulppg") - .withDirection(PortMirroringDirectionEnum.INGRESS) - .withSource("napnyiropuhpigv") - .withDestination("ylgqgitxmedjvcsl") - .withRevision(1214544725492398973L); + WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("xbvtvudu") + .withDirection(PortMirroringDirectionEnum.EGRESS) + .withSource("rmrlxqtvcof") + .withDestination("f") + .withRevision(8171649502486820994L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("xknalaulppg", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("napnyiropuhpigv", model.source()); - Assertions.assertEquals("ylgqgitxmedjvcsl", model.destination()); - Assertions.assertEquals(1214544725492398973L, model.revision()); + Assertions.assertEquals("xbvtvudu", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); + Assertions.assertEquals("rmrlxqtvcof", model.source()); + Assertions.assertEquals("f", model.destination()); + Assertions.assertEquals(8171649502486820994L, 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 index dc6928bc6a1bd..6a4d7d66f0e34 100644 --- 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 @@ -13,13 +13,13 @@ public final class WorkloadNetworkPortMirroringListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"v\",\"direction\":\"EGRESS\",\"source\":\"begibtnmxiebwwa\",\"destination\":\"ayqcgw\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":4790866258005538380},\"id\":\"zmh\",\"name\":\"xongmtsavjcbpwxq\",\"type\":\"srknftguv\"},{\"properties\":{\"displayName\":\"hprwmdyv\",\"direction\":\"INGRESS\",\"source\":\"yriwwroyqb\",\"destination\":\"rmcqiby\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":6160997583833316786},\"id\":\"fqsgzvahapjy\",\"name\":\"hpvgqz\",\"type\":\"j\"},{\"properties\":{\"displayName\":\"djzlmwlx\",\"direction\":\"EGRESS\",\"source\":\"fhzovawjvzunluth\",\"destination\":\"prnxipeil\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":7642090703106785822},\"id\":\"ultskzbbtdz\",\"name\":\"mv\",\"type\":\"ekg\"},{\"properties\":{\"displayName\":\"zuhkfpbsjyof\",\"direction\":\"INGRESS\",\"source\":\"us\",\"destination\":\"touwaboekqv\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":2434745920403430654},\"id\":\"wyjsflhhcaalnjix\",\"name\":\"sxyawjoyaqcs\",\"type\":\"yjpkiidzyexz\"}],\"nextLink\":\"lixhnrztfol\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"dszue\",\"direction\":\"EGRESS\",\"source\":\"zkfzbeyv\",\"destination\":\"qi\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":3810630755643539146},\"id\":\"dxrbuukzcle\",\"name\":\"yhmlwpaztzp\",\"type\":\"fn\"},{\"properties\":{\"displayName\":\"wyfzqwhxxbuyqa\",\"direction\":\"EGRESS\",\"source\":\"qztpp\",\"destination\":\"o\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":1269488169933236475},\"id\":\"lmncw\",\"name\":\"obqwcsdbnwdcfh\",\"type\":\"cqdpfuv\"}],\"nextLink\":\"sbjjc\"}") .toObject(WorkloadNetworkPortMirroringList.class); - Assertions.assertEquals("v", model.value().get(0).displayName()); + Assertions.assertEquals("dszue", model.value().get(0).displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.value().get(0).direction()); - Assertions.assertEquals("begibtnmxiebwwa", model.value().get(0).source()); - Assertions.assertEquals("ayqcgw", model.value().get(0).destination()); - Assertions.assertEquals(4790866258005538380L, model.value().get(0).revision()); - Assertions.assertEquals("lixhnrztfol", model.nextLink()); + Assertions.assertEquals("zkfzbeyv", model.value().get(0).source()); + Assertions.assertEquals("qi", model.value().get(0).destination()); + Assertions.assertEquals(3810630755643539146L, model.value().get(0).revision()); + Assertions.assertEquals("sbjjc", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java deleted file mode 100644 index 76f87478a1bdb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPortMirroringProfilesDeleteMockTests { - @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.workloadNetworkPortMirroringProfiles() - .delete("rzpasccbiuimzdly", "dfqwmkyoq", "fdvruz", com.azure.core.util.Context.NONE); - - } -} 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 index 62efeb475301b..b41b5b6ea0d1f 100644 --- 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 @@ -13,28 +13,28 @@ public final class WorkloadNetworkPortMirroringPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringProperties model = BinaryData.fromString( - "{\"displayName\":\"fqbuaceopzf\",\"direction\":\"INGRESS\",\"source\":\"uaopppcqeq\",\"destination\":\"lzdahzxctobgbkdm\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":753837388632017239}") + "{\"displayName\":\"hmk\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"auwjuetaebu\",\"destination\":\"vdmovsmzlxwabm\",\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":8365209556085472058}") .toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("fqbuaceopzf", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("uaopppcqeq", model.source()); - Assertions.assertEquals("lzdahzxctobgbkdm", model.destination()); - Assertions.assertEquals(753837388632017239L, model.revision()); + Assertions.assertEquals("hmk", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); + Assertions.assertEquals("auwjuetaebu", model.source()); + Assertions.assertEquals("vdmovsmzlxwabm", model.destination()); + Assertions.assertEquals(8365209556085472058L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPortMirroringProperties model - = new WorkloadNetworkPortMirroringProperties().withDisplayName("fqbuaceopzf") - .withDirection(PortMirroringDirectionEnum.INGRESS) - .withSource("uaopppcqeq") - .withDestination("lzdahzxctobgbkdm") - .withRevision(753837388632017239L); + = new WorkloadNetworkPortMirroringProperties().withDisplayName("hmk") + .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) + .withSource("auwjuetaebu") + .withDestination("vdmovsmzlxwabm") + .withRevision(8365209556085472058L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("fqbuaceopzf", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("uaopppcqeq", model.source()); - Assertions.assertEquals("lzdahzxctobgbkdm", model.destination()); - Assertions.assertEquals(753837388632017239L, model.revision()); + Assertions.assertEquals("hmk", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); + Assertions.assertEquals("auwjuetaebu", model.source()); + Assertions.assertEquals("vdmovsmzlxwabm", model.destination()); + Assertions.assertEquals(8365209556085472058L, 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 index 543171e16dc4e..11fe5aeac21c9 100644 --- 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 @@ -11,6 +11,6 @@ public final class WorkloadNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkProperties model - = BinaryData.fromString("{\"provisioningState\":\"Canceled\"}").toObject(WorkloadNetworkProperties.class); + = BinaryData.fromString("{\"provisioningState\":\"Failed\"}").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 index 1284594ed1830..d4978c83f5c43 100644 --- 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 @@ -12,10 +12,10 @@ public final class WorkloadNetworkPublicIPsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIPsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"gpiohgwxrtfudxe\",\"numberOfPublicIPs\":6514858021429691884,\"publicIPBlock\":\"agvrvmnpkuk\",\"provisioningState\":\"Building\"},\"id\":\"dblx\",\"name\":\"wi\",\"type\":\"fnjhfjxwmszkkfo\"}],\"nextLink\":\"eyfkzikfja\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"pwjxezn\",\"numberOfPublicIPs\":3866044551927129985,\"publicIPBlock\":\"njwmwkpnbsazejj\",\"provisioningState\":\"Succeeded\"},\"id\":\"gfhsxttaugzxn\",\"name\":\"aa\",\"type\":\"pxdtnkdmkq\"},{\"properties\":{\"displayName\":\"wuenvr\",\"numberOfPublicIPs\":1643740308818465085,\"publicIPBlock\":\"aibrebqaaysjkixq\",\"provisioningState\":\"Updating\"},\"id\":\"tezlwff\",\"name\":\"iakp\",\"type\":\"pqqmted\"}],\"nextLink\":\"mmji\"}") .toObject(WorkloadNetworkPublicIPsList.class); - Assertions.assertEquals("gpiohgwxrtfudxe", model.value().get(0).displayName()); - Assertions.assertEquals(6514858021429691884L, model.value().get(0).numberOfPublicIPs()); - Assertions.assertEquals("eyfkzikfja", model.nextLink()); + Assertions.assertEquals("pwjxezn", model.value().get(0).displayName()); + Assertions.assertEquals(3866044551927129985L, model.value().get(0).numberOfPublicIPs()); + Assertions.assertEquals("mmji", 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 index eae414653df60..e1b840e6078a6 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"a\",\"numberOfPublicIPs\":2753110503115800438,\"publicIPBlock\":\"zel\",\"provisioningState\":\"Canceled\"},\"id\":\"elsfeaen\",\"name\":\"abfatkl\",\"type\":\"dxbjhwuaanozj\"}") + "{\"properties\":{\"displayName\":\"ozphvwauyqncygu\",\"numberOfPublicIPs\":9207382017369514266,\"publicIPBlock\":\"mdscwxqupev\",\"provisioningState\":\"Updating\"},\"id\":\"totxhojujb\",\"name\":\"pelmcuvhixbjxyf\",\"type\":\"n\"}") .toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("a", model.displayName()); - Assertions.assertEquals(2753110503115800438L, model.numberOfPublicIPs()); + Assertions.assertEquals("ozphvwauyqncygu", model.displayName()); + Assertions.assertEquals(9207382017369514266L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpInner model - = new WorkloadNetworkPublicIpInner().withDisplayName("a").withNumberOfPublicIPs(2753110503115800438L); + WorkloadNetworkPublicIpInner model = new WorkloadNetworkPublicIpInner().withDisplayName("ozphvwauyqncygu") + .withNumberOfPublicIPs(9207382017369514266L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("a", model.displayName()); - Assertions.assertEquals(2753110503115800438L, model.numberOfPublicIPs()); + Assertions.assertEquals("ozphvwauyqncygu", model.displayName()); + Assertions.assertEquals(9207382017369514266L, 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 index ec8cfb0dbb53f..103d026745813 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpProperties model = BinaryData.fromString( - "{\"displayName\":\"ph\",\"numberOfPublicIPs\":5037944209655699604,\"publicIPBlock\":\"jrvxaglrv\",\"provisioningState\":\"Canceled\"}") + "{\"displayName\":\"r\",\"numberOfPublicIPs\":880079432937074833,\"publicIPBlock\":\"ttpkiwkkbnujrywv\",\"provisioningState\":\"Canceled\"}") .toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("ph", model.displayName()); - Assertions.assertEquals(5037944209655699604L, model.numberOfPublicIPs()); + Assertions.assertEquals("r", model.displayName()); + Assertions.assertEquals(880079432937074833L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPublicIpProperties model - = new WorkloadNetworkPublicIpProperties().withDisplayName("ph").withNumberOfPublicIPs(5037944209655699604L); + = new WorkloadNetworkPublicIpProperties().withDisplayName("r").withNumberOfPublicIPs(880079432937074833L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("ph", model.displayName()); - Assertions.assertEquals(5037944209655699604L, model.numberOfPublicIPs()); + Assertions.assertEquals("r", model.displayName()); + Assertions.assertEquals(880079432937074833L, model.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java deleted file mode 100644 index 54aedce5313a8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkPublicIpsDeleteMockTests { - @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.workloadNetworkPublicIps().delete("baxk", "eytu", "lbfjkwr", com.azure.core.util.Context.NONE); - - } -} 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 index 49a43344844b9..2b9987e9c7e25 100644 --- 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 @@ -14,28 +14,27 @@ public final class WorkloadNetworkSegmentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"iuebbaumny\",\"connectedGateway\":\"ped\",\"subnet\":{\"dhcpRanges\":[\"a\",\"ckhsmtxpsieb\",\"fhvpesaps\"],\"gatewayAddress\":\"dqmh\"},\"portVif\":[{\"portName\":\"tldwkyzxuutk\"},{\"portName\":\"ws\"},{\"portName\":\"svlxotogtwrup\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":896120017372838413},\"id\":\"kvceoveilovnotyf\",\"name\":\"fcnj\",\"type\":\"k\"}") + "{\"properties\":{\"displayName\":\"abikns\",\"connectedGateway\":\"gj\",\"subnet\":{\"dhcpRanges\":[\"dtlwwrlkd\",\"tncvokot\"],\"gatewayAddress\":\"xdy\"},\"portVif\":[{\"portName\":\"ocogj\"},{\"portName\":\"dtbnnha\"},{\"portName\":\"ocrkvcikh\"},{\"portName\":\"p\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":7776859938318021776},\"id\":\"zikywgg\",\"name\":\"kallatmel\",\"type\":\"uipiccjzk\"}") .toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("iuebbaumny", model.displayName()); - Assertions.assertEquals("ped", model.connectedGateway()); - Assertions.assertEquals("a", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("dqmh", model.subnet().gatewayAddress()); - Assertions.assertEquals(896120017372838413L, model.revision()); + Assertions.assertEquals("abikns", model.displayName()); + Assertions.assertEquals("gj", model.connectedGateway()); + Assertions.assertEquals("dtlwwrlkd", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("xdy", model.subnet().gatewayAddress()); + Assertions.assertEquals(7776859938318021776L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("iuebbaumny") - .withConnectedGateway("ped") - .withSubnet( - new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("a", "ckhsmtxpsieb", "fhvpesaps")) - .withGatewayAddress("dqmh")) - .withRevision(896120017372838413L); + WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("abikns") + .withConnectedGateway("gj") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("dtlwwrlkd", "tncvokot")) + .withGatewayAddress("xdy")) + .withRevision(7776859938318021776L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("iuebbaumny", model.displayName()); - Assertions.assertEquals("ped", model.connectedGateway()); - Assertions.assertEquals("a", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("dqmh", model.subnet().gatewayAddress()); - Assertions.assertEquals(896120017372838413L, model.revision()); + Assertions.assertEquals("abikns", model.displayName()); + Assertions.assertEquals("gj", model.connectedGateway()); + Assertions.assertEquals("dtlwwrlkd", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("xdy", model.subnet().gatewayAddress()); + Assertions.assertEquals(7776859938318021776L, 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 index cc647a81f2d17..602c91737e097 100644 --- 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 @@ -12,7 +12,7 @@ public final class WorkloadNetworkSegmentPortVifTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentPortVif model - = BinaryData.fromString("{\"portName\":\"nobglaocq\"}").toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("nobglaocq", model.portName()); + = BinaryData.fromString("{\"portName\":\"njhf\"}").toObject(WorkloadNetworkSegmentPortVif.class); + Assertions.assertEquals("njhf", 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 index 4ad02aec5b62d..7537355d2a3dc 100644 --- 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 @@ -14,27 +14,27 @@ public final class WorkloadNetworkSegmentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentProperties model = BinaryData.fromString( - "{\"displayName\":\"x\",\"connectedGateway\":\"bttk\",\"subnet\":{\"dhcpRanges\":[\"pnvjtoqnermclf\"],\"gatewayAddress\":\"phoxus\"},\"portVif\":[{\"portName\":\"bgyepsbj\"},{\"portName\":\"zq\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":5351409570335896037}") + "{\"displayName\":\"v\",\"connectedGateway\":\"vc\",\"subnet\":{\"dhcpRanges\":[\"hyrnxxmu\",\"edndr\",\"v\"],\"gatewayAddress\":\"kwqqtchealmf\"},\"portVif\":[{\"portName\":\"aygdvwvgpioh\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":4267712994723917741}") .toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("x", model.displayName()); - Assertions.assertEquals("bttk", model.connectedGateway()); - Assertions.assertEquals("pnvjtoqnermclf", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("phoxus", model.subnet().gatewayAddress()); - Assertions.assertEquals(5351409570335896037L, model.revision()); + Assertions.assertEquals("v", model.displayName()); + Assertions.assertEquals("vc", model.connectedGateway()); + Assertions.assertEquals("hyrnxxmu", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("kwqqtchealmf", model.subnet().gatewayAddress()); + Assertions.assertEquals(4267712994723917741L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("x") - .withConnectedGateway("bttk") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("pnvjtoqnermclf")) - .withGatewayAddress("phoxus")) - .withRevision(5351409570335896037L); + WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("v") + .withConnectedGateway("vc") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("hyrnxxmu", "edndr", "v")) + .withGatewayAddress("kwqqtchealmf")) + .withRevision(4267712994723917741L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("x", model.displayName()); - Assertions.assertEquals("bttk", model.connectedGateway()); - Assertions.assertEquals("pnvjtoqnermclf", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("phoxus", model.subnet().gatewayAddress()); - Assertions.assertEquals(5351409570335896037L, model.revision()); + Assertions.assertEquals("v", model.displayName()); + Assertions.assertEquals("vc", model.connectedGateway()); + Assertions.assertEquals("hyrnxxmu", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("kwqqtchealmf", model.subnet().gatewayAddress()); + Assertions.assertEquals(4267712994723917741L, 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 index 7370e0bf9ca90..438795b83da64 100644 --- 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 @@ -13,18 +13,19 @@ public final class WorkloadNetworkSegmentSubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentSubnet model - = BinaryData.fromString("{\"dhcpRanges\":[\"fjz\"],\"gatewayAddress\":\"qkqujidsu\"}") + = BinaryData.fromString("{\"dhcpRanges\":[\"pxgy\",\"agvrvmnpkuk\",\"himdbl\"],\"gatewayAddress\":\"wi\"}") .toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("fjz", model.dhcpRanges().get(0)); - Assertions.assertEquals("qkqujidsu", model.gatewayAddress()); + Assertions.assertEquals("pxgy", model.dhcpRanges().get(0)); + Assertions.assertEquals("wi", model.gatewayAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkSegmentSubnet model - = new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("fjz")).withGatewayAddress("qkqujidsu"); + = new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("pxgy", "agvrvmnpkuk", "himdbl")) + .withGatewayAddress("wi"); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("fjz", model.dhcpRanges().get(0)); - Assertions.assertEquals("qkqujidsu", model.gatewayAddress()); + Assertions.assertEquals("pxgy", model.dhcpRanges().get(0)); + Assertions.assertEquals("wi", 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 index e0d5505ca2cad..f187949617aaf 100644 --- 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 @@ -12,13 +12,13 @@ public final class WorkloadNetworkSegmentsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"ybyxc\",\"connectedGateway\":\"clha\",\"subnet\":{\"dhcpRanges\":[\"abphlw\",\"qlfktsths\",\"cocmnyyaztt\"],\"gatewayAddress\":\"wwrq\"},\"portVif\":[{\"portName\":\"ckzywbiexzfeyue\"},{\"portName\":\"ibx\"},{\"portName\":\"wbhqwal\"},{\"portName\":\"zyoxaepdkzjan\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3067424612233139925},\"id\":\"v\",\"name\":\"bniwdj\",\"type\":\"wz\"},{\"properties\":{\"displayName\":\"bpg\",\"connectedGateway\":\"ytxhp\",\"subnet\":{\"dhcpRanges\":[\"pfza\",\"glcuhxwtctyqi\",\"lbbovplw\"],\"gatewayAddress\":\"hvgyuguosvmk\"},\"portVif\":[{\"portName\":\"qukkfp\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":6280051526633281163},\"id\":\"zkd\",\"name\":\"slpvlop\",\"type\":\"i\"}],\"nextLink\":\"ghxpkdw\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"btgiwbwoenwas\",\"connectedGateway\":\"tdtkcn\",\"subnet\":{\"dhcpRanges\":[\"p\",\"kulpiujwaasi\",\"qiiobyuqer\",\"qlpqwcciuq\"],\"gatewayAddress\":\"dbutauvfbtkuwhh\"},\"portVif\":[{\"portName\":\"ojoxafnndlp\"},{\"portName\":\"hkoymkcdyhbp\"},{\"portName\":\"pwdreqnovvqf\"},{\"portName\":\"ljxywsu\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":1595532838454650942},\"id\":\"tgadgvraeaen\",\"name\":\"qnzarrwl\",\"type\":\"uu\"},{\"properties\":{\"displayName\":\"qkacewii\",\"connectedGateway\":\"pubjibw\",\"subnet\":{\"dhcpRanges\":[\"ohqkvpuvksgpls\",\"kn\",\"n\",\"synljphuopxodl\"],\"gatewayAddress\":\"ynt\"},\"portVif\":[{\"portName\":\"hleosjsw\"},{\"portName\":\"mslyzrpzbchckqqz\"},{\"portName\":\"ox\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":8143854718765989330},\"id\":\"ked\",\"name\":\"atrwyhqmibzyh\",\"type\":\"itsmypyyn\"}],\"nextLink\":\"dpumnzgmw\"}") .toObject(WorkloadNetworkSegmentsList.class); - Assertions.assertEquals("ybyxc", model.value().get(0).displayName()); - Assertions.assertEquals("clha", model.value().get(0).connectedGateway()); - Assertions.assertEquals("abphlw", model.value().get(0).subnet().dhcpRanges().get(0)); - Assertions.assertEquals("wwrq", model.value().get(0).subnet().gatewayAddress()); - Assertions.assertEquals(3067424612233139925L, model.value().get(0).revision()); - Assertions.assertEquals("ghxpkdw", model.nextLink()); + Assertions.assertEquals("btgiwbwoenwas", model.value().get(0).displayName()); + Assertions.assertEquals("tdtkcn", model.value().get(0).connectedGateway()); + Assertions.assertEquals("p", model.value().get(0).subnet().dhcpRanges().get(0)); + Assertions.assertEquals("dbutauvfbtkuwhh", model.value().get(0).subnet().gatewayAddress()); + Assertions.assertEquals(1595532838454650942L, model.value().get(0).revision()); + Assertions.assertEquals("dpumnzgmw", 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 index d59b437cb8cf1..7bec28b49258f 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkVMGroupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"fqqnvwpmqtaruo\",\"members\":[\"kcjhwqytjrybnwj\",\"wgdrjervnaenqp\",\"hin\",\"oygmift\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":1265885080326792756},\"id\":\"nayqi\",\"name\":\"ynduha\",\"type\":\"hqlkthumaqo\"}") + "{\"properties\":{\"displayName\":\"nuuzkopbm\",\"members\":[\"fdwoyuhh\",\"iuiefozbhdmsm\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":1203862565285552699},\"id\":\"maequiahxicslfa\",\"name\":\"qzpiyyl\",\"type\":\"alnswhccsphk\"}") .toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("fqqnvwpmqtaruo", model.displayName()); - Assertions.assertEquals("kcjhwqytjrybnwj", model.members().get(0)); - Assertions.assertEquals(1265885080326792756L, model.revision()); + Assertions.assertEquals("nuuzkopbm", model.displayName()); + Assertions.assertEquals("fdwoyuhh", model.members().get(0)); + Assertions.assertEquals(1203862565285552699L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("fqqnvwpmqtaruo") - .withMembers(Arrays.asList("kcjhwqytjrybnwj", "wgdrjervnaenqp", "hin", "oygmift")) - .withRevision(1265885080326792756L); + WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("nuuzkopbm") + .withMembers(Arrays.asList("fdwoyuhh", "iuiefozbhdmsm")) + .withRevision(1203862565285552699L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("fqqnvwpmqtaruo", model.displayName()); - Assertions.assertEquals("kcjhwqytjrybnwj", model.members().get(0)); - Assertions.assertEquals(1265885080326792756L, model.revision()); + Assertions.assertEquals("nuuzkopbm", model.displayName()); + Assertions.assertEquals("fdwoyuhh", model.members().get(0)); + Assertions.assertEquals(1203862565285552699L, 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 index dfed30858cd42..3261543d43d06 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkVMGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupProperties model = BinaryData.fromString( - "{\"displayName\":\"gycdu\",\"members\":[\"tgccymvaolpss\"],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":940610692718193227}") + "{\"displayName\":\"vwitqscyw\",\"members\":[\"woluhczbwemhair\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":1910924176223083649}") .toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("gycdu", model.displayName()); - Assertions.assertEquals("tgccymvaolpss", model.members().get(0)); - Assertions.assertEquals(940610692718193227L, model.revision()); + Assertions.assertEquals("vwitqscyw", model.displayName()); + Assertions.assertEquals("woluhczbwemhair", model.members().get(0)); + Assertions.assertEquals(1910924176223083649L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("gycdu") - .withMembers(Arrays.asList("tgccymvaolpss")) - .withRevision(940610692718193227L); + WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("vwitqscyw") + .withMembers(Arrays.asList("woluhczbwemhair")) + .withRevision(1910924176223083649L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("gycdu", model.displayName()); - Assertions.assertEquals("tgccymvaolpss", model.members().get(0)); - Assertions.assertEquals(940610692718193227L, model.revision()); + Assertions.assertEquals("vwitqscyw", model.displayName()); + Assertions.assertEquals("woluhczbwemhair", model.members().get(0)); + Assertions.assertEquals(1910924176223083649L, 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 index 2f8d1b6195561..12a328b7afd65 100644 --- 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 @@ -12,11 +12,11 @@ public final class WorkloadNetworkVMGroupsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"fbunrmfqjhhk\",\"members\":[\"vjymjhxxjyngud\",\"vkr\",\"swbxqz\",\"szjfauvjfdxxivet\"],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":3137986994872936614},\"id\":\"qmcbxvwvxyslqbhs\",\"name\":\"xoblytkbl\",\"type\":\"pe\"},{\"properties\":{\"displayName\":\"fbkrvrnsvs\",\"members\":[\"ohxcrsbfova\",\"rruvwbhsq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":2319304863641210663},\"id\":\"rxbpyb\",\"name\":\"rfbjf\",\"type\":\"twss\"}],\"nextLink\":\"ftpvjzbexil\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"u\",\"members\":[\"mqlgk\",\"btndo\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":1271439560574404501},\"id\":\"ujitcjedftww\",\"name\":\"ezkojvdcp\",\"type\":\"foqouicybx\"},{\"properties\":{\"displayName\":\"gszufoxciqopid\",\"members\":[\"ciodhkhaz\",\"khnzbonlw\",\"toego\",\"dwbwhkszzcmrvexz\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":540192537661103477},\"id\":\"aoyzkoow\",\"name\":\"lmnguxaw\",\"type\":\"aldsy\"},{\"properties\":{\"displayName\":\"imerqfobwyznk\",\"members\":[\"utwpfhp\",\"gmhrskdsnfdsdoak\"],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":6593579522164343265},\"id\":\"vdlhewpusdsttwv\",\"name\":\"gvbbejdcng\",\"type\":\"qmoa\"}],\"nextLink\":\"fgmjzrwrdgrt\"}") .toObject(WorkloadNetworkVMGroupsList.class); - Assertions.assertEquals("fbunrmfqjhhk", model.value().get(0).displayName()); - Assertions.assertEquals("vjymjhxxjyngud", model.value().get(0).members().get(0)); - Assertions.assertEquals(3137986994872936614L, model.value().get(0).revision()); - Assertions.assertEquals("ftpvjzbexil", model.nextLink()); + Assertions.assertEquals("u", model.value().get(0).displayName()); + Assertions.assertEquals("mqlgk", model.value().get(0).members().get(0)); + Assertions.assertEquals(1271439560574404501L, model.value().get(0).revision()); + Assertions.assertEquals("fgmjzrwrdgrt", 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 index a167d2907bd09..4f326ab634d01 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xunkbebxmubyynt\",\"vmType\":\"SERVICE\"},\"id\":\"qtkoievs\",\"name\":\"otgqrlltmu\",\"type\":\"lauwzizxbmpgcjef\"}") + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"sfgytguslfead\",\"vmType\":\"EDGE\"},\"id\":\"ukyhejhzis\",\"name\":\"gfpelolppvksrpqv\",\"type\":\"jzraehtwdwrf\"}") .toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("xunkbebxmubyynt", model.displayName()); + Assertions.assertEquals("sfgytguslfead", 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 index a87f6c2b74998..d2cca7b33fa06 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineProperties model = BinaryData - .fromString("{\"provisioningState\":\"Building\",\"displayName\":\"vpbttd\",\"vmType\":\"REGULAR\"}") + .fromString("{\"provisioningState\":\"Canceled\",\"displayName\":\"byrcdlbhshfwp\",\"vmType\":\"REGULAR\"}") .toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("vpbttd", model.displayName()); + Assertions.assertEquals("byrcdlbhshfwp", 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 index ab236e256490a..902f76fdb5e8d 100644 --- 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 @@ -12,9 +12,9 @@ public final class WorkloadNetworkVirtualMachinesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"pswiydmcwyh\",\"vmType\":\"EDGE\"},\"id\":\"sadbz\",\"name\":\"nvdfznuda\",\"type\":\"dvxzbncblylpst\"},{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"srzdzucerscdn\",\"vmType\":\"EDGE\"},\"id\":\"fiwjmygtdssls\",\"name\":\"tmweriofzpyq\",\"type\":\"emwabnet\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"h\",\"vmType\":\"SERVICE\"},\"id\":\"vwiwubmwmbesld\",\"name\":\"k\",\"type\":\"wtppjflcxogaoko\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ikvmkqzeqqk\",\"vmType\":\"EDGE\"},\"id\":\"zxmhhvhgu\",\"name\":\"eodkwobda\",\"type\":\"xtibqdxbxwakbog\"}],\"nextLink\":\"ndlkzgxhurip\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"qwdxggicc\",\"vmType\":\"REGULAR\"},\"id\":\"huexmk\",\"name\":\"tlstvlzywem\",\"type\":\"zrncsdt\"}],\"nextLink\":\"u\"}") .toObject(WorkloadNetworkVirtualMachinesList.class); - Assertions.assertEquals("pswiydmcwyh", model.value().get(0).displayName()); - Assertions.assertEquals("ndlkzgxhurip", model.nextLink()); + Assertions.assertEquals("qwdxggicc", model.value().get(0).displayName()); + Assertions.assertEquals("u", model.nextLink()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java deleted file mode 100644 index 127839ed43657..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec 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 WorkloadNetworkVmGroupsDeleteMockTests { - @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.workloadNetworkVmGroups().delete("cysihs", "qcwdhoh", "dtmcd", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java similarity index 67% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java index 8a42ae51fb5e5..85c9901e387da 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkDhcpConfigurationsCreateMockTests { +public final class WorkloadNetworksCreateDhcpMockTests { @Test - public void testCreate() throws Exception { + public void testCreateDhcp() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"zexrxzbujrt\",\"segments\":[\"vwrevkhgnlnzon\",\"lrpiqywnc\"],\"provisioningState\":\"Succeeded\",\"revision\":695830285026637390},\"id\":\"fizehtdhgbjk\",\"name\":\"reljeamur\",\"type\":\"zmlovuanash\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"petogebjox\",\"segments\":[\"vnh\"],\"provisioningState\":\"Succeeded\",\"revision\":463304728293019081},\"id\":\"kzjcjbtrgae\",\"name\":\"vvib\",\"type\":\"xjjs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkDhcp response = manager.workloadNetworkDhcpConfigurations() - .define("eqw") - .withExistingPrivateCloud("qcttadijaeukmrsi", "ekpndzaapmudq") + WorkloadNetworkDhcp response = manager.workloadNetworks() + .defineDhcp("ikf") + .withExistingWorkloadNetwork("wotey", "wcluqovekqvgq", "uwifzmpjwyiv") .withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("ibudqwy").withRevision(3020354173137847735L)) + new WorkloadNetworkDhcpEntity().withDisplayName("hrfsphuagrtti").withRevision(7883022690716225158L)) .create(); - Assertions.assertEquals("zexrxzbujrt", response.properties().displayName()); - Assertions.assertEquals(695830285026637390L, response.properties().revision()); + Assertions.assertEquals("petogebjox", response.properties().displayName()); + Assertions.assertEquals(463304728293019081L, response.properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java similarity index 54% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java index d5f926af9c810..6d9beda288905 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkDnsServicesCreateMockTests { +public final class WorkloadNetworksCreateDnsServiceMockTests { @Test - public void testCreate() throws Exception { + public void testCreateDnsService() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"yqo\",\"dnsServiceIp\":\"p\",\"defaultDnsZone\":\"xwdofdb\",\"fqdnZones\":[\"xeiiq\",\"imht\",\"wwinhehf\",\"pofvwb\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":511267805093926522},\"id\":\"qvxkd\",\"name\":\"vqihebwtswbzuwf\",\"type\":\"duragegizvc\"}"; + = "{\"properties\":{\"displayName\":\"gcealzxwh\",\"dnsServiceIp\":\"nsymoyqhlwigd\",\"defaultDnsZone\":\"bkbxgomfa\",\"fqdnZones\":[\"asqvd\",\"e\",\"y\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":3603243010812205554},\"id\":\"bezkgimsidxasic\",\"name\":\"dyvvjskgfmocwahp\",\"type\":\"gat\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,22 +32,22 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkDnsService response = manager.workloadNetworkDnsServices() - .define("xm") - .withExistingPrivateCloud("cpopmxel", "wcltyjede") - .withDisplayName("kqscazuawxtzx") - .withDnsServiceIp("amwabzxrvxcushsp") - .withDefaultDnsZone("ivmxyasfl") - .withFqdnZones(Arrays.asList("gzwywak", "ihknsmjbl", "ljhlnymzotq", "ryuzcbmqqv")) + WorkloadNetworkDnsService response = manager.workloadNetworks() + .defineDnsService("ti") + .withExistingWorkloadNetwork("tilaxh", "fhqlyvi", "ouwivkxoyzunbixx") + .withDisplayName("pwpgclrci") + .withDnsServiceIp("soxfrken") + .withDefaultDnsZone("m") + .withFqdnZones(Arrays.asList("frpmpdnqqskaw")) .withLogLevel(DnsServiceLogLevelEnum.INFO) - .withRevision(8142549908216654108L) + .withRevision(118268358895074671L) .create(); - Assertions.assertEquals("yqo", response.displayName()); - Assertions.assertEquals("p", response.dnsServiceIp()); - Assertions.assertEquals("xwdofdb", response.defaultDnsZone()); - Assertions.assertEquals("xeiiq", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.logLevel()); - Assertions.assertEquals(511267805093926522L, response.revision()); + Assertions.assertEquals("gcealzxwh", response.displayName()); + Assertions.assertEquals("nsymoyqhlwigd", response.dnsServiceIp()); + Assertions.assertEquals("bkbxgomfa", response.defaultDnsZone()); + Assertions.assertEquals("asqvd", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, response.logLevel()); + Assertions.assertEquals(3603243010812205554L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java similarity index 50% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java index 18c351eebba25..d35e2dd2a06ba 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkDnsZonesCreateMockTests { +public final class WorkloadNetworksCreateDnsZoneMockTests { @Test - public void testCreate() throws Exception { + public void testCreateDnsZone() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"aohdjh\",\"domain\":[\"z\"],\"dnsServerIps\":[\"coxpelnjeta\",\"ltsxoatf\",\"g\"],\"sourceIp\":\"npbs\",\"dnsServices\":887167575780894772,\"provisioningState\":\"Succeeded\",\"revision\":1298535123525566512},\"id\":\"mozi\",\"name\":\"m\",\"type\":\"pgawtxxpkyjcxcjx\"}"; + = "{\"properties\":{\"displayName\":\"v\",\"domain\":[\"exavoxt\",\"glecdmdqbwpypq\"],\"dnsServerIps\":[\"fjacbslhhxudb\"],\"sourceIp\":\"odhtnsirudhzm\",\"dnsServices\":5834441974994701592,\"provisioningState\":\"Succeeded\",\"revision\":8486259057106369538},\"id\":\"zrcxfailcfxwmdbo\",\"name\":\"dfgsftufqobrj\",\"type\":\"nac\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,22 +31,22 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkDnsZone response = manager.workloadNetworkDnsZones() - .define("xgvelfclduccbird") - .withExistingPrivateCloud("onsts", "i") - .withDisplayName("wcobie") - .withDomain(Arrays.asList("mninwjizcilng", "gshejjtbxqmulux")) - .withDnsServerIps(Arrays.asList("zvners", "ycucrwnamikzeb", "qbsms", "ziqgfuh")) - .withSourceIp("zruswh") - .withDnsServices(5481092572149258052L) - .withRevision(6898352302048368719L) + WorkloadNetworkDnsZone response = manager.workloadNetworks() + .defineDnsZone("yxkyxvx") + .withExistingWorkloadNetwork("eaahhvjhhn", "kzyb", "jjidjk") + .withDisplayName("lbj") + .withDomain(Arrays.asList("ljlageuaulxu", "smjbnkppxyn", "nlsvxeiz")) + .withDnsServerIps(Arrays.asList("klnsrmffey", "xcktpiymerteeamm", "qiekkkzddrt")) + .withSourceIp("doj") + .withDnsServices(2082724442990629363L) + .withRevision(8464578871437548472L) .create(); - Assertions.assertEquals("aohdjh", response.displayName()); - Assertions.assertEquals("z", response.domain().get(0)); - Assertions.assertEquals("coxpelnjeta", response.dnsServerIps().get(0)); - Assertions.assertEquals("npbs", response.sourceIp()); - Assertions.assertEquals(887167575780894772L, response.dnsServices()); - Assertions.assertEquals(1298535123525566512L, response.revision()); + Assertions.assertEquals("v", response.displayName()); + Assertions.assertEquals("exavoxt", response.domain().get(0)); + Assertions.assertEquals("fjacbslhhxudb", response.dnsServerIps().get(0)); + Assertions.assertEquals("odhtnsirudhzm", response.sourceIp()); + Assertions.assertEquals(5834441974994701592L, response.dnsServices()); + Assertions.assertEquals(8486259057106369538L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java similarity index 53% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java index aa6ccab44c2d6..874df625a486b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkPortMirroringProfilesCreateMockTests { +public final class WorkloadNetworksCreatePortMirroringMockTests { @Test - public void testCreate() throws Exception { + public void testCreatePortMirroring() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"nkrrf\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"btijvacvbm\",\"destination\":\"bqqxlaj\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":4124520510189226193},\"id\":\"h\",\"name\":\"kuyxoafg\",\"type\":\"oqltfae\"}"; + = "{\"properties\":{\"displayName\":\"snfepgfewetwlyx\",\"direction\":\"EGRESS\",\"source\":\"ykxhdjh\",\"destination\":\"mmbcxfhbcp\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2736440248619026147},\"id\":\"qizxfpxtgqscjavf\",\"name\":\"juhdqazkmtgguwpi\",\"type\":\"r\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,20 +31,20 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkPortMirroring response = manager.workloadNetworkPortMirroringProfiles() - .define("fnmdxotn") - .withExistingPrivateCloud("lzo", "hpc") - .withDisplayName("gugey") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("rkyui") - .withDestination("bsnmfpph") - .withRevision(3280820966134981534L) + WorkloadNetworkPortMirroring response = manager.workloadNetworks() + .definePortMirroring("hujswtwkozzwcul") + .withExistingWorkloadNetwork("oqbeitpkxzt", "oobklftidgfcwq", "pimaqxzhemjyh") + .withDisplayName("wpfaj") + .withDirection(PortMirroringDirectionEnum.EGRESS) + .withSource("tlwtjjguktalhsn") + .withDestination("cdmxzrpoaiml") + .withRevision(1869665425773313749L) .create(); - Assertions.assertEquals("nkrrf", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.direction()); - Assertions.assertEquals("btijvacvbm", response.source()); - Assertions.assertEquals("bqqxlaj", response.destination()); - Assertions.assertEquals(4124520510189226193L, response.revision()); + Assertions.assertEquals("snfepgfewetwlyx", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); + Assertions.assertEquals("ykxhdjh", response.source()); + Assertions.assertEquals("mmbcxfhbcp", response.destination()); + Assertions.assertEquals(2736440248619026147L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIPMockTests.java similarity index 65% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIPMockTests.java index 44c90ad83b04d..61b62fdeaccda 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIPMockTests.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkPublicIpsCreateMockTests { +public final class WorkloadNetworksCreatePublicIPMockTests { @Test - public void testCreate() throws Exception { + public void testCreatePublicIP() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"asi\",\"numberOfPublicIPs\":9025506804447933074,\"publicIPBlock\":\"zjvkviirhgfgrws\",\"provisioningState\":\"Succeeded\"},\"id\":\"atzv\",\"name\":\"bglbyvict\",\"type\":\"tbrxkjz\"}"; + = "{\"properties\":{\"displayName\":\"gc\",\"numberOfPublicIPs\":3532216119776852559,\"publicIPBlock\":\"wmbtmvpdvjdhtt\",\"provisioningState\":\"Succeeded\"},\"id\":\"edxihchrphkmcrj\",\"name\":\"qnsdfzpbgtgky\",\"type\":\"kdghrjeuutlwx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,14 +30,14 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkPublicIp response = manager.workloadNetworkPublicIps() - .define("hdenxaulk") - .withExistingPrivateCloud("snkq", "hsyrqunj") - .withDisplayName("d") - .withNumberOfPublicIPs(2001869363644606291L) + WorkloadNetworkPublicIp response = manager.workloadNetworks() + .definePublicIP("zvulj") + .withExistingWorkloadNetwork("cc", "knh", "kizvytn") + .withDisplayName("eranokqgukkjqnv") + .withNumberOfPublicIPs(8939885428846863813L) .create(); - Assertions.assertEquals("asi", response.displayName()); - Assertions.assertEquals(9025506804447933074L, response.numberOfPublicIPs()); + Assertions.assertEquals("gc", response.displayName()); + Assertions.assertEquals(3532216119776852559L, response.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java similarity index 53% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java index 04ca5b8e767a6..ad3eb45a35d17 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkSegmentsCreateMockTests { +public final class WorkloadNetworksCreateSegmentMockTests { @Test - public void testCreate() throws Exception { + public void testCreateSegment() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"lcdisd\",\"connectedGateway\":\"fj\",\"subnet\":{\"dhcpRanges\":[\"g\",\"rwhryvycytd\"],\"gatewayAddress\":\"xgccknfnw\"},\"portVif\":[{\"portName\":\"vpdvjdhttzae\"},{\"portName\":\"dxihc\"},{\"portName\":\"phkmcrjdqnsdfz\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":1112930021934577453},\"id\":\"dgh\",\"name\":\"jeuut\",\"type\":\"wxezwzhok\"}"; + = "{\"properties\":{\"displayName\":\"agy\",\"connectedGateway\":\"qfby\",\"subnet\":{\"dhcpRanges\":[\"giagtcojo\",\"qwogfnzjvus\",\"zldmozuxy\",\"fsbtkad\"],\"gatewayAddress\":\"s\"},\"portVif\":[{\"portName\":\"tgkbugrjqctojc\"},{\"portName\":\"sofieypefojyqd\"},{\"portName\":\"u\"},{\"portName\":\"cp\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":4772372481641988855},\"id\":\"lhzdsqtzb\",\"name\":\"rgnowcjhfgm\",\"type\":\"ecactx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,20 +32,20 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkSegment response = manager.workloadNetworkSegments() - .define("tnsi") - .withExistingPrivateCloud("slhhxudbxv", "d") - .withDisplayName("hzmme") - .withConnectedGateway("kdlpa") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("x", "a", "lc", "xwmdboxd")) - .withGatewayAddress("sftufqobrjlna")) - .withRevision(7910183506498938441L) + WorkloadNetworkSegment response = manager.workloadNetworks() + .defineSegment("xg") + .withExistingWorkloadNetwork("spave", "hrv", "bunzozudh") + .withDisplayName("yxcdyuibhmfdnbzy") + .withConnectedGateway("f") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("naeo", "srvhmgorffuki")) + .withGatewayAddress("vwmzhwplefaxvxil")) + .withRevision(8809168943963914641L) .create(); - Assertions.assertEquals("lcdisd", response.displayName()); - Assertions.assertEquals("fj", response.connectedGateway()); - Assertions.assertEquals("g", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("xgccknfnw", response.subnet().gatewayAddress()); - Assertions.assertEquals(1112930021934577453L, response.revision()); + Assertions.assertEquals("agy", response.displayName()); + Assertions.assertEquals("qfby", response.connectedGateway()); + Assertions.assertEquals("giagtcojo", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("s", response.subnet().gatewayAddress()); + Assertions.assertEquals(4772372481641988855L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java similarity index 60% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java index dc96456a3cbe4..9973ac7f095ef 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsCreateMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkVmGroupsCreateMockTests { +public final class WorkloadNetworksCreateVMGroupMockTests { @Test - public void testCreate() throws Exception { + public void testCreateVMGroup() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"xcczurtl\",\"members\":[\"q\",\"bkwvzg\",\"zvd\",\"bzdixzmq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":2317307583598027540},\"id\":\"hewjptmcgsbost\",\"name\":\"eln\",\"type\":\"la\"}"; + = "{\"properties\":{\"displayName\":\"hzjhf\",\"members\":[\"vvmu\",\"gpmuneqsxvmhfbuz\",\"yihsasbhudypohyu\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":3075885746767216016},\"id\":\"rpfoobr\",\"name\":\"ttymsjny\",\"type\":\"qdnfwqzdz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,16 +31,16 @@ public void testCreate() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkVMGroup response = manager.workloadNetworkVmGroups() - .define("vhdbevwqqxey") - .withExistingPrivateCloud("sufco", "dxbzlmcmuap") - .withDisplayName("nqzi") - .withMembers(Arrays.asList("kbg")) - .withRevision(2772661107055529324L) + WorkloadNetworkVMGroup response = manager.workloadNetworks() + .defineVMGroup("uvyinzqodfvpgs") + .withExistingWorkloadNetwork("jcivmmg", "f", "fiwrxgkn") + .withDisplayName("gsgbpfgzdjt") + .withMembers(Arrays.asList("flbqvgaq", "lgafcqusrdve")) + .withRevision(4392924030472678320L) .create(); - Assertions.assertEquals("xcczurtl", response.displayName()); - Assertions.assertEquals("q", response.members().get(0)); - Assertions.assertEquals(2317307583598027540L, response.revision()); + Assertions.assertEquals("hzjhf", response.displayName()); + Assertions.assertEquals("vvmu", response.members().get(0)); + Assertions.assertEquals(3075885746767216016L, 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 new file mode 100644 index 0000000000000..db2e52bea93b1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("jdftuljltd", "ceamtm", "zuo", "ejwcwwqiok", com.azure.core.util.Context.NONE); + + } +} 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/WorkloadNetworksDeleteDnsServiceMockTests.java similarity index 82% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java index b53342f54c418..2e86bcdcc8136 100644 --- 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/WorkloadNetworksDeleteDnsServiceMockTests.java @@ -15,9 +15,9 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class ClustersDeleteMockTests { +public final class WorkloadNetworksDeleteDnsServiceMockTests { @Test - public void testDelete() throws Exception { + public void testDeleteDnsService() throws Exception { String responseStr = "{}"; HttpClient httpClient @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.clusters().delete("ril", "zapeewchpx", "ktwkuziyc", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDnsService("xsspuunnoxyhk", "g", "ddrihpf", com.azure.core.util.Context.NONE); } } 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/WorkloadNetworksDeleteDnsZoneMockTests.java similarity index 83% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java index c1ecea551f33a..e2ca2a5071ce3 100644 --- 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/WorkloadNetworksDeleteDnsZoneMockTests.java @@ -15,9 +15,9 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class CloudLinksDeleteMockTests { +public final class WorkloadNetworksDeleteDnsZoneMockTests { @Test - public void testDelete() throws Exception { + public void testDeleteDnsZone() throws Exception { String responseStr = "{}"; HttpClient httpClient @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.cloudLinks().delete("amowaziynknlqwzd", "piwhxqs", "dtmaa", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDnsZone("iykhy", "wf", "jlb", 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 new file mode 100644 index 0000000000000..fb3a6eaa9eaba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("hminyflnorwmduv", "pklvxw", "ygdxpgpqchis", com.azure.core.util.Context.NONE); + + } +} 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/WorkloadNetworksDeletePublicIPMockTests.java similarity index 82% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIPMockTests.java index 824800df7ad01..c6e6b991236fb 100644 --- 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/WorkloadNetworksDeletePublicIPMockTests.java @@ -15,9 +15,9 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AddonsDeleteMockTests { +public final class WorkloadNetworksDeletePublicIPMockTests { @Test - public void testDelete() throws Exception { + public void testDeletePublicIP() throws Exception { String responseStr = "{}"; HttpClient httpClient @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.addons().delete("gvriibakclac", "fr", "xousxauzl", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deletePublicIP("g", "khocxvdfffwaf", "roud", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java similarity index 83% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java index b0df9ee9dbaff..93189e09cf666 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsDeleteSegmentMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java @@ -15,7 +15,7 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkSegmentsDeleteSegmentMockTests { +public final class WorkloadNetworksDeleteSegmentMockTests { @Test public void testDeleteSegment() throws Exception { String responseStr = "{}"; @@ -27,7 +27,9 @@ public void testDeleteSegment() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworkSegments().deleteSegment("ecdmdqbwpy", "q", "gsfjac", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deleteSegment("yuspskas", "vlmfwdgzxulucv", "amrsreuzv", "urisjnhnytxifqj", + 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/WorkloadNetworksDeleteVMGroupMockTests.java similarity index 83% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java index b87cca7611437..34f36d3713b5f 100644 --- 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/WorkloadNetworksDeleteVMGroupMockTests.java @@ -15,9 +15,9 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AuthorizationsDeleteMockTests { +public final class WorkloadNetworksDeleteVMGroupMockTests { @Test - public void testDelete() throws Exception { + public void testDeleteVMGroup() throws Exception { String responseStr = "{}"; HttpClient httpClient @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.authorizations().delete("jrajcivm", "ghfcfiwrxgkneuvy", "nzqodfvpg", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteVMGroup("lgy", "vutpthjoxo", "smsks", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java similarity index 64% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java index edad216ea6b03..1e2c3d30dbcf6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkDhcpConfigurationsGetWithResponseMockTests { +public final class WorkloadNetworksGetDhcpWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetDhcpWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ankjpdnjzh\",\"segments\":[\"ylhjlm\",\"oyxprimr\",\"opteecj\",\"eislstvasylwx\"],\"provisioningState\":\"Building\",\"revision\":8207738955383308872},\"id\":\"oohgu\",\"name\":\"fuzboyjathwtzolb\",\"type\":\"emwmdxmebwjs\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"dvk\",\"segments\":[\"jdz\"],\"provisioningState\":\"Failed\",\"revision\":9195569848009574946},\"id\":\"hnjivo\",\"name\":\"v\",\"type\":\"novqfzge\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,11 +30,11 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkDhcp response = manager.workloadNetworkDhcpConfigurations() - .getWithResponse("wsldrizetpwbr", "lllibph", "qzmiza", com.azure.core.util.Context.NONE) + WorkloadNetworkDhcp response = manager.workloadNetworks() + .getDhcpWithResponse("fmznba", "qphchqnrnrpxehuw", "ykqgaifmvik", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ankjpdnjzh", response.properties().displayName()); - Assertions.assertEquals(8207738955383308872L, response.properties().revision()); + Assertions.assertEquals("dvk", response.properties().displayName()); + Assertions.assertEquals(9195569848009574946L, response.properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java similarity index 57% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java index 6c3ed0f04057f..6407382c611ee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkDnsServicesGetWithResponseMockTests { +public final class WorkloadNetworksGetDnsServiceWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetDnsServiceWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"zid\",\"dnsServiceIp\":\"waabzmifrygzn\",\"defaultDnsZone\":\"axri\",\"fqdnZones\":[\"obgop\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":4400312787392536250},\"id\":\"ixynllxecwcrojp\",\"name\":\"slhcawjutifd\",\"type\":\"fmvigorqjbttzh\"}"; + = "{\"properties\":{\"displayName\":\"baiyhddviaceg\",\"dnsServiceIp\":\"m\",\"defaultDnsZone\":\"fpmvmemfnczd\",\"fqdnZones\":[\"b\",\"lxlllchpo\",\"bzevwrd\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":9047416798509661707},\"id\":\"wsmystuluqypf\",\"name\":\"vlerchpqbmfpjba\",\"type\":\"widf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,16 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkDnsService response = manager.workloadNetworkDnsServices() - .getWithResponse("sovwxznptgoeiyb", "abpfhvfs", "kvntjlrigjkskyri", com.azure.core.util.Context.NONE) + WorkloadNetworkDnsService response = manager.workloadNetworks() + .getDnsServiceWithResponse("px", "wjplma", "stcyohpfkyrkdbd", "iogsjkmnwq", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zid", response.displayName()); - Assertions.assertEquals("waabzmifrygzn", response.dnsServiceIp()); - Assertions.assertEquals("axri", response.defaultDnsZone()); - Assertions.assertEquals("obgop", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, response.logLevel()); - Assertions.assertEquals(4400312787392536250L, response.revision()); + Assertions.assertEquals("baiyhddviaceg", response.displayName()); + Assertions.assertEquals("m", response.dnsServiceIp()); + Assertions.assertEquals("fpmvmemfnczd", response.defaultDnsZone()); + Assertions.assertEquals("b", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.logLevel()); + Assertions.assertEquals(9047416798509661707L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java similarity index 55% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java index 8cbcc43f6bbfb..7c05e85278a5d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkDnsZonesGetWithResponseMockTests { +public final class WorkloadNetworksGetDnsZoneWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetDnsZoneWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"wetnpsihc\",\"domain\":[\"zvaylptrsqqw\",\"tcmwqkchc\",\"waxfewzjkj\"],\"dnsServerIps\":[\"deqvhp\",\"ylkkshkbffmbm\",\"zjrgyww\"],\"sourceIp\":\"jx\",\"dnsServices\":7942160744300622603,\"provisioningState\":\"Failed\",\"revision\":4816022177216444981},\"id\":\"gaao\",\"name\":\"pttaqutd\",\"type\":\"wemxswvruunzz\"}"; + = "{\"properties\":{\"displayName\":\"uztcktyhjtqed\",\"domain\":[\"ulwm\",\"rqzz\",\"rjvpglydzgkrvqee\",\"toepryu\"],\"dnsServerIps\":[\"ytp\",\"dmovzvfva\",\"wzqa\"],\"sourceIp\":\"lgzurig\",\"dnsServices\":4544236688410248601,\"provisioningState\":\"Updating\",\"revision\":442627726134054774},\"id\":\"okpvzm\",\"name\":\"qtmldgxo\",\"type\":\"firclnpkciayz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,15 +30,16 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkDnsZone response = manager.workloadNetworkDnsZones() - .getWithResponse("sgcrpfbcunezzce", "elfwy", "wl", com.azure.core.util.Context.NONE) + WorkloadNetworkDnsZone response = manager.workloadNetworks() + .getDnsZoneWithResponse("bkkd", "flvestmjlxrrilo", "apeewchpxlkt", "kuziycsle", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wetnpsihc", response.displayName()); - Assertions.assertEquals("zvaylptrsqqw", response.domain().get(0)); - Assertions.assertEquals("deqvhp", response.dnsServerIps().get(0)); - Assertions.assertEquals("jx", response.sourceIp()); - Assertions.assertEquals(7942160744300622603L, response.dnsServices()); - Assertions.assertEquals(4816022177216444981L, response.revision()); + Assertions.assertEquals("uztcktyhjtqed", response.displayName()); + Assertions.assertEquals("ulwm", response.domain().get(0)); + Assertions.assertEquals("ytp", response.dnsServerIps().get(0)); + Assertions.assertEquals("lgzurig", response.sourceIp()); + Assertions.assertEquals(4544236688410248601L, response.dnsServices()); + Assertions.assertEquals(442627726134054774L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java similarity index 72% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java index 321e1a514438e..0a3b9b6bb552a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkGatewaysGetWithResponseMockTests { +public final class WorkloadNetworksGetGatewayWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetGatewayWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"bfhfovvacqp\",\"path\":\"uodxesza\"},\"id\":\"elawumu\",\"name\":\"slzkwrrwoycqu\",\"type\":\"wyh\"}"; + = "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"clzedqbcvh\",\"path\":\"h\"},\"id\":\"odqkdlwwqfb\",\"name\":\"mlkxtrqjfs\",\"type\":\"lmbtxhwgfwsrt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,10 +30,10 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkGateway response = manager.workloadNetworkGateways() - .getWithResponse("zhmkdasvflyh", "xcudchxgsr", "oldforobw", com.azure.core.util.Context.NONE) + WorkloadNetworkGateway response = manager.workloadNetworks() + .getGatewayWithResponse("uodpv", "uudl", "zibt", "ostgkts", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bfhfovvacqp", response.displayName()); + Assertions.assertEquals("clzedqbcvh", response.displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java similarity index 58% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java index 3b4bcba55d42c..8b637a4ca0063 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkPortMirroringProfilesGetWithResponseMockTests { +public final class WorkloadNetworksGetPortMirroringWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetPortMirroringWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"qn\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"chrqb\",\"destination\":\"jrcg\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":8975438467720263747},\"id\":\"jumvqqolihrraio\",\"name\":\"aubrjtloq\",\"type\":\"fuojrngif\"}"; + = "{\"properties\":{\"displayName\":\"m\",\"direction\":\"EGRESS\",\"source\":\"guaadraufactkahz\",\"destination\":\"ajjziuxxpshne\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":379152667379515000},\"id\":\"ubkwdle\",\"name\":\"rds\",\"type\":\"tujbazpju\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,15 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkPortMirroring response = manager.workloadNetworkPortMirroringProfiles() - .getWithResponse("ttexoqqpwcyyufmh", "uncuw", "qspkcdqzhlctd", com.azure.core.util.Context.NONE) + WorkloadNetworkPortMirroring response = manager.workloadNetworks() + .getPortMirroringWithResponse("uwrbehwagoh", "uffkmrqemvvh", "xtdr", "futacoebjvewzc", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qn", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.direction()); - Assertions.assertEquals("chrqb", response.source()); - Assertions.assertEquals("jrcg", response.destination()); - Assertions.assertEquals(8975438467720263747L, response.revision()); + Assertions.assertEquals("m", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); + Assertions.assertEquals("guaadraufactkahz", response.source()); + Assertions.assertEquals("ajjziuxxpshne", response.destination()); + Assertions.assertEquals(379152667379515000L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPWithResponseMockTests.java similarity index 67% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPWithResponseMockTests.java index de0980506034b..ec6d407e27f7f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPWithResponseMockTests.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkPublicIpsGetWithResponseMockTests { +public final class WorkloadNetworksGetPublicIPWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetPublicIPWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"bwln\",\"numberOfPublicIPs\":6785534445230421786,\"publicIPBlock\":\"e\",\"provisioningState\":\"Deleting\"},\"id\":\"qavbpdqmj\",\"name\":\"lyyzglgouwtlmjj\",\"type\":\"uojqt\"}"; + = "{\"properties\":{\"displayName\":\"hfrbbc\",\"numberOfPublicIPs\":4254083119054920341,\"publicIPBlock\":\"tltdhlfkqojpy\",\"provisioningState\":\"Failed\"},\"id\":\"rdcnifmzzsdy\",\"name\":\"brn\",\"type\":\"suxmpraf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,11 +30,12 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkPublicIp response = manager.workloadNetworkPublicIps() - .getWithResponse("hjm", "nnbsoqeqa", "arvlagunbt", com.azure.core.util.Context.NONE) + WorkloadNetworkPublicIp response = manager.workloadNetworks() + .getPublicIPWithResponse("bvpoekrsgsgbdhu", "qgnjdgkynscli", "hzvhxnkomtkubo", "ppnvdxz", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bwln", response.displayName()); - Assertions.assertEquals(6785534445230421786L, response.numberOfPublicIPs()); + Assertions.assertEquals("hfrbbc", response.displayName()); + Assertions.assertEquals(4254083119054920341L, response.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java similarity index 55% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java index 20f93d17ce03d..a03075f1e11fc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkSegmentsGetWithResponseMockTests { +public final class WorkloadNetworksGetSegmentWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetSegmentWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"erteeammxqiekk\",\"connectedGateway\":\"ddrtkgdojb\",\"subnet\":{\"dhcpRanges\":[\"vrefdeesv\"],\"gatewayAddress\":\"uij\"},\"portVif\":[{\"portName\":\"s\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":4136420798110514219},\"id\":\"awddjibab\",\"name\":\"vit\",\"type\":\"tvtzeexavoxtfg\"}"; + = "{\"properties\":{\"displayName\":\"vwxnbkfe\",\"connectedGateway\":\"xscyhwzdgirujbz\",\"subnet\":{\"dhcpRanges\":[\"zzbtdcqvpniyujvi\",\"l\"],\"gatewayAddress\":\"shfssnrbgyef\"},\"portVif\":[{\"portName\":\"gaojf\"},{\"portName\":\"nc\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":8990215421896908005},\"id\":\"tymoxoftp\",\"name\":\"piwyczuhxacpqjl\",\"type\":\"h\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,14 +30,14 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkSegment response = manager.workloadNetworkSegments() - .getWithResponse("svxeizzgwklnsr", "ffeycx", "ktp", com.azure.core.util.Context.NONE) + WorkloadNetworkSegment response = manager.workloadNetworks() + .getSegmentWithResponse("yaomtb", "hhavgrvkffovjz", "pjbi", "gjmfxumvfcl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("erteeammxqiekk", response.displayName()); - Assertions.assertEquals("ddrtkgdojb", response.connectedGateway()); - Assertions.assertEquals("vrefdeesv", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("uij", response.subnet().gatewayAddress()); - Assertions.assertEquals(4136420798110514219L, response.revision()); + Assertions.assertEquals("vwxnbkfe", response.displayName()); + Assertions.assertEquals("xscyhwzdgirujbz", response.connectedGateway()); + Assertions.assertEquals("zzbtdcqvpniyujvi", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("shfssnrbgyef", response.subnet().gatewayAddress()); + Assertions.assertEquals(8990215421896908005L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java similarity index 64% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java index 25bbd0ef643d7..9048fbfbdc272 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkVmGroupsGetWithResponseMockTests { +public final class WorkloadNetworksGetVMGroupWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetVMGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"ftpmdtzfjltfv\",\"members\":[\"yj\",\"otp\",\"opv\"],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":3940441182690359236},\"id\":\"ihed\",\"name\":\"vqwt\",\"type\":\"mkyi\"}"; + = "{\"properties\":{\"displayName\":\"macjekn\",\"members\":[\"hqvcimpevfgmblr\",\"ilbywdxsm\",\"ccwr\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":703476384882918279},\"id\":\"szqujizdvoq\",\"name\":\"tiby\",\"type\":\"wb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,12 +30,12 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkVMGroup response = manager.workloadNetworkVmGroups() - .getWithResponse("xhugcm", "k", "vlgo", com.azure.core.util.Context.NONE) + WorkloadNetworkVMGroup response = manager.workloadNetworks() + .getVMGroupWithResponse("ao", "jchvcyy", "s", "gdotcubiipuipwo", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ftpmdtzfjltfv", response.displayName()); - Assertions.assertEquals("yj", response.members().get(0)); - Assertions.assertEquals(3940441182690359236L, response.revision()); + Assertions.assertEquals("macjekn", response.displayName()); + Assertions.assertEquals("hqvcimpevfgmblr", response.members().get(0)); + Assertions.assertEquals(703476384882918279L, response.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java similarity index 71% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java index bce08f426d694..522c0cf3a6bc3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesGetWithResponseMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkVirtualMachinesGetWithResponseMockTests { +public final class WorkloadNetworksGetVirtualMachineWithResponseMockTests { @Test - public void testGetWithResponse() throws Exception { + public void testGetVirtualMachineWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"gqqnobpudcda\",\"vmType\":\"EDGE\"},\"id\":\"pwyawbz\",\"name\":\"sqbuc\",\"type\":\"jg\"}"; + = "{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"pjui\",\"vmType\":\"REGULAR\"},\"id\":\"k\",\"name\":\"dzf\",\"type\":\"azivjlfrqttbajl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,10 +30,11 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - WorkloadNetworkVirtualMachine response = manager.workloadNetworkVirtualMachines() - .getWithResponse("efqsfapaqtferrqw", "x", "kmfx", com.azure.core.util.Context.NONE) + WorkloadNetworkVirtualMachine response = manager.workloadNetworks() + .getVirtualMachineWithResponse("minsgowzf", "tsttktlahbq", "ctxtgzukxi", "mmqtgqqqxhr", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gqqnobpudcda", response.displayName()); + Assertions.assertEquals("pjui", 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 index e2bd5a1187dfe..8a7d270979b55 100644 --- 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 @@ -20,7 +20,7 @@ public final class WorkloadNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"pmyyefrpmpdnqq\",\"name\":\"ka\",\"type\":\"ao\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"nqfiufxqknpi\",\"name\":\"gnepttwqmsni\",\"type\":\"fcdmqnrojlpijn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetwork response = manager.workloadNetworks() - .getWithResponse("vcpwpgclrc", "vtsoxf", com.azure.core.util.Context.NONE) + .getWithResponse("uu", "fdlwg", "ytsbwtovv", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java similarity index 66% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java index db90e35a0f28a..cdc4bb74af978 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpConfigurationsListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkDhcpConfigurationsListMockTests { +public final class WorkloadNetworksListDhcpMockTests { @Test - public void testList() throws Exception { + public void testListDhcp() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"fhpfeoajvgcxtx\",\"segments\":[\"heafidlt\",\"gsresmkssj\"],\"provisioningState\":\"Canceled\",\"revision\":8087831620363185447},\"id\":\"kfwegprhptillu\",\"name\":\"biqtgdq\",\"type\":\"hm\"}]}"; + = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"g\",\"segments\":[\"nfqn\",\"cypsxjv\",\"oimwkslirc\"],\"provisioningState\":\"Failed\",\"revision\":8449348931909561214},\"id\":\"fceacvlhvygd\",\"name\":\"ftumrtwnawjslbiw\",\"type\":\"ojgcyzt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworkDhcpConfigurations().list("bwnhhtql", "ehgpp", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listDhcp("gxmrhublwp", "esutrgjupauutpw", "qhih", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fhpfeoajvgcxtx", response.iterator().next().properties().displayName()); - Assertions.assertEquals(8087831620363185447L, response.iterator().next().properties().revision()); + Assertions.assertEquals("g", response.iterator().next().properties().displayName()); + Assertions.assertEquals(8449348931909561214L, response.iterator().next().properties().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java similarity index 55% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java index b697e54acaa3a..662bf39cd6bad 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkDnsServicesListMockTests { +public final class WorkloadNetworksListDnsServicesMockTests { @Test - public void testList() throws Exception { + public void testListDnsServices() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"sdaultxij\",\"dnsServiceIp\":\"mfqwa\",\"defaultDnsZone\":\"nqnm\",\"fqdnZones\":[\"gzqdqxtbjwgn\"],\"logLevel\":\"FATAL\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":1005110077026259439},\"id\":\"kzhajqglcfhm\",\"name\":\"rqryxynqn\",\"type\":\"rd\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"ligovibrxkpm\",\"dnsServiceIp\":\"azur\",\"defaultDnsZone\":\"cbgoor\",\"fqdnZones\":[\"oybfhjxakvvj\",\"slordilmyww\",\"kgkxn\",\"edabgyvudtjue\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":8529210988663924924},\"id\":\"j\",\"name\":\"xccybvpa\",\"type\":\"akkud\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworkDnsServices().list("yexaoguy", "i", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listDnsServices("atnwxyiopi", "kqqfk", "vscx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sdaultxij", response.iterator().next().displayName()); - Assertions.assertEquals("mfqwa", response.iterator().next().dnsServiceIp()); - Assertions.assertEquals("nqnm", response.iterator().next().defaultDnsZone()); - Assertions.assertEquals("gzqdqxtbjwgn", response.iterator().next().fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.iterator().next().logLevel()); - Assertions.assertEquals(1005110077026259439L, response.iterator().next().revision()); + Assertions.assertEquals("ligovibrxkpm", response.iterator().next().displayName()); + Assertions.assertEquals("azur", response.iterator().next().dnsServiceIp()); + Assertions.assertEquals("cbgoor", response.iterator().next().defaultDnsZone()); + Assertions.assertEquals("oybfhjxakvvj", response.iterator().next().fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, response.iterator().next().logLevel()); + Assertions.assertEquals(8529210988663924924L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java similarity index 53% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java index ceda835e23602..337770a37aab1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkDnsZonesListMockTests { +public final class WorkloadNetworksListDnsZonesMockTests { @Test - public void testList() throws Exception { + public void testListDnsZones() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"kbsazgak\",\"domain\":[\"yrcmjdmspofap\",\"uhrylniofr\",\"gbzjedmstkv\"],\"dnsServerIps\":[\"xbcuiiznkt\"],\"sourceIp\":\"ansnvp\",\"dnsServices\":6971042774632852022,\"provisioningState\":\"Succeeded\",\"revision\":4456554415141615101},\"id\":\"z\",\"name\":\"kiwbuqnyoph\",\"type\":\"fy\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"ykzkdncjdxo\",\"domain\":[\"oggculapz\",\"y\",\"pgogtqxepny\"],\"dnsServerIps\":[\"uajlyj\",\"lvofqzhvfcibyfmo\"],\"sourceIp\":\"xrkjpvdw\",\"dnsServices\":4789424331234549662,\"provisioningState\":\"Succeeded\",\"revision\":4970789347057836253},\"id\":\"bhyzsxjr\",\"name\":\"ambtrnegvm\",\"type\":\"vuqeqvldspast\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworkDnsZones().list("felisdjub", "gbqi", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listDnsZones("oqcaaewdaomdj", "l", "jxxkzbrmsgei", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kbsazgak", response.iterator().next().displayName()); - Assertions.assertEquals("yrcmjdmspofap", response.iterator().next().domain().get(0)); - Assertions.assertEquals("xbcuiiznkt", response.iterator().next().dnsServerIps().get(0)); - Assertions.assertEquals("ansnvp", response.iterator().next().sourceIp()); - Assertions.assertEquals(6971042774632852022L, response.iterator().next().dnsServices()); - Assertions.assertEquals(4456554415141615101L, response.iterator().next().revision()); + Assertions.assertEquals("ykzkdncjdxo", response.iterator().next().displayName()); + Assertions.assertEquals("oggculapz", response.iterator().next().domain().get(0)); + Assertions.assertEquals("uajlyj", response.iterator().next().dnsServerIps().get(0)); + Assertions.assertEquals("xrkjpvdw", response.iterator().next().sourceIp()); + Assertions.assertEquals(4789424331234549662L, response.iterator().next().dnsServices()); + Assertions.assertEquals(4970789347057836253L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java similarity index 75% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java index fb91687f9fabc..af4baf2ab331f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewaysListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkGatewaysListMockTests { +public final class WorkloadNetworksListGatewaysMockTests { @Test - public void testList() throws Exception { + public void testListGateways() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"izozsd\",\"path\":\"cxjmonfdgnwncyp\"},\"id\":\"w\",\"name\":\"ltv\",\"type\":\"qjctzenkeif\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"zqljyxgtczh\",\"path\":\"dbsdshm\"},\"id\":\"maehvbbxurip\",\"name\":\"tfnhtbaxkgxywr\",\"type\":\"kpyklyhp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworkGateways().list("xlpm", "erbdk", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listGateways("ssxmojms", "p", "jpr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("izozsd", response.iterator().next().displayName()); + Assertions.assertEquals("zqljyxgtczh", 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 index b22e288cdd161..e11a10a54e1dd 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"kxlzyqdrfeg\",\"name\":\"ealzxwhcansymoyq\",\"type\":\"lwigdivbkbx\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"wqknfdn\",\"name\":\"wjchrdg\",\"type\":\"ihxumwctondzj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().list("vmm", "npqfrtqlkzmeg", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().list("bfpncurdo", "wiithtywub", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java similarity index 62% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java index 8d4c6a9f97f37..3756fdec7aa85 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringProfilesListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java @@ -19,11 +19,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkPortMirroringProfilesListMockTests { +public final class WorkloadNetworksListPortMirroringMockTests { @Test - public void testList() throws Exception { + public void testListPortMirroring() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"iexzsrzpge\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"bb\",\"destination\":\"pgdakchzyvli\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":1136926754194157082},\"id\":\"ibn\",\"name\":\"mysu\",\"type\":\"swqrntvlwijp\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"kkqfqjbvle\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"luiqtqzfavyvnqq\",\"destination\":\"aryeu\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":6983272609248896319},\"id\":\"zslesjcbher\",\"name\":\"ntiew\",\"type\":\"jcvb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworkPortMirroringProfiles() - .list("hnomdrkywuh", "svfuurutlwexxwl", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().listPortMirroring("wcoezbrhub", "kh", "dyg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("iexzsrzpge", response.iterator().next().displayName()); + Assertions.assertEquals("kkqfqjbvle", response.iterator().next().displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.iterator().next().direction()); - Assertions.assertEquals("bb", response.iterator().next().source()); - Assertions.assertEquals("pgdakchzyvli", response.iterator().next().destination()); - Assertions.assertEquals(1136926754194157082L, response.iterator().next().revision()); + Assertions.assertEquals("luiqtqzfavyvnqq", response.iterator().next().source()); + Assertions.assertEquals("aryeu", response.iterator().next().destination()); + Assertions.assertEquals(6983272609248896319L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java similarity index 63% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java index 170227bb10a72..bed570659ae3a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpsListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkPublicIpsListMockTests { +public final class WorkloadNetworksListPublicIPsMockTests { @Test - public void testList() throws Exception { + public void testListPublicIPs() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"oxuztrksx\",\"numberOfPublicIPs\":6940085023434351835,\"publicIPBlock\":\"cpfnznthjtwkja\",\"provisioningState\":\"Deleting\"},\"id\":\"uzvoamktcqiosm\",\"name\":\"bzahgxqd\",\"type\":\"yrtltlaprltzkat\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"ysdzhez\",\"numberOfPublicIPs\":168889850294802067,\"publicIPBlock\":\"qyuvvfonkp\",\"provisioningState\":\"Updating\"},\"id\":\"ikvylauya\",\"name\":\"luwmncst\",\"type\":\"ijf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworkPublicIps().list("rytfmpcycil", "mcayk", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listPublicIPs("xqvkjlmxhomdyn", "dwdigumb", "raauzzpt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("oxuztrksx", response.iterator().next().displayName()); - Assertions.assertEquals(6940085023434351835L, response.iterator().next().numberOfPublicIPs()); + Assertions.assertEquals("ysdzhez", response.iterator().next().displayName()); + Assertions.assertEquals(168889850294802067L, response.iterator().next().numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java similarity index 50% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java index 5db4759569ca2..f7e312933f575 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkSegmentsListMockTests { +public final class WorkloadNetworksListSegmentsMockTests { @Test - public void testList() throws Exception { + public void testListSegments() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"kjsqzhzbezkgi\",\"connectedGateway\":\"idxas\",\"subnet\":{\"dhcpRanges\":[\"yvvjskgfmo\",\"wa\",\"pqg\",\"tjeaahhvjhh\"],\"gatewayAddress\":\"kzyb\"},\"portVif\":[{\"portName\":\"dj\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":8248669428764587059},\"id\":\"evblbje\",\"name\":\"nljlageuaulx\",\"type\":\"nsmjbnkppxynen\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"yzhftwesgogczh\",\"connectedGateway\":\"nxkrlgnyhmossxkk\",\"subnet\":{\"dhcpRanges\":[\"rghxjb\",\"hqxvcxgfrpdsofbs\",\"rnsvbuswd\",\"z\"],\"gatewayAddress\":\"bycnunvjsrtkf\"},\"portVif\":[{\"portName\":\"pqgik\"},{\"portName\":\"irtx\"},{\"portName\":\"uxzejntpsew\"},{\"portName\":\"oi\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":1902366482512122706},\"id\":\"qmi\",\"name\":\"ox\",\"type\":\"rgguf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworkSegments().list("omfaj", "wasqvdaeyyg", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listSegments("rxfrddhc", "atiz", "ronasxift", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kjsqzhzbezkgi", response.iterator().next().displayName()); - Assertions.assertEquals("idxas", response.iterator().next().connectedGateway()); - Assertions.assertEquals("yvvjskgfmo", response.iterator().next().subnet().dhcpRanges().get(0)); - Assertions.assertEquals("kzyb", response.iterator().next().subnet().gatewayAddress()); - Assertions.assertEquals(8248669428764587059L, response.iterator().next().revision()); + Assertions.assertEquals("yzhftwesgogczh", response.iterator().next().displayName()); + Assertions.assertEquals("nxkrlgnyhmossxkk", response.iterator().next().connectedGateway()); + Assertions.assertEquals("rghxjb", response.iterator().next().subnet().dhcpRanges().get(0)); + Assertions.assertEquals("bycnunvjsrtkf", response.iterator().next().subnet().gatewayAddress()); + Assertions.assertEquals(1902366482512122706L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java similarity index 60% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java index 876373c4eaed2..b5a3eb7df77f0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVmGroupsListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkVmGroupsListMockTests { +public final class WorkloadNetworksListVMGroupsMockTests { @Test - public void testList() throws Exception { + public void testListVMGroups() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"ykprlpyznu\",\"members\":[\"dsmexiitdfux\",\"yasiibmiy\",\"nnust\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":5871871887515703016},\"id\":\"xhcmavmqfoudo\",\"name\":\"hcgyyprotwyp\",\"type\":\"ndm\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"bqplh\",\"members\":[\"uuepzlrphwzsoldw\",\"yuqdu\",\"vmnnrw\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":7474437390455039579},\"id\":\"ywjhhgdnhx\",\"name\":\"sivfomilo\",\"type\":\"ggdufiqndieu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworkVmGroups().list("linmfgv", "irpghriypoqeyh", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listVMGroups("epn", "bjcrxgibbdaxco", "fozauorsuk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ykprlpyznu", response.iterator().next().displayName()); - Assertions.assertEquals("dsmexiitdfux", response.iterator().next().members().get(0)); - Assertions.assertEquals(5871871887515703016L, response.iterator().next().revision()); + Assertions.assertEquals("bqplh", response.iterator().next().displayName()); + Assertions.assertEquals("uuepzlrphwzsoldw", response.iterator().next().members().get(0)); + Assertions.assertEquals(7474437390455039579L, response.iterator().next().revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java similarity index 74% rename from sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListMockTests.java rename to sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java index 232b894b26172..a60ed331609d6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworkVirtualMachinesListMockTests { +public final class WorkloadNetworksListVirtualMachinesMockTests { @Test - public void testList() throws Exception { + public void testListVirtualMachines() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"prsnmokayzejn\",\"vmType\":\"REGULAR\"},\"id\":\"pbzpcpiljhahz\",\"name\":\"echndbnwieholew\",\"type\":\"wiuub\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"l\",\"vmType\":\"REGULAR\"},\"id\":\"oupfgfb\",\"name\":\"jub\",\"type\":\"yhgk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworkVirtualMachines() - .list("utmzlbiojlvfhrbb", "neqvcwwyyurmo", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listVirtualMachines("pi", "lqol", "xkcgxxlxsffgcvi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("prsnmokayzejn", response.iterator().next().displayName()); + Assertions.assertEquals("l", response.iterator().next().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml index 574b9dd551420..91364d1b47909 100644 --- a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/vmware/Microsoft.AVS.Management -commit: 5db81e08da03650110855746e8eefd0f811b471d +commit: a434707db696a6915e18cafa1ea60a171da0e15f repo: Azure/azure-rest-api-specs additionalDirectories: From 6717938f43766891ae13122bcf036141bd6caafb Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 23 Jul 2024 12:40:57 +0800 Subject: [PATCH 13/17] regen --- .../azure/resourcemanager/avs/AvsManager.java | 16 + .../resourcemanager/avs/fluent/AvsClient.java | 7 + .../avs/fluent/ScriptExecutionsClient.java | 235 ++++ .../fluent/models/ScriptExecutionInner.java | 411 ++++++ .../models/ScriptExecutionProperties.java | 451 +++++++ .../avs/implementation/AvsClientImpl.java | 16 + .../implementation/ScriptExecutionImpl.java | 274 ++++ .../ScriptExecutionsClientImpl.java | 1111 +++++++++++++++++ .../implementation/ScriptExecutionsImpl.java | 183 +++ .../models/ScriptExecutionsList.java | 113 ++ .../PSCredentialExecutionParameter.java | 155 +++ .../avs/models/ScriptExecution.java | 518 ++++++++ .../avs/models/ScriptExecutionParameter.java | 148 +++ .../models/ScriptExecutionParameterType.java | 56 + .../ScriptExecutionPropertiesNamedOutput.java | 65 + .../ScriptExecutionProvisioningState.java | 81 ++ .../avs/models/ScriptExecutions.java | 175 +++ .../avs/models/ScriptOutputStreamType.java | 61 + .../ScriptSecureStringExecutionParameter.java | 127 ++ .../ScriptStringExecutionParameter.java | 127 ++ .../proxy-config.json | 2 +- .../avs/generated/IscsiPathInnerTests.java | 8 +- .../generated/IscsiPathListResultTests.java | 6 +- .../generated/IscsiPathPropertiesTests.java | 8 +- .../generated/ScriptExecutionInnerTests.java | 68 + .../ScriptExecutionParameterTests.java | 26 + ...ptExecutionPropertiesNamedOutputTests.java | 22 + .../ScriptExecutionPropertiesTests.java | 67 + .../generated/ScriptExecutionsListTests.java | 26 + ...ptSecureStringExecutionParameterTests.java | 29 + .../ScriptStringExecutionParameterTests.java | 28 + .../WorkloadNetworkDhcpEntityTests.java | 12 +- .../WorkloadNetworkDhcpInnerTests.java | 14 +- .../WorkloadNetworkDhcpListTests.java | 8 +- .../WorkloadNetworkDhcpRelayTests.java | 20 +- .../WorkloadNetworkDhcpServerTests.java | 26 +- .../WorkloadNetworkDnsServiceInnerTests.java | 38 +- ...kloadNetworkDnsServicePropertiesTests.java | 39 +- .../WorkloadNetworkDnsServicesListTests.java | 16 +- .../WorkloadNetworkDnsZoneInnerTests.java | 38 +- ...WorkloadNetworkDnsZonePropertiesTests.java | 39 +- .../WorkloadNetworkDnsZonesListTests.java | 16 +- .../WorkloadNetworkGatewayInnerTests.java | 4 +- .../WorkloadNetworkGatewayListTests.java | 6 +- ...WorkloadNetworkGatewayPropertiesTests.java | 4 +- .../generated/WorkloadNetworkInnerTests.java | 2 +- .../generated/WorkloadNetworkListTests.java | 4 +- ...orkloadNetworkPortMirroringInnerTests.java | 26 +- ...WorkloadNetworkPortMirroringListTests.java | 14 +- ...adNetworkPortMirroringPropertiesTests.java | 32 +- .../WorkloadNetworkPropertiesTests.java | 2 +- .../WorkloadNetworkPublicIPsListTests.java | 8 +- .../WorkloadNetworkPublicIpInnerTests.java | 14 +- ...orkloadNetworkPublicIpPropertiesTests.java | 14 +- .../WorkloadNetworkSegmentInnerTests.java | 32 +- .../WorkloadNetworkSegmentPortVifTests.java | 4 +- ...WorkloadNetworkSegmentPropertiesTests.java | 33 +- .../WorkloadNetworkSegmentSubnetTests.java | 20 +- .../WorkloadNetworkSegmentsListTests.java | 14 +- .../WorkloadNetworkVMGroupInnerTests.java | 20 +- ...WorkloadNetworkVMGroupPropertiesTests.java | 21 +- .../WorkloadNetworkVMGroupsListTests.java | 10 +- ...rkloadNetworkVirtualMachineInnerTests.java | 4 +- ...dNetworkVirtualMachinePropertiesTests.java | 4 +- ...rkloadNetworkVirtualMachinesListTests.java | 6 +- .../WorkloadNetworksCreateDhcpMockTests.java | 12 +- ...loadNetworksCreateDnsServiceMockTests.java | 30 +- ...orkloadNetworksCreateDnsZoneMockTests.java | 30 +- ...dNetworksCreatePortMirroringMockTests.java | 26 +- ...rkloadNetworksCreatePublicIPMockTests.java | 14 +- ...orkloadNetworksCreateSegmentMockTests.java | 26 +- ...orkloadNetworksCreateVMGroupMockTests.java | 18 +- .../WorkloadNetworksDeleteDhcpMockTests.java | 3 +- ...loadNetworksDeleteDnsServiceMockTests.java | 3 +- ...orkloadNetworksDeleteDnsZoneMockTests.java | 3 +- ...dNetworksDeletePortMirroringMockTests.java | 3 +- ...rkloadNetworksDeletePublicIPMockTests.java | 2 +- ...orkloadNetworksDeleteSegmentMockTests.java | 3 +- ...orkloadNetworksDeleteVMGroupMockTests.java | 2 +- ...dNetworksGetDhcpWithResponseMockTests.java | 8 +- ...rksGetDnsServiceWithResponseMockTests.java | 17 +- ...tworksGetDnsZoneWithResponseMockTests.java | 17 +- ...tworksGetGatewayWithResponseMockTests.java | 6 +- ...GetPortMirroringWithResponseMockTests.java | 12 +- ...worksGetPublicIPWithResponseMockTests.java | 8 +- ...tworksGetSegmentWithResponseMockTests.java | 14 +- ...tworksGetVMGroupWithResponseMockTests.java | 11 +- ...etVirtualMachineWithResponseMockTests.java | 6 +- ...kloadNetworksGetWithResponseMockTests.java | 4 +- .../WorkloadNetworksListDhcpMockTests.java | 10 +- ...kloadNetworksListDnsServicesMockTests.java | 16 +- ...WorkloadNetworksListDnsZonesMockTests.java | 16 +- ...WorkloadNetworksListGatewaysMockTests.java | 8 +- .../WorkloadNetworksListMockTests.java | 4 +- ...oadNetworksListPortMirroringMockTests.java | 14 +- ...orkloadNetworksListPublicIPsMockTests.java | 10 +- ...WorkloadNetworksListSegmentsMockTests.java | 16 +- ...WorkloadNetworksListVMGroupsMockTests.java | 10 +- ...dNetworksListVirtualMachinesMockTests.java | 6 +- .../tsp-location.yaml | 2 +- 100 files changed, 5087 insertions(+), 487 deletions(-) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionPropertiesNamedOutput.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesNamedOutputTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java 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 47530807472d1..085c3f9c42b63 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 @@ -38,6 +38,7 @@ import com.azure.resourcemanager.avs.implementation.PlacementPoliciesImpl; import com.azure.resourcemanager.avs.implementation.PrivateCloudsImpl; 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.VirtualMachinesImpl; import com.azure.resourcemanager.avs.implementation.WorkloadNetworksImpl; @@ -54,6 +55,7 @@ import com.azure.resourcemanager.avs.models.PlacementPolicies; import com.azure.resourcemanager.avs.models.PrivateClouds; 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.VirtualMachines; import com.azure.resourcemanager.avs.models.WorkloadNetworks; @@ -97,6 +99,8 @@ public final class AvsManager { private ScriptCmdlets scriptCmdlets; + private ScriptExecutions scriptExecutions; + private IscsiPaths iscsiPaths; private WorkloadNetworks workloadNetworks; @@ -480,6 +484,18 @@ public ScriptCmdlets scriptCmdlets() { return scriptCmdlets; } + /** + * Gets the resource collection API of ScriptExecutions. It manages ScriptExecution. + * + * @return Resource collection API of ScriptExecutions. + */ + public ScriptExecutions scriptExecutions() { + if (this.scriptExecutions == null) { + this.scriptExecutions = new ScriptExecutionsImpl(clientObject.getScriptExecutions(), this); + } + return scriptExecutions; + } + /** * Gets the resource collection API of IscsiPaths. It manages IscsiPath. * 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 a4089d69ab5b2..73c423f679dd0 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 @@ -144,6 +144,13 @@ public interface AvsClient { */ ScriptCmdletsClient getScriptCmdlets(); + /** + * Gets the ScriptExecutionsClient object to access its operations. + * + * @return the ScriptExecutionsClient object. + */ + ScriptExecutionsClient getScriptExecutions(); + /** * Gets the IscsiPathsClient object to access its operations. * diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java new file mode 100644 index 0000000000000..063951a11565d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ScriptExecutionInner; +import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; +import java.util.List; + +/** + * An instance of this class provides access to all the operations defined in ScriptExecutionsClient. + */ +public interface ScriptExecutionsClient { + /** + * List ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context); + + /** + * Get a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName); + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScriptExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution); + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ScriptExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context); + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution); + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution, Context context); + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName); + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context); + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName); + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + + /** + * Return the logs for a script execution resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An + * empty array will return nothing. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, List scriptOutputStreamType, Context context); + + /** + * Return the logs for a script execution resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ScriptExecutionInner getExecutionLogs(String resourceGroupName, String privateCloudName, + String scriptExecutionName); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java new file mode 100644 index 0000000000000..5293cf0b63aac --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java @@ -0,0 +1,411 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ScriptExecutionParameter; +import com.azure.resourcemanager.avs.models.ScriptExecutionPropertiesNamedOutput; +import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** + * An instance of a script executed by a user - custom or AVS. + */ +@Fluent +public final class ScriptExecutionInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ScriptExecutionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + + /** + * Creates an instance of ScriptExecutionInner class. + */ + public ScriptExecutionInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private ScriptExecutionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. + * + * @return the scriptCmdletId value. + */ + public String scriptCmdletId() { + return this.innerProperties() == null ? null : this.innerProperties().scriptCmdletId(); + } + + /** + * Set the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. + * + * @param scriptCmdletId the scriptCmdletId value to set. + * @return the ScriptExecutionInner object itself. + */ + public ScriptExecutionInner withScriptCmdletId(String scriptCmdletId) { + if (this.innerProperties() == null) { + this.innerProperties = new ScriptExecutionProperties(); + } + this.innerProperties().withScriptCmdletId(scriptCmdletId); + return this; + } + + /** + * Get the parameters property: Parameters the script will accept. + * + * @return the parameters value. + */ + public List parameters() { + return this.innerProperties() == null ? null : this.innerProperties().parameters(); + } + + /** + * Set the parameters property: Parameters the script will accept. + * + * @param parameters the parameters value to set. + * @return the ScriptExecutionInner object itself. + */ + public ScriptExecutionInner withParameters(List parameters) { + if (this.innerProperties() == null) { + this.innerProperties = new ScriptExecutionProperties(); + } + this.innerProperties().withParameters(parameters); + return this; + } + + /** + * Get the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials. + * + * @return the hiddenParameters value. + */ + public List hiddenParameters() { + return this.innerProperties() == null ? null : this.innerProperties().hiddenParameters(); + } + + /** + * Set the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials. + * + * @param hiddenParameters the hiddenParameters value to set. + * @return the ScriptExecutionInner object itself. + */ + public ScriptExecutionInner withHiddenParameters(List hiddenParameters) { + if (this.innerProperties() == null) { + this.innerProperties = new ScriptExecutionProperties(); + } + this.innerProperties().withHiddenParameters(hiddenParameters); + return this; + } + + /** + * Get the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.innerProperties() == null ? null : this.innerProperties().failureReason(); + } + + /** + * Set the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * + * @param failureReason the failureReason value to set. + * @return the ScriptExecutionInner object itself. + */ + public ScriptExecutionInner withFailureReason(String failureReason) { + if (this.innerProperties() == null) { + this.innerProperties = new ScriptExecutionProperties(); + } + this.innerProperties().withFailureReason(failureReason); + return this; + } + + /** + * Get the timeout property: Time limit for execution. + * + * @return the timeout value. + */ + public String timeout() { + return this.innerProperties() == null ? null : this.innerProperties().timeout(); + } + + /** + * Set the timeout property: Time limit for execution. + * + * @param timeout the timeout value to set. + * @return the ScriptExecutionInner object itself. + */ + public ScriptExecutionInner withTimeout(String timeout) { + if (this.innerProperties() == null) { + this.innerProperties = new ScriptExecutionProperties(); + } + this.innerProperties().withTimeout(timeout); + return this; + } + + /** + * Get the retention property: Time to live for the resource. If not provided, will be available for 60 days. + * + * @return the retention value. + */ + public String retention() { + return this.innerProperties() == null ? null : this.innerProperties().retention(); + } + + /** + * Set the retention property: Time to live for the resource. If not provided, will be available for 60 days. + * + * @param retention the retention value to set. + * @return the ScriptExecutionInner object itself. + */ + public ScriptExecutionInner withRetention(String retention) { + if (this.innerProperties() == null) { + this.innerProperties = new ScriptExecutionProperties(); + } + this.innerProperties().withRetention(retention); + return this; + } + + /** + * Get the submittedAt property: Time the script execution was submitted. + * + * @return the submittedAt value. + */ + public OffsetDateTime submittedAt() { + return this.innerProperties() == null ? null : this.innerProperties().submittedAt(); + } + + /** + * Get the startedAt property: Time the script execution was started. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.innerProperties() == null ? null : this.innerProperties().startedAt(); + } + + /** + * Get the finishedAt property: Time the script execution was finished. + * + * @return the finishedAt value. + */ + public OffsetDateTime finishedAt() { + return this.innerProperties() == null ? null : this.innerProperties().finishedAt(); + } + + /** + * Get the provisioningState property: The state of the script execution resource. + * + * @return the provisioningState value. + */ + public ScriptExecutionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the output property: Standard output stream from the powershell execution. + * + * @return the output value. + */ + public List output() { + return this.innerProperties() == null ? null : this.innerProperties().output(); + } + + /** + * Set the output property: Standard output stream from the powershell execution. + * + * @param output the output value to set. + * @return the ScriptExecutionInner object itself. + */ + public ScriptExecutionInner withOutput(List output) { + if (this.innerProperties() == null) { + this.innerProperties = new ScriptExecutionProperties(); + } + this.innerProperties().withOutput(output); + return this; + } + + /** + * Get the namedOutputs property: User-defined dictionary. + * + * @return the namedOutputs value. + */ + public Map namedOutputs() { + return this.innerProperties() == null ? null : this.innerProperties().namedOutputs(); + } + + /** + * Set the namedOutputs property: User-defined dictionary. + * + * @param namedOutputs the namedOutputs value to set. + * @return the ScriptExecutionInner object itself. + */ + public ScriptExecutionInner withNamedOutputs(Map namedOutputs) { + if (this.innerProperties() == null) { + this.innerProperties = new ScriptExecutionProperties(); + } + this.innerProperties().withNamedOutputs(namedOutputs); + return this; + } + + /** + * Get the information property: Standard information out stream from the powershell execution. + * + * @return the information value. + */ + public List information() { + return this.innerProperties() == null ? null : this.innerProperties().information(); + } + + /** + * Get the warnings property: Standard warning out stream from the powershell execution. + * + * @return the warnings value. + */ + public List warnings() { + return this.innerProperties() == null ? null : this.innerProperties().warnings(); + } + + /** + * Get the errors property: Standard error output stream from the powershell execution. + * + * @return the errors value. + */ + public List errors() { + return this.innerProperties() == null ? null : this.innerProperties().errors(); + } + + /** + * 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 ScriptExecutionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptExecutionInner 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 ScriptExecutionInner. + */ + public static ScriptExecutionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptExecutionInner deserializedScriptExecutionInner = new ScriptExecutionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedScriptExecutionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedScriptExecutionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScriptExecutionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedScriptExecutionInner.innerProperties = ScriptExecutionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedScriptExecutionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptExecutionInner; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java new file mode 100644 index 0000000000000..85990808d928f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java @@ -0,0 +1,451 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +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.ScriptExecutionParameter; +import com.azure.resourcemanager.avs.models.ScriptExecutionPropertiesNamedOutput; +import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** + * Properties of a user-invoked script. + */ +@Fluent +public final class ScriptExecutionProperties implements JsonSerializable { + /* + * A reference to the script cmdlet resource if user is running a AVS script + */ + private String scriptCmdletId; + + /* + * Parameters the script will accept + */ + private List parameters; + + /* + * Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials + */ + private List hiddenParameters; + + /* + * Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception + */ + private String failureReason; + + /* + * Time limit for execution + */ + private String timeout; + + /* + * Time to live for the resource. If not provided, will be available for 60 days + */ + private String retention; + + /* + * Time the script execution was submitted + */ + private OffsetDateTime submittedAt; + + /* + * Time the script execution was started + */ + private OffsetDateTime startedAt; + + /* + * Time the script execution was finished + */ + private OffsetDateTime finishedAt; + + /* + * The state of the script execution resource + */ + private ScriptExecutionProvisioningState provisioningState; + + /* + * Standard output stream from the powershell execution + */ + private List output; + + /* + * User-defined dictionary. + */ + private Map namedOutputs; + + /* + * Standard information out stream from the powershell execution + */ + private List information; + + /* + * Standard warning out stream from the powershell execution + */ + private List warnings; + + /* + * Standard error output stream from the powershell execution + */ + private List errors; + + /** + * Creates an instance of ScriptExecutionProperties class. + */ + public ScriptExecutionProperties() { + } + + /** + * Get the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. + * + * @return the scriptCmdletId value. + */ + public String scriptCmdletId() { + return this.scriptCmdletId; + } + + /** + * Set the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. + * + * @param scriptCmdletId the scriptCmdletId value to set. + * @return the ScriptExecutionProperties object itself. + */ + public ScriptExecutionProperties withScriptCmdletId(String scriptCmdletId) { + this.scriptCmdletId = scriptCmdletId; + return this; + } + + /** + * Get the parameters property: Parameters the script will accept. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Parameters the script will accept. + * + * @param parameters the parameters value to set. + * @return the ScriptExecutionProperties object itself. + */ + public ScriptExecutionProperties withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials. + * + * @return the hiddenParameters value. + */ + public List hiddenParameters() { + return this.hiddenParameters; + } + + /** + * Set the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials. + * + * @param hiddenParameters the hiddenParameters value to set. + * @return the ScriptExecutionProperties object itself. + */ + public ScriptExecutionProperties withHiddenParameters(List hiddenParameters) { + this.hiddenParameters = hiddenParameters; + return this; + } + + /** + * Get the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Set the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * + * @param failureReason the failureReason value to set. + * @return the ScriptExecutionProperties object itself. + */ + public ScriptExecutionProperties withFailureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + /** + * Get the timeout property: Time limit for execution. + * + * @return the timeout value. + */ + public String timeout() { + return this.timeout; + } + + /** + * Set the timeout property: Time limit for execution. + * + * @param timeout the timeout value to set. + * @return the ScriptExecutionProperties object itself. + */ + public ScriptExecutionProperties withTimeout(String timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get the retention property: Time to live for the resource. If not provided, will be available for 60 days. + * + * @return the retention value. + */ + public String retention() { + return this.retention; + } + + /** + * Set the retention property: Time to live for the resource. If not provided, will be available for 60 days. + * + * @param retention the retention value to set. + * @return the ScriptExecutionProperties object itself. + */ + public ScriptExecutionProperties withRetention(String retention) { + this.retention = retention; + return this; + } + + /** + * Get the submittedAt property: Time the script execution was submitted. + * + * @return the submittedAt value. + */ + public OffsetDateTime submittedAt() { + return this.submittedAt; + } + + /** + * Get the startedAt property: Time the script execution was started. + * + * @return the startedAt value. + */ + public OffsetDateTime startedAt() { + return this.startedAt; + } + + /** + * Get the finishedAt property: Time the script execution was finished. + * + * @return the finishedAt value. + */ + public OffsetDateTime finishedAt() { + return this.finishedAt; + } + + /** + * Get the provisioningState property: The state of the script execution resource. + * + * @return the provisioningState value. + */ + public ScriptExecutionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the output property: Standard output stream from the powershell execution. + * + * @return the output value. + */ + public List output() { + return this.output; + } + + /** + * Set the output property: Standard output stream from the powershell execution. + * + * @param output the output value to set. + * @return the ScriptExecutionProperties object itself. + */ + public ScriptExecutionProperties withOutput(List output) { + this.output = output; + return this; + } + + /** + * Get the namedOutputs property: User-defined dictionary. + * + * @return the namedOutputs value. + */ + public Map namedOutputs() { + return this.namedOutputs; + } + + /** + * Set the namedOutputs property: User-defined dictionary. + * + * @param namedOutputs the namedOutputs value to set. + * @return the ScriptExecutionProperties object itself. + */ + public ScriptExecutionProperties withNamedOutputs(Map namedOutputs) { + this.namedOutputs = namedOutputs; + return this; + } + + /** + * Get the information property: Standard information out stream from the powershell execution. + * + * @return the information value. + */ + public List information() { + return this.information; + } + + /** + * Get the warnings property: Standard warning out stream from the powershell execution. + * + * @return the warnings value. + */ + public List warnings() { + return this.warnings; + } + + /** + * Get the errors property: Standard error output stream from the powershell execution. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (parameters() != null) { + parameters().forEach(e -> e.validate()); + } + if (hiddenParameters() != null) { + hiddenParameters().forEach(e -> e.validate()); + } + if (timeout() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property timeout in model ScriptExecutionProperties")); + } + if (namedOutputs() != null) { + namedOutputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("timeout", this.timeout); + jsonWriter.writeStringField("scriptCmdletId", this.scriptCmdletId); + jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("hiddenParameters", this.hiddenParameters, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("failureReason", this.failureReason); + jsonWriter.writeStringField("retention", this.retention); + jsonWriter.writeArrayField("output", this.output, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("namedOutputs", this.namedOutputs, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptExecutionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptExecutionProperties 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 ScriptExecutionProperties. + */ + public static ScriptExecutionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptExecutionProperties deserializedScriptExecutionProperties = new ScriptExecutionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("timeout".equals(fieldName)) { + deserializedScriptExecutionProperties.timeout = reader.getString(); + } else if ("scriptCmdletId".equals(fieldName)) { + deserializedScriptExecutionProperties.scriptCmdletId = reader.getString(); + } else if ("parameters".equals(fieldName)) { + List parameters + = reader.readArray(reader1 -> ScriptExecutionParameter.fromJson(reader1)); + deserializedScriptExecutionProperties.parameters = parameters; + } else if ("hiddenParameters".equals(fieldName)) { + List hiddenParameters + = reader.readArray(reader1 -> ScriptExecutionParameter.fromJson(reader1)); + deserializedScriptExecutionProperties.hiddenParameters = hiddenParameters; + } else if ("failureReason".equals(fieldName)) { + deserializedScriptExecutionProperties.failureReason = reader.getString(); + } else if ("retention".equals(fieldName)) { + deserializedScriptExecutionProperties.retention = reader.getString(); + } else if ("submittedAt".equals(fieldName)) { + deserializedScriptExecutionProperties.submittedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("startedAt".equals(fieldName)) { + deserializedScriptExecutionProperties.startedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("finishedAt".equals(fieldName)) { + deserializedScriptExecutionProperties.finishedAt = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedScriptExecutionProperties.provisioningState + = ScriptExecutionProvisioningState.fromString(reader.getString()); + } else if ("output".equals(fieldName)) { + List output = reader.readArray(reader1 -> reader1.getString()); + deserializedScriptExecutionProperties.output = output; + } else if ("namedOutputs".equals(fieldName)) { + Map namedOutputs + = reader.readMap(reader1 -> ScriptExecutionPropertiesNamedOutput.fromJson(reader1)); + deserializedScriptExecutionProperties.namedOutputs = namedOutputs; + } else if ("information".equals(fieldName)) { + List information = reader.readArray(reader1 -> reader1.getString()); + deserializedScriptExecutionProperties.information = information; + } else if ("warnings".equals(fieldName)) { + List warnings = reader.readArray(reader1 -> reader1.getString()); + deserializedScriptExecutionProperties.warnings = warnings; + } else if ("errors".equals(fieldName)) { + List errors = reader.readArray(reader1 -> reader1.getString()); + deserializedScriptExecutionProperties.errors = errors; + } else { + reader.skipChildren(); + } + } + + return deserializedScriptExecutionProperties; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index 1b45775aa8262..ddbc989cf2536 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java @@ -37,6 +37,7 @@ import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; import com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient; +import com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient; import com.azure.resourcemanager.avs.fluent.ScriptPackagesClient; import com.azure.resourcemanager.avs.fluent.VirtualMachinesClient; import com.azure.resourcemanager.avs.fluent.WorkloadNetworksClient; @@ -334,6 +335,20 @@ public ScriptCmdletsClient getScriptCmdlets() { return this.scriptCmdlets; } + /** + * The ScriptExecutionsClient object to access its operations. + */ + private final ScriptExecutionsClient scriptExecutions; + + /** + * Gets the ScriptExecutionsClient object to access its operations. + * + * @return the ScriptExecutionsClient object. + */ + public ScriptExecutionsClient getScriptExecutions() { + return this.scriptExecutions; + } + /** * The IscsiPathsClient object to access its operations. */ @@ -394,6 +409,7 @@ public WorkloadNetworksClient getWorkloadNetworks() { this.placementPolicies = new PlacementPoliciesClientImpl(this); this.scriptPackages = new ScriptPackagesClientImpl(this); this.scriptCmdlets = new ScriptCmdletsClientImpl(this); + this.scriptExecutions = new ScriptExecutionsClientImpl(this); this.iscsiPaths = new IscsiPathsClientImpl(this); this.workloadNetworks = new WorkloadNetworksClientImpl(this); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java new file mode 100644 index 0000000000000..0d09cad4a4cd7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; +import com.azure.resourcemanager.avs.models.ScriptExecution; +import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; +import com.azure.resourcemanager.avs.models.ScriptExecutionPropertiesNamedOutput; +import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; +import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ScriptExecutionImpl implements ScriptExecution, ScriptExecution.Definition, ScriptExecution.Update { + private ScriptExecutionInner 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 scriptCmdletId() { + return this.innerModel().scriptCmdletId(); + } + + public List parameters() { + List inner = this.innerModel().parameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List hiddenParameters() { + List inner = this.innerModel().hiddenParameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String failureReason() { + return this.innerModel().failureReason(); + } + + public String timeout() { + return this.innerModel().timeout(); + } + + public String retention() { + return this.innerModel().retention(); + } + + public OffsetDateTime submittedAt() { + return this.innerModel().submittedAt(); + } + + public OffsetDateTime startedAt() { + return this.innerModel().startedAt(); + } + + public OffsetDateTime finishedAt() { + return this.innerModel().finishedAt(); + } + + public ScriptExecutionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List output() { + List inner = this.innerModel().output(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Map namedOutputs() { + Map inner = this.innerModel().namedOutputs(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public List information() { + List inner = this.innerModel().information(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List warnings() { + List inner = this.innerModel().warnings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List errors() { + List inner = this.innerModel().errors(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ScriptExecutionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String privateCloudName; + + private String scriptExecutionName; + + public ScriptExecutionImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + this.resourceGroupName = resourceGroupName; + this.privateCloudName = privateCloudName; + return this; + } + + public ScriptExecution create() { + this.innerObject = serviceManager.serviceClient() + .getScriptExecutions() + .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), Context.NONE); + return this; + } + + public ScriptExecution create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScriptExecutions() + .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), context); + return this; + } + + ScriptExecutionImpl(String name, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = new ScriptExecutionInner(); + this.serviceManager = serviceManager; + this.scriptExecutionName = name; + } + + public ScriptExecutionImpl update() { + return this; + } + + public ScriptExecution apply() { + this.innerObject = serviceManager.serviceClient() + .getScriptExecutions() + .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), Context.NONE); + return this; + } + + public ScriptExecution apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScriptExecutions() + .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), context); + return this; + } + + ScriptExecutionImpl(ScriptExecutionInner 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.scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scriptExecutions"); + } + + public ScriptExecution refresh() { + this.innerObject = serviceManager.serviceClient() + .getScriptExecutions() + .getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE) + .getValue(); + return this; + } + + public ScriptExecution refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getScriptExecutions() + .getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, context) + .getValue(); + return this; + } + + public Response getExecutionLogsWithResponse(List scriptOutputStreamType, + Context context) { + return serviceManager.scriptExecutions() + .getExecutionLogsWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType, context); + } + + public ScriptExecution getExecutionLogs() { + return serviceManager.scriptExecutions() + .getExecutionLogs(resourceGroupName, privateCloudName, scriptExecutionName); + } + + public ScriptExecutionImpl withScriptCmdletId(String scriptCmdletId) { + this.innerModel().withScriptCmdletId(scriptCmdletId); + return this; + } + + public ScriptExecutionImpl withParameters(List parameters) { + this.innerModel().withParameters(parameters); + return this; + } + + public ScriptExecutionImpl withHiddenParameters(List hiddenParameters) { + this.innerModel().withHiddenParameters(hiddenParameters); + return this; + } + + public ScriptExecutionImpl withFailureReason(String failureReason) { + this.innerModel().withFailureReason(failureReason); + return this; + } + + public ScriptExecutionImpl withTimeout(String timeout) { + this.innerModel().withTimeout(timeout); + return this; + } + + public ScriptExecutionImpl withRetention(String retention) { + this.innerModel().withRetention(retention); + return this; + } + + public ScriptExecutionImpl withOutput(List output) { + this.innerModel().withOutput(output); + return this; + } + + public ScriptExecutionImpl withNamedOutputs(Map namedOutputs) { + this.innerModel().withNamedOutputs(namedOutputs); + return this; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java new file mode 100644 index 0000000000000..7ebf69bdc28e3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java @@ -0,0 +1,1111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.Post; +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.ScriptExecutionsClient; +import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; +import com.azure.resourcemanager.avs.implementation.models.ScriptExecutionsList; +import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; +import java.nio.ByteBuffer; +import java.util.List; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ScriptExecutionsClient. + */ +public final class ScriptExecutionsClientImpl implements ScriptExecutionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ScriptExecutionsService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of ScriptExecutionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ScriptExecutionsClientImpl(AvsClientImpl client) { + this.service + = RestProxy.create(ScriptExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientScriptExecutions to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AvsClientScriptExecu") + public interface ScriptExecutionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") 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}/scriptExecutions/{scriptExecutionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("accept") String accept, + @BodyParam("application/json") ScriptExecutionInner scriptExecution, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getExecutionLogs(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("accept") String accept, + @BodyParam("application/json") List scriptOutputStreamType, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); + } + + /** + * List ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName) { + 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 ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { + 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 ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution 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 ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { + 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 (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName 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, scriptExecutionName, accept, context); + } + + /** + * Get a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).block(); + } + + /** + * Get a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName) { + return getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE).getValue(); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } + if (scriptExecution == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecution is required and cannot be null.")); + } else { + scriptExecution.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, + scriptExecution, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } + if (scriptExecution == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecution is required and cannot be null.")); + } else { + scriptExecution.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, scriptExecutionName, accept, + scriptExecution, context); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ScriptExecutionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + scriptExecutionName, scriptExecution); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScriptExecutionInner.class, ScriptExecutionInner.class, this.client.getContext()); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ScriptExecutionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + scriptExecutionName, scriptExecution, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScriptExecutionInner.class, ScriptExecutionInner.class, context); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( + String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution) + .getSyncPoller(); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( + String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, + context) + .getSyncPoller(); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, ScriptExecutionInner scriptExecution) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String scriptExecutionName, ScriptExecutionInner scriptExecution) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution).block(); + } + + /** + * Create a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, context) + .block(); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + 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 (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName 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, scriptExecutionName, accept, context); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName).getSyncPoller(); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).getSyncPoller(); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName) { + deleteAsync(resourceGroupName, privateCloudName, scriptExecutionName).block(); + } + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + deleteAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).block(); + } + + /** + * Return the logs for a script execution resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An + * empty array will return nothing. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getExecutionLogsWithResponseAsync(String resourceGroupName, + String privateCloudName, String scriptExecutionName, List scriptOutputStreamType) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getExecutionLogs(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, + scriptOutputStreamType, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Return the logs for a script execution resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An + * empty array will return nothing. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getExecutionLogsWithResponseAsync(String resourceGroupName, + String privateCloudName, String scriptExecutionName, List scriptOutputStreamType, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (scriptExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getExecutionLogs(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, + scriptOutputStreamType, context); + } + + /** + * Return the logs for a script execution resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getExecutionLogsAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + final List scriptOutputStreamType = null; + return getExecutionLogsWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Return the logs for a script execution resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An + * empty array will return nothing. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getExecutionLogsWithResponse(String resourceGroupName, + String privateCloudName, String scriptExecutionName, List scriptOutputStreamType, + Context context) { + return getExecutionLogsWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType, context).block(); + } + + /** + * Return the logs for a script execution resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ScriptExecutionInner getExecutionLogs(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + final List scriptOutputStreamType = null; + return getExecutionLogsWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ScriptExecution 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 ScriptExecution 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/ScriptExecutionsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java new file mode 100644 index 0000000000000..6815b319f0bd3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ScriptExecutionsClient; +import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; +import com.azure.resourcemanager.avs.models.ScriptExecution; +import com.azure.resourcemanager.avs.models.ScriptExecutions; +import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; +import java.util.List; + +public final class ScriptExecutionsImpl implements ScriptExecutions { + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionsImpl.class); + + private final ScriptExecutionsClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public ScriptExecutionsImpl(ScriptExecutionsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String privateCloudName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptExecutionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptExecutionImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScriptExecutionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScriptExecution get(String resourceGroupName, String privateCloudName, String scriptExecutionName) { + ScriptExecutionInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, scriptExecutionName); + if (inner != null) { + return new ScriptExecutionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName) { + this.serviceClient().delete(resourceGroupName, privateCloudName, scriptExecutionName); + } + + public void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + this.serviceClient().delete(resourceGroupName, privateCloudName, scriptExecutionName, context); + } + + public Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, List scriptOutputStreamType, Context context) { + Response inner = this.serviceClient() + .getExecutionLogsWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScriptExecutionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ScriptExecution getExecutionLogs(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + ScriptExecutionInner inner + = this.serviceClient().getExecutionLogs(resourceGroupName, privateCloudName, scriptExecutionName); + if (inner != null) { + return new ScriptExecutionImpl(inner, this.manager()); + } else { + return null; + } + } + + public ScriptExecution 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 scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); + if (scriptExecutionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, 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 scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); + if (scriptExecutionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, 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 scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); + if (scriptExecutionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); + } + this.delete(resourceGroupName, privateCloudName, scriptExecutionName, 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 scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); + if (scriptExecutionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); + } + this.delete(resourceGroupName, privateCloudName, scriptExecutionName, context); + } + + private ScriptExecutionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public ScriptExecutionImpl define(String name) { + return new ScriptExecutionImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java new file mode 100644 index 0000000000000..221a2d7d4c1bd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/models/ScriptExecutionsList.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.implementation.models; + +import com.azure.core.annotation.Immutable; +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.ScriptExecutionInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ScriptExecution list operation. + */ +@Immutable +public final class ScriptExecutionsList implements JsonSerializable { + /* + * The ScriptExecution items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ScriptExecutionsList class. + */ + private ScriptExecutionsList() { + } + + /** + * Get the value property: The ScriptExecution items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ScriptExecutionsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionsList.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 ScriptExecutionsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptExecutionsList 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 ScriptExecutionsList. + */ + public static ScriptExecutionsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptExecutionsList deserializedScriptExecutionsList = new ScriptExecutionsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ScriptExecutionInner.fromJson(reader1)); + deserializedScriptExecutionsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedScriptExecutionsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptExecutionsList; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java new file mode 100644 index 0000000000000..3bed16e484c12 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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; + +/** + * a powershell credential object. + */ +@Fluent +public final class PSCredentialExecutionParameter extends ScriptExecutionParameter { + /* + * script execution parameter type + */ + private ScriptExecutionParameterType type = ScriptExecutionParameterType.CREDENTIAL; + + /* + * username for login + */ + private String username; + + /* + * password for login + */ + private String password; + + /** + * Creates an instance of PSCredentialExecutionParameter class. + */ + public PSCredentialExecutionParameter() { + } + + /** + * Get the type property: script execution parameter type. + * + * @return the type value. + */ + @Override + public ScriptExecutionParameterType type() { + return this.type; + } + + /** + * Get the username property: username for login. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: username for login. + * + * @param username the username value to set. + * @return the PSCredentialExecutionParameter object itself. + */ + public PSCredentialExecutionParameter withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: password for login. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: password for login. + * + * @param password the password value to set. + * @return the PSCredentialExecutionParameter object itself. + */ + public PSCredentialExecutionParameter withPassword(String password) { + this.password = password; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PSCredentialExecutionParameter withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("password", this.password); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PSCredentialExecutionParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PSCredentialExecutionParameter 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 PSCredentialExecutionParameter. + */ + public static PSCredentialExecutionParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PSCredentialExecutionParameter deserializedPSCredentialExecutionParameter + = new PSCredentialExecutionParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedPSCredentialExecutionParameter.withName(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedPSCredentialExecutionParameter.type + = ScriptExecutionParameterType.fromString(reader.getString()); + } else if ("username".equals(fieldName)) { + deserializedPSCredentialExecutionParameter.username = reader.getString(); + } else if ("password".equals(fieldName)) { + deserializedPSCredentialExecutionParameter.password = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPSCredentialExecutionParameter; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java new file mode 100644 index 0000000000000..163581df2e14c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of ScriptExecution. + */ +public interface ScriptExecution { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. + * + * @return the scriptCmdletId value. + */ + String scriptCmdletId(); + + /** + * Gets the parameters property: Parameters the script will accept. + * + * @return the parameters value. + */ + List parameters(); + + /** + * Gets the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials. + * + * @return the hiddenParameters value. + */ + List hiddenParameters(); + + /** + * Gets the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * + * @return the failureReason value. + */ + String failureReason(); + + /** + * Gets the timeout property: Time limit for execution. + * + * @return the timeout value. + */ + String timeout(); + + /** + * Gets the retention property: Time to live for the resource. If not provided, will be available for 60 days. + * + * @return the retention value. + */ + String retention(); + + /** + * Gets the submittedAt property: Time the script execution was submitted. + * + * @return the submittedAt value. + */ + OffsetDateTime submittedAt(); + + /** + * Gets the startedAt property: Time the script execution was started. + * + * @return the startedAt value. + */ + OffsetDateTime startedAt(); + + /** + * Gets the finishedAt property: Time the script execution was finished. + * + * @return the finishedAt value. + */ + OffsetDateTime finishedAt(); + + /** + * Gets the provisioningState property: The state of the script execution resource. + * + * @return the provisioningState value. + */ + ScriptExecutionProvisioningState provisioningState(); + + /** + * Gets the output property: Standard output stream from the powershell execution. + * + * @return the output value. + */ + List output(); + + /** + * Gets the namedOutputs property: User-defined dictionary. + * + * @return the namedOutputs value. + */ + Map namedOutputs(); + + /** + * Gets the information property: Standard information out stream from the powershell execution. + * + * @return the information value. + */ + List information(); + + /** + * Gets the warnings property: Standard warning out stream from the powershell execution. + * + * @return the warnings value. + */ + List warnings(); + + /** + * Gets the errors property: Standard error output stream from the powershell execution. + * + * @return the errors value. + */ + List errors(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner object. + * + * @return the inner object. + */ + ScriptExecutionInner innerModel(); + + /** + * The entirety of the ScriptExecution definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ScriptExecution definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ScriptExecution definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ScriptExecution definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, privateCloudName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @return the next definition stage. + */ + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + } + + /** + * The stage of the ScriptExecution definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithScriptCmdletId, DefinitionStages.WithParameters, + DefinitionStages.WithHiddenParameters, DefinitionStages.WithFailureReason, DefinitionStages.WithTimeout, + DefinitionStages.WithRetention, DefinitionStages.WithOutput, DefinitionStages.WithNamedOutputs { + /** + * Executes the create request. + * + * @return the created resource. + */ + ScriptExecution create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ScriptExecution create(Context context); + } + + /** + * The stage of the ScriptExecution definition allowing to specify scriptCmdletId. + */ + interface WithScriptCmdletId { + /** + * Specifies the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS + * script. + * + * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script. + * @return the next definition stage. + */ + WithCreate withScriptCmdletId(String scriptCmdletId); + } + + /** + * The stage of the ScriptExecution definition allowing to specify parameters. + */ + interface WithParameters { + /** + * Specifies the parameters property: Parameters the script will accept. + * + * @param parameters Parameters the script will accept. + * @return the next definition stage. + */ + WithCreate withParameters(List parameters); + } + + /** + * The stage of the ScriptExecution definition allowing to specify hiddenParameters. + */ + interface WithHiddenParameters { + /** + * Specifies the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as + * passwords and + * credentials. + * + * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials. + * @return the next definition stage. + */ + WithCreate withHiddenParameters(List hiddenParameters); + } + + /** + * The stage of the ScriptExecution definition allowing to specify failureReason. + */ + interface WithFailureReason { + /** + * Specifies the failureReason property: Error message if the script was able to run, but if the script + * itself had + * errors or powershell threw an exception. + * + * @param failureReason Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * @return the next definition stage. + */ + WithCreate withFailureReason(String failureReason); + } + + /** + * The stage of the ScriptExecution definition allowing to specify timeout. + */ + interface WithTimeout { + /** + * Specifies the timeout property: Time limit for execution. + * + * @param timeout Time limit for execution. + * @return the next definition stage. + */ + WithCreate withTimeout(String timeout); + } + + /** + * The stage of the ScriptExecution definition allowing to specify retention. + */ + interface WithRetention { + /** + * Specifies the retention property: Time to live for the resource. If not provided, will be available for + * 60 days. + * + * @param retention Time to live for the resource. If not provided, will be available for 60 days. + * @return the next definition stage. + */ + WithCreate withRetention(String retention); + } + + /** + * The stage of the ScriptExecution definition allowing to specify output. + */ + interface WithOutput { + /** + * Specifies the output property: Standard output stream from the powershell execution. + * + * @param output Standard output stream from the powershell execution. + * @return the next definition stage. + */ + WithCreate withOutput(List output); + } + + /** + * The stage of the ScriptExecution definition allowing to specify namedOutputs. + */ + interface WithNamedOutputs { + /** + * Specifies the namedOutputs property: User-defined dictionary.. + * + * @param namedOutputs User-defined dictionary. + * @return the next definition stage. + */ + WithCreate withNamedOutputs(Map namedOutputs); + } + } + + /** + * Begins update for the ScriptExecution resource. + * + * @return the stage of resource update. + */ + ScriptExecution.Update update(); + + /** + * The template for ScriptExecution update. + */ + interface Update extends UpdateStages.WithScriptCmdletId, UpdateStages.WithParameters, + UpdateStages.WithHiddenParameters, UpdateStages.WithFailureReason, UpdateStages.WithTimeout, + UpdateStages.WithRetention, UpdateStages.WithOutput, UpdateStages.WithNamedOutputs { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ScriptExecution apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ScriptExecution apply(Context context); + } + + /** + * The ScriptExecution update stages. + */ + interface UpdateStages { + /** + * The stage of the ScriptExecution update allowing to specify scriptCmdletId. + */ + interface WithScriptCmdletId { + /** + * Specifies the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS + * script. + * + * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script. + * @return the next definition stage. + */ + Update withScriptCmdletId(String scriptCmdletId); + } + + /** + * The stage of the ScriptExecution update allowing to specify parameters. + */ + interface WithParameters { + /** + * Specifies the parameters property: Parameters the script will accept. + * + * @param parameters Parameters the script will accept. + * @return the next definition stage. + */ + Update withParameters(List parameters); + } + + /** + * The stage of the ScriptExecution update allowing to specify hiddenParameters. + */ + interface WithHiddenParameters { + /** + * Specifies the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as + * passwords and + * credentials. + * + * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials. + * @return the next definition stage. + */ + Update withHiddenParameters(List hiddenParameters); + } + + /** + * The stage of the ScriptExecution update allowing to specify failureReason. + */ + interface WithFailureReason { + /** + * Specifies the failureReason property: Error message if the script was able to run, but if the script + * itself had + * errors or powershell threw an exception. + * + * @param failureReason Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * @return the next definition stage. + */ + Update withFailureReason(String failureReason); + } + + /** + * The stage of the ScriptExecution update allowing to specify timeout. + */ + interface WithTimeout { + /** + * Specifies the timeout property: Time limit for execution. + * + * @param timeout Time limit for execution. + * @return the next definition stage. + */ + Update withTimeout(String timeout); + } + + /** + * The stage of the ScriptExecution update allowing to specify retention. + */ + interface WithRetention { + /** + * Specifies the retention property: Time to live for the resource. If not provided, will be available for + * 60 days. + * + * @param retention Time to live for the resource. If not provided, will be available for 60 days. + * @return the next definition stage. + */ + Update withRetention(String retention); + } + + /** + * The stage of the ScriptExecution update allowing to specify output. + */ + interface WithOutput { + /** + * Specifies the output property: Standard output stream from the powershell execution. + * + * @param output Standard output stream from the powershell execution. + * @return the next definition stage. + */ + Update withOutput(List output); + } + + /** + * The stage of the ScriptExecution update allowing to specify namedOutputs. + */ + interface WithNamedOutputs { + /** + * Specifies the namedOutputs property: User-defined dictionary.. + * + * @param namedOutputs User-defined dictionary. + * @return the next definition stage. + */ + Update withNamedOutputs(Map namedOutputs); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ScriptExecution refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ScriptExecution refresh(Context context); + + /** + * Return the logs for a script execution resource. + * + * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An + * empty array will return nothing. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. + */ + Response getExecutionLogsWithResponse(List scriptOutputStreamType, + Context context); + + /** + * Return the logs for a script execution resource. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS. + */ + ScriptExecution getExecutionLogs(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java new file mode 100644 index 0000000000000..2767375ab4876 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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; + +/** + * The arguments passed in to the execution. + */ +@Fluent +public class ScriptExecutionParameter implements JsonSerializable { + /* + * script execution parameter type + */ + private ScriptExecutionParameterType type = ScriptExecutionParameterType.fromString("ScriptExecutionParameter"); + + /* + * The parameter name + */ + private String name; + + /** + * Creates an instance of ScriptExecutionParameter class. + */ + public ScriptExecutionParameter() { + } + + /** + * Get the type property: script execution parameter type. + * + * @return the type value. + */ + public ScriptExecutionParameterType type() { + return this.type; + } + + /** + * Get the name property: The parameter name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The parameter name. + * + * @param name the name value to set. + * @return the ScriptExecutionParameter object itself. + */ + public ScriptExecutionParameter withName(String name) { + this.name = name; + 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 ScriptExecutionParameter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionParameter.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptExecutionParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptExecutionParameter 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 ScriptExecutionParameter. + */ + public static ScriptExecutionParameter 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 ("type".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("SecureValue".equals(discriminatorValue)) { + return ScriptSecureStringExecutionParameter.fromJson(readerToUse.reset()); + } else if ("Value".equals(discriminatorValue)) { + return ScriptStringExecutionParameter.fromJson(readerToUse.reset()); + } else if ("Credential".equals(discriminatorValue)) { + return PSCredentialExecutionParameter.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static ScriptExecutionParameter fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptExecutionParameter deserializedScriptExecutionParameter = new ScriptExecutionParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedScriptExecutionParameter.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedScriptExecutionParameter.type + = ScriptExecutionParameterType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptExecutionParameter; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java new file mode 100644 index 0000000000000..73e9dbf342a40 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * script execution parameter type. + */ +public final class ScriptExecutionParameterType extends ExpandableStringEnum { + /** + * Static value Value for ScriptExecutionParameterType. + */ + public static final ScriptExecutionParameterType VALUE = fromString("Value"); + + /** + * Static value SecureValue for ScriptExecutionParameterType. + */ + public static final ScriptExecutionParameterType SECURE_VALUE = fromString("SecureValue"); + + /** + * Static value Credential for ScriptExecutionParameterType. + */ + public static final ScriptExecutionParameterType CREDENTIAL = fromString("Credential"); + + /** + * Creates a new instance of ScriptExecutionParameterType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScriptExecutionParameterType() { + } + + /** + * Creates or finds a ScriptExecutionParameterType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScriptExecutionParameterType. + */ + public static ScriptExecutionParameterType fromString(String name) { + return fromString(name, ScriptExecutionParameterType.class); + } + + /** + * Gets known ScriptExecutionParameterType values. + * + * @return known ScriptExecutionParameterType values. + */ + public static Collection values() { + return values(ScriptExecutionParameterType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionPropertiesNamedOutput.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionPropertiesNamedOutput.java new file mode 100644 index 0000000000000..c700a8c838099 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionPropertiesNamedOutput.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.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 java.io.IOException; + +/** + * The ScriptExecutionPropertiesNamedOutput model. + */ +@Immutable +public final class ScriptExecutionPropertiesNamedOutput + implements JsonSerializable { + /** + * Creates an instance of ScriptExecutionPropertiesNamedOutput class. + */ + public ScriptExecutionPropertiesNamedOutput() { + } + + /** + * 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 ScriptExecutionPropertiesNamedOutput from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptExecutionPropertiesNamedOutput 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 ScriptExecutionPropertiesNamedOutput. + */ + public static ScriptExecutionPropertiesNamedOutput fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptExecutionPropertiesNamedOutput deserializedScriptExecutionPropertiesNamedOutput + = new ScriptExecutionPropertiesNamedOutput(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + reader.skipChildren(); + } + + return deserializedScriptExecutionPropertiesNamedOutput; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java new file mode 100644 index 0000000000000..fdba11f21f352 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Script Execution provisioning state. + */ +public final class ScriptExecutionProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Pending for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState PENDING = fromString("Pending"); + + /** + * Static value Running for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState RUNNING = fromString("Running"); + + /** + * Static value Cancelling for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState CANCELLING = fromString("Cancelling"); + + /** + * Static value Cancelled for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState CANCELLED = fromString("Cancelled"); + + /** + * Static value Deleting for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of ScriptExecutionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScriptExecutionProvisioningState() { + } + + /** + * Creates or finds a ScriptExecutionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScriptExecutionProvisioningState. + */ + public static ScriptExecutionProvisioningState fromString(String name) { + return fromString(name, ScriptExecutionProvisioningState.class); + } + + /** + * Gets known ScriptExecutionProvisioningState values. + * + * @return known ScriptExecutionProvisioningState values. + */ + public static Collection values() { + return values(ScriptExecutionProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java new file mode 100644 index 0000000000000..751fd80070b2e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** + * Resource collection API of ScriptExecutions. + */ +public interface ScriptExecutions { + /** + * List ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List ScriptExecution resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context); + + /** + * Get a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution. + */ + ScriptExecution get(String resourceGroupName, String privateCloudName, String scriptExecutionName); + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName); + + /** + * Delete a ScriptExecution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + + /** + * Return the logs for a script execution resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An + * empty array will return nothing. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. + */ + Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, List scriptOutputStreamType, Context context); + + /** + * Return the logs for a script execution resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an instance of a script executed by a user - custom or AVS. + */ + ScriptExecution getExecutionLogs(String resourceGroupName, String privateCloudName, String scriptExecutionName); + + /** + * Get a ScriptExecution. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution along with {@link Response}. + */ + ScriptExecution getById(String id); + + /** + * Get a ScriptExecution. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ScriptExecution along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ScriptExecution. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ScriptExecution. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 ScriptExecution resource. + * + * @param name resource name. + * @return the first stage of the new ScriptExecution definition. + */ + ScriptExecution.DefinitionStages.Blank define(String name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java new file mode 100644 index 0000000000000..4407420e71ae2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Script Output Stream type. + */ +public final class ScriptOutputStreamType extends ExpandableStringEnum { + /** + * Static value Information for ScriptOutputStreamType. + */ + public static final ScriptOutputStreamType INFORMATION = fromString("Information"); + + /** + * Static value Warning for ScriptOutputStreamType. + */ + public static final ScriptOutputStreamType WARNING = fromString("Warning"); + + /** + * Static value Output for ScriptOutputStreamType. + */ + public static final ScriptOutputStreamType OUTPUT = fromString("Output"); + + /** + * Static value Error for ScriptOutputStreamType. + */ + public static final ScriptOutputStreamType ERROR = fromString("Error"); + + /** + * Creates a new instance of ScriptOutputStreamType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScriptOutputStreamType() { + } + + /** + * Creates or finds a ScriptOutputStreamType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScriptOutputStreamType. + */ + public static ScriptOutputStreamType fromString(String name) { + return fromString(name, ScriptOutputStreamType.class); + } + + /** + * Gets known ScriptOutputStreamType values. + * + * @return known ScriptOutputStreamType values. + */ + public static Collection values() { + return values(ScriptOutputStreamType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java new file mode 100644 index 0000000000000..463da8ee5d634 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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; + +/** + * a plain text value execution parameter. + */ +@Fluent +public final class ScriptSecureStringExecutionParameter extends ScriptExecutionParameter { + /* + * script execution parameter type + */ + private ScriptExecutionParameterType type = ScriptExecutionParameterType.SECURE_VALUE; + + /* + * A secure value for the passed parameter, not to be stored in logs + */ + private String secureValue; + + /** + * Creates an instance of ScriptSecureStringExecutionParameter class. + */ + public ScriptSecureStringExecutionParameter() { + } + + /** + * Get the type property: script execution parameter type. + * + * @return the type value. + */ + @Override + public ScriptExecutionParameterType type() { + return this.type; + } + + /** + * Get the secureValue property: A secure value for the passed parameter, not to be stored in logs. + * + * @return the secureValue value. + */ + public String secureValue() { + return this.secureValue; + } + + /** + * Set the secureValue property: A secure value for the passed parameter, not to be stored in logs. + * + * @param secureValue the secureValue value to set. + * @return the ScriptSecureStringExecutionParameter object itself. + */ + public ScriptSecureStringExecutionParameter withSecureValue(String secureValue) { + this.secureValue = secureValue; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ScriptSecureStringExecutionParameter withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("secureValue", this.secureValue); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptSecureStringExecutionParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptSecureStringExecutionParameter 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 ScriptSecureStringExecutionParameter. + */ + public static ScriptSecureStringExecutionParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptSecureStringExecutionParameter deserializedScriptSecureStringExecutionParameter + = new ScriptSecureStringExecutionParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedScriptSecureStringExecutionParameter.withName(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedScriptSecureStringExecutionParameter.type + = ScriptExecutionParameterType.fromString(reader.getString()); + } else if ("secureValue".equals(fieldName)) { + deserializedScriptSecureStringExecutionParameter.secureValue = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptSecureStringExecutionParameter; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java new file mode 100644 index 0000000000000..d960180ba1c52 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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; + +/** + * a plain text value execution parameter. + */ +@Fluent +public final class ScriptStringExecutionParameter extends ScriptExecutionParameter { + /* + * script execution parameter type + */ + private ScriptExecutionParameterType type = ScriptExecutionParameterType.VALUE; + + /* + * The value for the passed parameter + */ + private String value; + + /** + * Creates an instance of ScriptStringExecutionParameter class. + */ + public ScriptStringExecutionParameter() { + } + + /** + * Get the type property: script execution parameter type. + * + * @return the type value. + */ + @Override + public ScriptExecutionParameterType type() { + return this.type; + } + + /** + * Get the value property: The value for the passed parameter. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value for the passed parameter. + * + * @param value the value value to set. + * @return the ScriptStringExecutionParameter object itself. + */ + public ScriptStringExecutionParameter withValue(String value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ScriptStringExecutionParameter withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScriptStringExecutionParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScriptStringExecutionParameter 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 ScriptStringExecutionParameter. + */ + public static ScriptStringExecutionParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScriptStringExecutionParameter deserializedScriptStringExecutionParameter + = new ScriptStringExecutionParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedScriptStringExecutionParameter.withName(reader.getString()); + } else if ("type".equals(fieldName)) { + deserializedScriptStringExecutionParameter.type + = ScriptExecutionParameterType.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { + deserializedScriptStringExecutionParameter.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedScriptStringExecutionParameter; + }); + } +} 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 d4371adb13726..b92f135b8da27 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.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.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 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 index 9daa226e4032b..5582cd1018cfd 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"gx\"},\"id\":\"rslpmutwuoeg\",\"name\":\"pkhjwni\",\"type\":\"qsluicp\"}") + "{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"ufoxc\"},\"id\":\"opidoamciodh\",\"name\":\"haz\",\"type\":\"khnzbonlw\"}") .toObject(IscsiPathInner.class); - Assertions.assertEquals("gx", model.networkBlock()); + Assertions.assertEquals("ufoxc", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathInner model = new IscsiPathInner().withNetworkBlock("gx"); + IscsiPathInner model = new IscsiPathInner().withNetworkBlock("ufoxc"); model = BinaryData.fromObject(model).toObject(IscsiPathInner.class); - Assertions.assertEquals("gx", model.networkBlock()); + Assertions.assertEquals("ufoxc", 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 index b77f07e1dd72d..1a84e128943f9 100644 --- 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 @@ -12,9 +12,9 @@ public final class IscsiPathListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"pxebmnzbt\"},\"id\":\"jpglkfgohdne\",\"name\":\"el\",\"type\":\"phsdyhto\"},{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"dowwquuvxzxclvit\"},\"id\":\"qzonosggbhcohf\",\"name\":\"dsjnka\",\"type\":\"jutiiswacff\"},{\"properties\":{\"provisioningState\":\"Pending\",\"networkBlock\":\"zewk\"},\"id\":\"hqcrailvpnpp\",\"name\":\"uflrwd\",\"type\":\"hdlxyjrxsagafcn\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"qapnedgfbcv\"},\"id\":\"vq\",\"name\":\"pkeqdcvdrhvoo\",\"type\":\"sotbob\"}],\"nextLink\":\"opcjwvnhd\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Pending\",\"networkBlock\":\"n\"},\"id\":\"rudsg\",\"name\":\"a\",\"type\":\"mkycgra\"},{\"properties\":{\"provisioningState\":\"Building\",\"networkBlock\":\"etaebu\"},\"id\":\"vdmovsmzlxwabm\",\"name\":\"oefki\",\"type\":\"rvtp\"},{\"properties\":{\"provisioningState\":\"Building\",\"networkBlock\":\"mqlgk\"},\"id\":\"tndoaongbjc\",\"name\":\"tujitcjedft\",\"type\":\"waezkojvd\"}],\"nextLink\":\"zfoqouicybxar\"}") .toObject(IscsiPathListResult.class); - Assertions.assertEquals("pxebmnzbt", model.value().get(0).networkBlock()); - Assertions.assertEquals("opcjwvnhd", model.nextLink()); + Assertions.assertEquals("n", model.value().get(0).networkBlock()); + Assertions.assertEquals("zfoqouicybxar", 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 index aae545736b4a7..7872b097ba5ba 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathProperties model - = BinaryData.fromString("{\"provisioningState\":\"Building\",\"networkBlock\":\"kzzlvmbmpaxmodf\"}") + = BinaryData.fromString("{\"provisioningState\":\"Canceled\",\"networkBlock\":\"egokdwbwhkszzcmr\"}") .toObject(IscsiPathProperties.class); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.networkBlock()); + Assertions.assertEquals("egokdwbwhkszzcmr", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("kzzlvmbmpaxmodf"); + IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("egokdwbwhkszzcmr"); model = BinaryData.fromObject(model).toObject(IscsiPathProperties.class); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.networkBlock()); + Assertions.assertEquals("egokdwbwhkszzcmr", model.networkBlock()); } } 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 new file mode 100644 index 0000000000000..c6a8f9831f392 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ScriptExecutionPropertiesNamedOutput; +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\":\"itc\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"cktqumiekkezzi\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hlyfjhdgqgg\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"bdunygaeqid\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"atpxl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rxcyjmoad\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"uvarmywdmjsjq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"jhhyxxrwlycoduhp\"}],\"failureReason\":\"kgymareqnajxqug\",\"timeout\":\"hky\",\"retention\":\"beddgssofw\",\"submittedAt\":\"2021-08-12T00:48:32Z\",\"startedAt\":\"2021-09-09T11:18:40Z\",\"finishedAt\":\"2021-02-22T22:05:21Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"i\",\"pxacqqudfn\"],\"namedOutputs\":{\"baaa\":{},\"jyvayffimrzrtuz\":{},\"ogs\":{}},\"information\":[\"evfdnwnwm\",\"wzsyyceuzs\"],\"warnings\":[\"judpfrxt\",\"thzvaytdwkqbrqu\",\"paxh\",\"xiilivpdtiirqt\"],\"errors\":[\"axoruzfgsquy\",\"xrxxlep\",\"ramxjezwlwnw\"]},\"id\":\"qlcvydy\",\"name\":\"atdooaojkniod\",\"type\":\"oo\"}") + .toObject(ScriptExecutionInner.class); + Assertions.assertEquals("itc", model.scriptCmdletId()); + Assertions.assertEquals("cktqumiekkezzi", model.parameters().get(0).name()); + Assertions.assertEquals("atpxl", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("kgymareqnajxqug", model.failureReason()); + Assertions.assertEquals("hky", model.timeout()); + Assertions.assertEquals("beddgssofw", model.retention()); + Assertions.assertEquals("i", model.output().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("itc") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("cktqumiekkezzi"), + new ScriptExecutionParameter().withName("hlyfjhdgqgg"), + new ScriptExecutionParameter().withName("bdunygaeqid"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("atpxl"), + new ScriptExecutionParameter().withName("rxcyjmoad"), + new ScriptExecutionParameter().withName("uvarmywdmjsjq"), + new ScriptExecutionParameter().withName("jhhyxxrwlycoduhp"))) + .withFailureReason("kgymareqnajxqug") + .withTimeout("hky") + .withRetention("beddgssofw") + .withOutput(Arrays.asList("i", "pxacqqudfn")) + .withNamedOutputs(mapOf("baaa", new ScriptExecutionPropertiesNamedOutput(), "jyvayffimrzrtuz", + new ScriptExecutionPropertiesNamedOutput(), "ogs", new ScriptExecutionPropertiesNamedOutput())); + model = BinaryData.fromObject(model).toObject(ScriptExecutionInner.class); + Assertions.assertEquals("itc", model.scriptCmdletId()); + Assertions.assertEquals("cktqumiekkezzi", model.parameters().get(0).name()); + Assertions.assertEquals("atpxl", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("kgymareqnajxqug", model.failureReason()); + Assertions.assertEquals("hky", model.timeout()); + Assertions.assertEquals("beddgssofw", model.retention()); + Assertions.assertEquals("i", 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 new file mode 100644 index 0000000000000..19bb6f0a086f0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"sdbnwdcfhucqdpf\"}") + .toObject(ScriptExecutionParameter.class); + Assertions.assertEquals("sdbnwdcfhucqdpf", model.name()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScriptExecutionParameter model = new ScriptExecutionParameter().withName("sdbnwdcfhucqdpf"); + model = BinaryData.fromObject(model).toObject(ScriptExecutionParameter.class); + Assertions.assertEquals("sdbnwdcfhucqdpf", model.name()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesNamedOutputTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesNamedOutputTests.java new file mode 100644 index 0000000000000..2430a8a438d14 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesNamedOutputTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.models.ScriptExecutionPropertiesNamedOutput; + +public final class ScriptExecutionPropertiesNamedOutputTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScriptExecutionPropertiesNamedOutput model + = BinaryData.fromString("{}").toObject(ScriptExecutionPropertiesNamedOutput.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScriptExecutionPropertiesNamedOutput model = new ScriptExecutionPropertiesNamedOutput(); + model = BinaryData.fromObject(model).toObject(ScriptExecutionPropertiesNamedOutput.class); + } +} 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 new file mode 100644 index 0000000000000..376ded2ac3994 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.avs.models.ScriptExecutionPropertiesNamedOutput; +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\":\"wnujhemmsbvdk\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dtjinfw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lfltka\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"efkdlf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"akggkfpag\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"owpulpq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lyls\"}],\"failureReason\":\"k\",\"timeout\":\"jnsjervtiagxsd\",\"retention\":\"uem\",\"submittedAt\":\"2021-06-09T02:50:50Z\",\"startedAt\":\"2021-10-12T12:33:37Z\",\"finishedAt\":\"2021-02-15T03:12:09Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"pnqi\"],\"namedOutputs\":{\"nvkjjxdxrbuukzcl\":{},\"wyhmlw\":{},\"aztz\":{},\"ofncckwyfzqwhxxb\":{}},\"information\":[\"a\"],\"warnings\":[\"eqz\",\"ppriol\",\"or\"],\"errors\":[\"tolmncwsobqw\"]}") + .toObject(ScriptExecutionProperties.class); + Assertions.assertEquals("wnujhemmsbvdk", model.scriptCmdletId()); + Assertions.assertEquals("dtjinfw", model.parameters().get(0).name()); + Assertions.assertEquals("efkdlf", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("k", model.failureReason()); + Assertions.assertEquals("jnsjervtiagxsd", model.timeout()); + Assertions.assertEquals("uem", model.retention()); + Assertions.assertEquals("pnqi", model.output().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("wnujhemmsbvdk") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("dtjinfw"), + new ScriptExecutionParameter().withName("lfltka"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("efkdlf"), + new ScriptExecutionParameter().withName("akggkfpag"), + new ScriptExecutionParameter().withName("owpulpq"), new ScriptExecutionParameter().withName("lyls"))) + .withFailureReason("k") + .withTimeout("jnsjervtiagxsd") + .withRetention("uem") + .withOutput(Arrays.asList("pnqi")) + .withNamedOutputs(mapOf("nvkjjxdxrbuukzcl", new ScriptExecutionPropertiesNamedOutput(), "wyhmlw", + new ScriptExecutionPropertiesNamedOutput(), "aztz", new ScriptExecutionPropertiesNamedOutput(), + "ofncckwyfzqwhxxb", new ScriptExecutionPropertiesNamedOutput())); + model = BinaryData.fromObject(model).toObject(ScriptExecutionProperties.class); + Assertions.assertEquals("wnujhemmsbvdk", model.scriptCmdletId()); + Assertions.assertEquals("dtjinfw", model.parameters().get(0).name()); + Assertions.assertEquals("efkdlf", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("k", model.failureReason()); + Assertions.assertEquals("jnsjervtiagxsd", model.timeout()); + Assertions.assertEquals("uem", model.retention()); + Assertions.assertEquals("pnqi", 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/ScriptExecutionsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java new file mode 100644 index 0000000000000..648ed438566f5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.avs.implementation.models.ScriptExecutionsList; +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\":\"p\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"bmnzbtbhjpgl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fgohdneuelfphs\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"yhtozfikdowwqu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"v\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"clvit\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hqzonosggbhcoh\"}],\"failureReason\":\"dsjnka\",\"timeout\":\"jutiiswacff\",\"retention\":\"k\",\"submittedAt\":\"2021-07-11T14:50:31Z\",\"startedAt\":\"2021-04-30T08:45:02Z\",\"finishedAt\":\"2021-09-11T04:06:27Z\",\"provisioningState\":\"Deleting\",\"output\":[\"a\",\"lvpnpp\",\"uflrwd\"],\"namedOutputs\":{\"lxyjr\":{},\"sag\":{}},\"information\":[\"nihgwqapnedg\",\"bcvkcvqvpkeq\",\"cvdrhvoodsot\",\"obzdopcjwvnhdl\"],\"warnings\":[\"gx\",\"xrslpm\",\"twuoegrpkhjwni\"],\"errors\":[\"luicpdggkzzlvmbm\",\"axmodfvuef\",\"wsbpfvm\"]},\"id\":\"hrfou\",\"name\":\"ft\",\"type\":\"akcp\"},{\"properties\":{\"scriptCmdletId\":\"zvqtmnubexkp\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"mond\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mquxvypo\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"opkwhojv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ajqgxy\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mocmbqfqvmk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xozap\"}],\"failureReason\":\"elxprglyatddck\",\"timeout\":\"bcuejrjxgci\",\"retention\":\"brh\",\"submittedAt\":\"2021-06-17T17:34:16Z\",\"startedAt\":\"2021-06-01T12:21:20Z\",\"finishedAt\":\"2021-02-04T15:03:28Z\",\"provisioningState\":\"Deleting\",\"output\":[\"m\"],\"namedOutputs\":{\"rq\":{}},\"information\":[\"ahwfluszdtmhrk\",\"ofyyvoqacpi\"],\"warnings\":[\"btgiwbwoenwas\"],\"errors\":[\"dtkcnqxwbpokulp\",\"ujw\"]},\"id\":\"sipqii\",\"name\":\"byuqerpqlp\",\"type\":\"wcciuqgbdbu\"},{\"properties\":{\"scriptCmdletId\":\"vfbtkuwh\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ykojoxafnndlpic\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"koymkcd\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"h\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"pkkpw\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"q\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ovvqfovljxywsu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"syrsndsytgadgvra\"}],\"failureReason\":\"en\",\"timeout\":\"qnzarrwl\",\"retention\":\"uijfqk\",\"submittedAt\":\"2021-06-20T18:32:46Z\",\"startedAt\":\"2021-05-07T16:01:38Z\",\"finishedAt\":\"2021-07-18T18:26:22Z\",\"provisioningState\":\"Pending\",\"output\":[\"ji\",\"wwiftohqkvpuv\",\"sgplsakn\"],\"namedOutputs\":{\"synljphuopxodl\":{},\"iyntorzihle\":{},\"sjswsrms\":{}},\"information\":[\"rpzbchckqqzqi\",\"xiy\"],\"warnings\":[\"i\",\"ynkedyatrwyhqmib\",\"yhwitsmypyynpcdp\",\"mnzgmwznmabi\"],\"errors\":[\"orgjhxbldt\",\"wwrlkdmtncv\"]},\"id\":\"otllxdyhgsyo\",\"name\":\"ogjltdtbnnhad\",\"type\":\"ocrkvcikh\"},{\"properties\":{\"scriptCmdletId\":\"amqgxqquezikyw\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"kallatmel\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"uipiccjzk\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"gvvcnayrhyr\"}],\"failureReason\":\"xmueed\",\"timeout\":\"drd\",\"retention\":\"tkwqqtchealm\",\"submittedAt\":\"2021-09-27T23:43:44Z\",\"startedAt\":\"2021-10-14T04:38:13Z\",\"finishedAt\":\"2021-04-13T10:54:30Z\",\"provisioningState\":\"Pending\",\"output\":[\"vgpiohgwxrt\",\"udxepxgyqagv\"],\"namedOutputs\":{\"npkukghimdblx\":{},\"wi\":{},\"fnjhfjxwmszkkfo\":{},\"rey\":{}},\"information\":[\"ikf\"],\"warnings\":[\"n\",\"a\"],\"errors\":[\"wczelpci\",\"elsfeaen\",\"abfatkl\"]},\"id\":\"xbjhwuaanozjosph\",\"name\":\"oulpjrv\",\"type\":\"ag\"}],\"nextLink\":\"vimjwos\"}") + .toObject(ScriptExecutionsList.class); + Assertions.assertEquals("p", model.value().get(0).scriptCmdletId()); + Assertions.assertEquals("bmnzbtbhjpgl", model.value().get(0).parameters().get(0).name()); + Assertions.assertEquals("clvit", model.value().get(0).hiddenParameters().get(0).name()); + Assertions.assertEquals("dsjnka", model.value().get(0).failureReason()); + Assertions.assertEquals("jutiiswacff", model.value().get(0).timeout()); + Assertions.assertEquals("k", model.value().get(0).retention()); + Assertions.assertEquals("a", model.value().get(0).output().get(0)); + Assertions.assertEquals("vimjwos", model.nextLink()); + } +} 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 new file mode 100644 index 0000000000000..41b0ace68d201 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"glsbjjc\",\"name\":\"nvxbvt\"}") + .toObject(ScriptSecureStringExecutionParameter.class); + Assertions.assertEquals("nvxbvt", model.name()); + Assertions.assertEquals("glsbjjc", model.secureValue()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScriptSecureStringExecutionParameter model + = new ScriptSecureStringExecutionParameter().withName("nvxbvt").withSecureValue("glsbjjc"); + model = BinaryData.fromObject(model).toObject(ScriptSecureStringExecutionParameter.class); + Assertions.assertEquals("nvxbvt", model.name()); + Assertions.assertEquals("glsbjjc", 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 new file mode 100644 index 0000000000000..9dd63f31474d0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"dut\",\"name\":\"cormr\"}") + .toObject(ScriptStringExecutionParameter.class); + Assertions.assertEquals("cormr", model.name()); + Assertions.assertEquals("dut", model.value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScriptStringExecutionParameter model = new ScriptStringExecutionParameter().withName("cormr").withValue("dut"); + model = BinaryData.fromObject(model).toObject(ScriptStringExecutionParameter.class); + Assertions.assertEquals("cormr", model.name()); + Assertions.assertEquals("dut", model.value()); + } +} 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 index 01f6807886d51..0613cdd311b82 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkDhcpEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpEntity model = BinaryData.fromString( - "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"atpxl\",\"segments\":[\"cyjmoadsuvarmy\",\"dmjsjqb\",\"hhyxxrw\",\"yc\"],\"provisioningState\":\"Building\",\"revision\":609111947256097194}") + "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"rv\",\"segments\":[\"pmfi\",\"bfggjioolvr\",\"x\"],\"provisioningState\":\"Building\",\"revision\":201556653544263409}") .toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("atpxl", model.displayName()); - Assertions.assertEquals(609111947256097194L, model.revision()); + Assertions.assertEquals("rv", model.displayName()); + Assertions.assertEquals(201556653544263409L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkDhcpEntity model - = new WorkloadNetworkDhcpEntity().withDisplayName("atpxl").withRevision(609111947256097194L); + = new WorkloadNetworkDhcpEntity().withDisplayName("rv").withRevision(201556653544263409L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("atpxl", model.displayName()); - Assertions.assertEquals(609111947256097194L, model.revision()); + Assertions.assertEquals("rv", model.displayName()); + Assertions.assertEquals(201556653544263409L, 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 index 563378f411918..8c319f9f5f17e 100644 --- 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 @@ -13,18 +13,18 @@ public final class WorkloadNetworkDhcpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpInner model = BinaryData.fromString( - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"l\",\"segments\":[\"mjwosytx\",\"tcs\"],\"provisioningState\":\"Updating\",\"revision\":2011726072634273746},\"id\":\"miekkezzikhlyfjh\",\"name\":\"gqggebdunygae\",\"type\":\"idb\"}") + "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"tjsyin\",\"segments\":[\"qatmtdhtmdvy\"],\"provisioningState\":\"Succeeded\",\"revision\":7953248130446233855},\"id\":\"zywkb\",\"name\":\"rryuzhlhkjo\",\"type\":\"rvqqaatj\"}") .toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("l", model.properties().displayName()); - Assertions.assertEquals(2011726072634273746L, model.properties().revision()); + Assertions.assertEquals("tjsyin", model.properties().displayName()); + Assertions.assertEquals(7953248130446233855L, model.properties().revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner() - .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("l").withRevision(2011726072634273746L)); + WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner().withProperties( + new WorkloadNetworkDhcpEntity().withDisplayName("tjsyin").withRevision(7953248130446233855L)); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("l", model.properties().displayName()); - Assertions.assertEquals(2011726072634273746L, model.properties().revision()); + Assertions.assertEquals("tjsyin", model.properties().displayName()); + Assertions.assertEquals(7953248130446233855L, 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 index d5def62bae11e..f28a48bc3a12b 100644 --- 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 @@ -12,10 +12,10 @@ public final class WorkloadNetworkDhcpListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"szkkfoqre\",\"segments\":[\"zi\",\"fjawneaivxwczel\",\"c\",\"r\"],\"provisioningState\":\"Failed\",\"revision\":2411008459227076557},\"id\":\"nwabfatkldd\",\"name\":\"bjhwuaan\",\"type\":\"zjosp\"}],\"nextLink\":\"oulpjrv\"}") + "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"xu\",\"segments\":[\"dwzrmuh\",\"pfcqdp\",\"qxqvpsvuoymgc\",\"elvezrypq\"],\"provisioningState\":\"Deleting\",\"revision\":6554810180988949657},\"id\":\"rqwky\",\"name\":\"kobopgxed\",\"type\":\"owepbqpcrfkb\"}],\"nextLink\":\"csnjvcdwxlpqekft\"}") .toObject(WorkloadNetworkDhcpList.class); - Assertions.assertEquals("szkkfoqre", model.value().get(0).properties().displayName()); - Assertions.assertEquals(2411008459227076557L, model.value().get(0).properties().revision()); - Assertions.assertEquals("oulpjrv", model.nextLink()); + Assertions.assertEquals("xu", model.value().get(0).properties().displayName()); + Assertions.assertEquals(6554810180988949657L, model.value().get(0).properties().revision()); + Assertions.assertEquals("csnjvcdwxlpqekft", 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 index 69a66844c13dc..451801be224b2 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkDhcpRelayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpRelay model = BinaryData.fromString( - "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"qudf\"],\"displayName\":\"yxbaaabjyvayf\",\"segments\":[\"rzrtuzqogsex\"],\"provisioningState\":\"Succeeded\",\"revision\":3349292627980189663}") + "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"tlpdn\",\"itvgbmhrixkwm\",\"ijejvegrhbpn\"],\"displayName\":\"xexccbdreaxhcexd\",\"segments\":[\"qahqkghtpwijn\",\"yjsvfyc\",\"z\"],\"provisioningState\":\"Building\",\"revision\":7035584365835539552}") .toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("yxbaaabjyvayf", model.displayName()); - Assertions.assertEquals(3349292627980189663L, model.revision()); - Assertions.assertEquals("qudf", model.serverAddresses().get(0)); + Assertions.assertEquals("xexccbdreaxhcexd", model.displayName()); + Assertions.assertEquals(7035584365835539552L, model.revision()); + Assertions.assertEquals("tlpdn", model.serverAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("yxbaaabjyvayf") - .withRevision(3349292627980189663L) - .withServerAddresses(Arrays.asList("qudf")); + WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("xexccbdreaxhcexd") + .withRevision(7035584365835539552L) + .withServerAddresses(Arrays.asList("tlpdn", "itvgbmhrixkwm", "ijejvegrhbpn")); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("yxbaaabjyvayf", model.displayName()); - Assertions.assertEquals(3349292627980189663L, model.revision()); - Assertions.assertEquals("qudf", model.serverAddresses().get(0)); + Assertions.assertEquals("xexccbdreaxhcexd", model.displayName()); + Assertions.assertEquals(7035584365835539552L, model.revision()); + Assertions.assertEquals("tlpdn", 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 index 11578f2fe4984..efb6b0ce98137 100644 --- 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 @@ -12,24 +12,24 @@ public final class WorkloadNetworkDhcpServerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpServer model = BinaryData.fromString( - "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"kgymareqnajxqug\",\"leaseTime\":1857528814684738489,\"displayName\":\"ubeddg\",\"segments\":[\"fwqmzqalkrmn\"],\"provisioningState\":\"Deleting\",\"revision\":4245550544561236483}") + "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"lqwjygvjayvblm\",\"leaseTime\":593391508400046676,\"displayName\":\"hbxvvyhgsopbyrqu\",\"segments\":[\"xuvw\"],\"provisioningState\":\"Failed\",\"revision\":8014747037216452315}") .toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("ubeddg", model.displayName()); - Assertions.assertEquals(4245550544561236483L, model.revision()); - Assertions.assertEquals("kgymareqnajxqug", model.serverAddress()); - Assertions.assertEquals(1857528814684738489L, model.leaseTime()); + Assertions.assertEquals("hbxvvyhgsopbyrqu", model.displayName()); + Assertions.assertEquals(8014747037216452315L, model.revision()); + Assertions.assertEquals("lqwjygvjayvblm", model.serverAddress()); + Assertions.assertEquals(593391508400046676L, model.leaseTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("ubeddg") - .withRevision(4245550544561236483L) - .withServerAddress("kgymareqnajxqug") - .withLeaseTime(1857528814684738489L); + WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("hbxvvyhgsopbyrqu") + .withRevision(8014747037216452315L) + .withServerAddress("lqwjygvjayvblm") + .withLeaseTime(593391508400046676L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("ubeddg", model.displayName()); - Assertions.assertEquals(4245550544561236483L, model.revision()); - Assertions.assertEquals("kgymareqnajxqug", model.serverAddress()); - Assertions.assertEquals(1857528814684738489L, model.leaseTime()); + Assertions.assertEquals("hbxvvyhgsopbyrqu", model.displayName()); + Assertions.assertEquals(8014747037216452315L, model.revision()); + Assertions.assertEquals("lqwjygvjayvblm", model.serverAddress()); + Assertions.assertEquals(593391508400046676L, 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 index 384d83e2e41de..5ddcd297d33cf 100644 --- 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 @@ -14,30 +14,30 @@ public final class WorkloadNetworkDnsServiceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"uwqlgzrfzeey\",\"dnsServiceIp\":\"izikayuhq\",\"defaultDnsZone\":\"jbsybbqw\",\"fqdnZones\":[\"ldgmfpgvmpip\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":768699206851816710},\"id\":\"mwutwbdsre\",\"name\":\"pdrhne\",\"type\":\"yowqkdwytisibir\"}") + "{\"properties\":{\"displayName\":\"ywjhhgdnhx\",\"dnsServiceIp\":\"ivfomiloxgg\",\"defaultDnsZone\":\"fi\",\"fqdnZones\":[\"ieuzaofjchvcyyy\",\"fgdo\",\"cubiipuipw\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":3925666504611058153},\"id\":\"izsh\",\"name\":\"vcimpev\",\"type\":\"gmblrri\"}") .toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("uwqlgzrfzeey", model.displayName()); - Assertions.assertEquals("izikayuhq", model.dnsServiceIp()); - Assertions.assertEquals("jbsybbqw", model.defaultDnsZone()); - Assertions.assertEquals("ldgmfpgvmpip", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(768699206851816710L, model.revision()); + Assertions.assertEquals("ywjhhgdnhx", model.displayName()); + Assertions.assertEquals("ivfomiloxgg", model.dnsServiceIp()); + Assertions.assertEquals("fi", model.defaultDnsZone()); + Assertions.assertEquals("ieuzaofjchvcyyy", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); + Assertions.assertEquals(3925666504611058153L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("uwqlgzrfzeey") - .withDnsServiceIp("izikayuhq") - .withDefaultDnsZone("jbsybbqw") - .withFqdnZones(Arrays.asList("ldgmfpgvmpip")) - .withLogLevel(DnsServiceLogLevelEnum.DEBUG) - .withRevision(768699206851816710L); + WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("ywjhhgdnhx") + .withDnsServiceIp("ivfomiloxgg") + .withDefaultDnsZone("fi") + .withFqdnZones(Arrays.asList("ieuzaofjchvcyyy", "fgdo", "cubiipuipw")) + .withLogLevel(DnsServiceLogLevelEnum.WARNING) + .withRevision(3925666504611058153L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("uwqlgzrfzeey", model.displayName()); - Assertions.assertEquals("izikayuhq", model.dnsServiceIp()); - Assertions.assertEquals("jbsybbqw", model.defaultDnsZone()); - Assertions.assertEquals("ldgmfpgvmpip", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(768699206851816710L, model.revision()); + Assertions.assertEquals("ywjhhgdnhx", model.displayName()); + Assertions.assertEquals("ivfomiloxgg", model.dnsServiceIp()); + Assertions.assertEquals("fi", model.defaultDnsZone()); + Assertions.assertEquals("ieuzaofjchvcyyy", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); + Assertions.assertEquals(3925666504611058153L, 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 index 689b390599bd6..5a115f87d50f1 100644 --- 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 @@ -14,30 +14,31 @@ public final class WorkloadNetworkDnsServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceProperties model = BinaryData.fromString( - "{\"displayName\":\"pikpz\",\"dnsServiceIp\":\"ejzanlfz\",\"defaultDnsZone\":\"av\",\"fqdnZones\":[\"zonokixrjqci\",\"gzpfrla\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":1759449267384215724}") + "{\"displayName\":\"ywdxsmic\",\"dnsServiceIp\":\"rwfscjfnynszquj\",\"defaultDnsZone\":\"dvoqyt\",\"fqdnZones\":[\"owbb\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":805790317647492283}") .toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("pikpz", model.displayName()); - Assertions.assertEquals("ejzanlfz", model.dnsServiceIp()); - Assertions.assertEquals("av", model.defaultDnsZone()); - Assertions.assertEquals("zonokixrjqci", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, model.logLevel()); - Assertions.assertEquals(1759449267384215724L, model.revision()); + Assertions.assertEquals("ywdxsmic", model.displayName()); + Assertions.assertEquals("rwfscjfnynszquj", model.dnsServiceIp()); + Assertions.assertEquals("dvoqyt", model.defaultDnsZone()); + Assertions.assertEquals("owbb", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); + Assertions.assertEquals(805790317647492283L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("pikpz") - .withDnsServiceIp("ejzanlfz") - .withDefaultDnsZone("av") - .withFqdnZones(Arrays.asList("zonokixrjqci", "gzpfrla")) - .withLogLevel(DnsServiceLogLevelEnum.INFO) - .withRevision(1759449267384215724L); + WorkloadNetworkDnsServiceProperties model + = new WorkloadNetworkDnsServiceProperties().withDisplayName("ywdxsmic") + .withDnsServiceIp("rwfscjfnynszquj") + .withDefaultDnsZone("dvoqyt") + .withFqdnZones(Arrays.asList("owbb")) + .withLogLevel(DnsServiceLogLevelEnum.ERROR) + .withRevision(805790317647492283L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("pikpz", model.displayName()); - Assertions.assertEquals("ejzanlfz", model.dnsServiceIp()); - Assertions.assertEquals("av", model.defaultDnsZone()); - Assertions.assertEquals("zonokixrjqci", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, model.logLevel()); - Assertions.assertEquals(1759449267384215724L, model.revision()); + Assertions.assertEquals("ywdxsmic", model.displayName()); + Assertions.assertEquals("rwfscjfnynszquj", model.dnsServiceIp()); + Assertions.assertEquals("dvoqyt", model.defaultDnsZone()); + Assertions.assertEquals("owbb", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); + Assertions.assertEquals(805790317647492283L, 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 index c0d5495d39575..349b7cd8f0798 100644 --- 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 @@ -13,14 +13,14 @@ public final class WorkloadNetworkDnsServicesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServicesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"itykhevx\",\"dnsServiceIp\":\"edcpnmdyodnwzxl\",\"defaultDnsZone\":\"cvnhltiugc\",\"fqdnZones\":[\"vvwxqi\",\"y\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":8184174444781433747},\"id\":\"jrkvfgbvfvpdbo\",\"name\":\"acizsjqlhkrr\",\"type\":\"bdeibqipqk\"},{\"properties\":{\"displayName\":\"xndzwm\",\"dnsServiceIp\":\"efajpj\",\"defaultDnsZone\":\"wkqnyhg\",\"fqdnZones\":[\"tjivfxzsjabib\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":4706533550715277959},\"id\":\"vkvp\",\"name\":\"jxbkzbzkdvn\",\"type\":\"jabudurgkakmo\"}],\"nextLink\":\"hjjklff\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"qybaryeua\",\"dnsServiceIp\":\"kq\",\"defaultDnsZone\":\"qgzsles\",\"fqdnZones\":[\"hernntiewdjc\",\"bquwrbehw\",\"gohbuffkmrq\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":3657364039140978355},\"id\":\"futacoebjvewzc\",\"name\":\"znmwcp\",\"type\":\"guaadraufactkahz\"},{\"properties\":{\"displayName\":\"jjziuxxpsh\",\"dnsServiceIp\":\"e\",\"defaultDnsZone\":\"lfg\",\"fqdnZones\":[\"ubkwdle\",\"rds\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":5977101318302182370},\"id\":\"hminyflnorwmduv\",\"name\":\"pklvxw\",\"type\":\"ygdxpgpqchis\"},{\"properties\":{\"displayName\":\"nnbj\",\"dnsServiceIp\":\"xgibbda\",\"defaultDnsZone\":\"onfo\",\"fqdnZones\":[\"orsukokwbqp\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":7056990023571937899},\"id\":\"r\",\"name\":\"hw\",\"type\":\"soldweyuqdunv\"}],\"nextLink\":\"nrwrbiork\"}") .toObject(WorkloadNetworkDnsServicesList.class); - Assertions.assertEquals("itykhevx", model.value().get(0).displayName()); - Assertions.assertEquals("edcpnmdyodnwzxl", model.value().get(0).dnsServiceIp()); - Assertions.assertEquals("cvnhltiugc", model.value().get(0).defaultDnsZone()); - Assertions.assertEquals("vvwxqi", model.value().get(0).fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, model.value().get(0).logLevel()); - Assertions.assertEquals(8184174444781433747L, model.value().get(0).revision()); - Assertions.assertEquals("hjjklff", model.nextLink()); + Assertions.assertEquals("qybaryeua", model.value().get(0).displayName()); + Assertions.assertEquals("kq", model.value().get(0).dnsServiceIp()); + Assertions.assertEquals("qgzsles", model.value().get(0).defaultDnsZone()); + Assertions.assertEquals("hernntiewdjc", model.value().get(0).fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, model.value().get(0).logLevel()); + Assertions.assertEquals(3657364039140978355L, model.value().get(0).revision()); + Assertions.assertEquals("nrwrbiork", 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 index d98b7ad8071c9..5e9d3120f54ce 100644 --- 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 @@ -13,30 +13,30 @@ public final class WorkloadNetworkDnsZoneInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"wjygvjayvblmhvk\",\"domain\":[\"bxvvyhg\",\"opbyrqufegxu\",\"wz\",\"bnhlmc\"],\"dnsServerIps\":[\"dn\"],\"sourceIp\":\"tvgbmhrixkwmy\",\"dnsServices\":7002191229633475908,\"provisioningState\":\"Failed\",\"revision\":2235045579103867231},\"id\":\"pna\",\"name\":\"xexccbdreaxhcexd\",\"type\":\"rvqahqkghtpwi\"}") + "{\"properties\":{\"displayName\":\"il\",\"domain\":[\"wt\",\"gkxnyedabg\"],\"dnsServerIps\":[\"dtj\",\"ewbcihxuuw\",\"c\"],\"sourceIp\":\"xccybvpa\",\"dnsServices\":6238077672035548376,\"provisioningState\":\"Succeeded\",\"revision\":1791393814695153018},\"id\":\"wjplma\",\"name\":\"stcyohpfkyrkdbd\",\"type\":\"iogsjkmnwq\"}") .toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("wjygvjayvblmhvk", model.displayName()); - Assertions.assertEquals("bxvvyhg", model.domain().get(0)); - Assertions.assertEquals("dn", model.dnsServerIps().get(0)); - Assertions.assertEquals("tvgbmhrixkwmy", model.sourceIp()); - Assertions.assertEquals(7002191229633475908L, model.dnsServices()); - Assertions.assertEquals(2235045579103867231L, model.revision()); + Assertions.assertEquals("il", model.displayName()); + Assertions.assertEquals("wt", model.domain().get(0)); + Assertions.assertEquals("dtj", model.dnsServerIps().get(0)); + Assertions.assertEquals("xccybvpa", model.sourceIp()); + Assertions.assertEquals(6238077672035548376L, model.dnsServices()); + Assertions.assertEquals(1791393814695153018L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("wjygvjayvblmhvk") - .withDomain(Arrays.asList("bxvvyhg", "opbyrqufegxu", "wz", "bnhlmc")) - .withDnsServerIps(Arrays.asList("dn")) - .withSourceIp("tvgbmhrixkwmy") - .withDnsServices(7002191229633475908L) - .withRevision(2235045579103867231L); + WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("il") + .withDomain(Arrays.asList("wt", "gkxnyedabg")) + .withDnsServerIps(Arrays.asList("dtj", "ewbcihxuuw", "c")) + .withSourceIp("xccybvpa") + .withDnsServices(6238077672035548376L) + .withRevision(1791393814695153018L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("wjygvjayvblmhvk", model.displayName()); - Assertions.assertEquals("bxvvyhg", model.domain().get(0)); - Assertions.assertEquals("dn", model.dnsServerIps().get(0)); - Assertions.assertEquals("tvgbmhrixkwmy", model.sourceIp()); - Assertions.assertEquals(7002191229633475908L, model.dnsServices()); - Assertions.assertEquals(2235045579103867231L, model.revision()); + Assertions.assertEquals("il", model.displayName()); + Assertions.assertEquals("wt", model.domain().get(0)); + Assertions.assertEquals("dtj", model.dnsServerIps().get(0)); + Assertions.assertEquals("xccybvpa", model.sourceIp()); + Assertions.assertEquals(6238077672035548376L, model.dnsServices()); + Assertions.assertEquals(1791393814695153018L, 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 index 499a1bf190759..6fbcf6f68e10f 100644 --- 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 @@ -13,30 +13,31 @@ public final class WorkloadNetworkDnsZonePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneProperties model = BinaryData.fromString( - "{\"displayName\":\"hyjsvfycx\",\"domain\":[\"voowvr\",\"mtg\"],\"dnsServerIps\":[\"pyostronzmyhgfi\",\"nsxkmcwaekrrjr\",\"afxtsgum\",\"jglikkxwslolb\"],\"sourceIp\":\"vuzlm\",\"dnsServices\":4397404082163755540,\"provisioningState\":\"Failed\",\"revision\":8984187394901716724}") + "{\"displayName\":\"obaiyhddviaceg\",\"domain\":[\"ntfpmvmemfnc\"],\"dnsServerIps\":[\"vvbalx\"],\"sourceIp\":\"lchpodbzevwrdn\",\"dnsServices\":4609142412513709253,\"provisioningState\":\"Canceled\",\"revision\":9047416798509661707}") .toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("hyjsvfycx", model.displayName()); - Assertions.assertEquals("voowvr", model.domain().get(0)); - Assertions.assertEquals("pyostronzmyhgfi", model.dnsServerIps().get(0)); - Assertions.assertEquals("vuzlm", model.sourceIp()); - Assertions.assertEquals(4397404082163755540L, model.dnsServices()); - Assertions.assertEquals(8984187394901716724L, model.revision()); + Assertions.assertEquals("obaiyhddviaceg", model.displayName()); + Assertions.assertEquals("ntfpmvmemfnc", model.domain().get(0)); + Assertions.assertEquals("vvbalx", model.dnsServerIps().get(0)); + Assertions.assertEquals("lchpodbzevwrdn", model.sourceIp()); + Assertions.assertEquals(4609142412513709253L, model.dnsServices()); + Assertions.assertEquals(9047416798509661707L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("hyjsvfycx") - .withDomain(Arrays.asList("voowvr", "mtg")) - .withDnsServerIps(Arrays.asList("pyostronzmyhgfi", "nsxkmcwaekrrjr", "afxtsgum", "jglikkxwslolb")) - .withSourceIp("vuzlm") - .withDnsServices(4397404082163755540L) - .withRevision(8984187394901716724L); + WorkloadNetworkDnsZoneProperties model + = new WorkloadNetworkDnsZoneProperties().withDisplayName("obaiyhddviaceg") + .withDomain(Arrays.asList("ntfpmvmemfnc")) + .withDnsServerIps(Arrays.asList("vvbalx")) + .withSourceIp("lchpodbzevwrdn") + .withDnsServices(4609142412513709253L) + .withRevision(9047416798509661707L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("hyjsvfycx", model.displayName()); - Assertions.assertEquals("voowvr", model.domain().get(0)); - Assertions.assertEquals("pyostronzmyhgfi", model.dnsServerIps().get(0)); - Assertions.assertEquals("vuzlm", model.sourceIp()); - Assertions.assertEquals(4397404082163755540L, model.dnsServices()); - Assertions.assertEquals(8984187394901716724L, model.revision()); + Assertions.assertEquals("obaiyhddviaceg", model.displayName()); + Assertions.assertEquals("ntfpmvmemfnc", model.domain().get(0)); + Assertions.assertEquals("vvbalx", model.dnsServerIps().get(0)); + Assertions.assertEquals("lchpodbzevwrdn", model.sourceIp()); + Assertions.assertEquals(4609142412513709253L, model.dnsServices()); + Assertions.assertEquals(9047416798509661707L, 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 index 81777a7cd9d4a..5c13c35f14019 100644 --- 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 @@ -12,14 +12,14 @@ public final class WorkloadNetworkDnsZonesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZonesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"wp\",\"domain\":[\"wbtlhflsjcdh\",\"zfjvfbgofe\"],\"dnsServerIps\":[\"grqmqhldvrii\"],\"sourceIp\":\"jnalghf\",\"dnsServices\":3278506032102071495,\"provisioningState\":\"Canceled\",\"revision\":5911736298386623168},\"id\":\"ueluqhhahhxvrhmz\",\"name\":\"wpjgwws\",\"type\":\"ughftqsx\"},{\"properties\":{\"displayName\":\"ujxukndxd\",\"domain\":[\"jguufzdm\",\"yqtfihwh\",\"otzi\",\"gamv\"],\"dnsServerIps\":[\"o\"],\"sourceIp\":\"qzudphq\",\"dnsServices\":5906837724043027810,\"provisioningState\":\"Canceled\",\"revision\":8658128574697224769},\"id\":\"cvtbv\",\"name\":\"ayhmtnvyqiatkz\",\"type\":\"pcnp\"},{\"properties\":{\"displayName\":\"jaesgvvsccya\",\"domain\":[\"qfhwyg\"],\"dnsServerIps\":[\"dnkfx\",\"semdwzrmu\",\"apfcqdpsq\"],\"sourceIp\":\"vpsvuoymgcce\",\"dnsServices\":7407196234438308565,\"provisioningState\":\"Building\",\"revision\":251712560668340421},\"id\":\"feo\",\"name\":\"erqwkyhkobopg\",\"type\":\"edkowepbqpcrfk\"},{\"properties\":{\"displayName\":\"csnjvcdwxlpqekft\",\"domain\":[\"tjsyin\",\"wfqatmtd\"],\"dnsServerIps\":[\"dvypgikdgsz\"],\"sourceIp\":\"kbir\",\"dnsServices\":2468951178814203092,\"provisioningState\":\"Building\",\"revision\":2252515332247075185},\"id\":\"qrvqq\",\"name\":\"atjinrvgoupmfiib\",\"type\":\"ggjioolvr\"}],\"nextLink\":\"kvtkkg\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"oismsksbpimlqol\",\"domain\":[\"cgxxlxs\",\"fgcviz\",\"zdwlvwlyoupfgfb\",\"jub\"],\"dnsServerIps\":[\"gkfmins\",\"owzfttsttkt\"],\"sourceIp\":\"hbq\",\"dnsServices\":2084936073486724926,\"provisioningState\":\"Updating\",\"revision\":5228889169279168273},\"id\":\"itmmqtgqqqxh\",\"name\":\"n\",\"type\":\"rxcpjuisavo\"},{\"properties\":{\"displayName\":\"zfvazi\",\"domain\":[\"frqttbajlkatnw\"],\"dnsServerIps\":[\"opidkqqfkuv\",\"cxkdmligovi\"],\"sourceIp\":\"xk\",\"dnsServices\":5344178861543099367,\"provisioningState\":\"Deleting\",\"revision\":7839348907850790126},\"id\":\"cbgoor\",\"name\":\"te\",\"type\":\"ybfhjxa\"}],\"nextLink\":\"vjgsl\"}") .toObject(WorkloadNetworkDnsZonesList.class); - Assertions.assertEquals("wp", model.value().get(0).displayName()); - Assertions.assertEquals("wbtlhflsjcdh", model.value().get(0).domain().get(0)); - Assertions.assertEquals("grqmqhldvrii", model.value().get(0).dnsServerIps().get(0)); - Assertions.assertEquals("jnalghf", model.value().get(0).sourceIp()); - Assertions.assertEquals(3278506032102071495L, model.value().get(0).dnsServices()); - Assertions.assertEquals(5911736298386623168L, model.value().get(0).revision()); - Assertions.assertEquals("kvtkkg", model.nextLink()); + Assertions.assertEquals("oismsksbpimlqol", model.value().get(0).displayName()); + Assertions.assertEquals("cgxxlxs", model.value().get(0).domain().get(0)); + Assertions.assertEquals("gkfmins", model.value().get(0).dnsServerIps().get(0)); + Assertions.assertEquals("hbq", model.value().get(0).sourceIp()); + Assertions.assertEquals(2084936073486724926L, model.value().get(0).dnsServices()); + Assertions.assertEquals(5228889169279168273L, model.value().get(0).revision()); + Assertions.assertEquals("vjgsl", 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 index 69ce5eb99450e..9d1591a3d226a 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkGatewayInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"jhemms\",\"path\":\"dkcrodt\"},\"id\":\"nfwjlfltkacjvefk\",\"name\":\"lfoakg\",\"type\":\"kfpagao\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xhojuj\",\"path\":\"pelmcuvhixbjxyf\"},\"id\":\"yl\",\"name\":\"coolsttpkiwkkb\",\"type\":\"ujrywvtyl\"}") .toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("jhemms", model.displayName()); + Assertions.assertEquals("xhojuj", 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 index 64c3dc5f3f7f8..ab9ae6c6763d0 100644 --- 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 @@ -12,9 +12,9 @@ public final class WorkloadNetworkGatewayListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"wzsyyceuzs\",\"path\":\"bjudpfrxtrthzv\"},\"id\":\"tdwkqbrq\",\"name\":\"bpaxhexiilivpdt\",\"type\":\"irqtdqoa\"},{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"fgsqu\",\"path\":\"xrxxlep\"},\"id\":\"amxjezwlw\",\"name\":\"wxuqlcvydypatdoo\",\"type\":\"ojknio\"}],\"nextLink\":\"oo\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"gjqppy\",\"path\":\"tronzmyhgfi\"},\"id\":\"sxkm\",\"name\":\"waekrrjreafxtsgu\",\"type\":\"hjglikk\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"lbqpvuzlmvfelf\",\"path\":\"gplcrpwjxeznoigb\"},\"id\":\"jwmwkpnbs\",\"name\":\"zejjoqk\",\"type\":\"gfhsxttaugzxn\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"xdtnkdmkqjjlw\",\"path\":\"nvrk\"},\"id\":\"ou\",\"name\":\"ibreb\",\"type\":\"aays\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"tnqttezlwfffiak\",\"path\":\"pqqmted\"},\"id\":\"mmji\",\"name\":\"yeozphvwauyqncy\",\"type\":\"upkvipmdsc\"}],\"nextLink\":\"qupevzh\"}") .toObject(WorkloadNetworkGatewayList.class); - Assertions.assertEquals("wzsyyceuzs", model.value().get(0).displayName()); - Assertions.assertEquals("oo", model.nextLink()); + Assertions.assertEquals("gjqppy", model.value().get(0).displayName()); + Assertions.assertEquals("qupevzh", 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 index eeee12af55fd7..c753364b64811 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkGatewayPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayProperties model = BinaryData - .fromString("{\"provisioningState\":\"Updating\",\"displayName\":\"pqblylsyxkqjnsj\",\"path\":\"vti\"}") + .fromString("{\"provisioningState\":\"Building\",\"displayName\":\"curdoiwiitht\",\"path\":\"ubxcbihw\"}") .toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("pqblylsyxkqjnsj", model.displayName()); + Assertions.assertEquals("curdoiwiitht", 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 index f8db248d68300..f5c9499b60b69 100644 --- 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 @@ -11,7 +11,7 @@ public final class WorkloadNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"rq\",\"name\":\"ibahwflus\",\"type\":\"dtmhrkwofyyvoqa\"}") + "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"sdsttwvog\",\"name\":\"bbejdcngqqm\",\"type\":\"akufgmjz\"}") .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 index 9ed7e0ad24bc7..6a0984ab5e757 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"sbpfvmwyhr\",\"name\":\"ouyftaakc\",\"type\":\"wiyzvqtmnubexkp\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"ndjmquxvyp\",\"name\":\"mg\",\"type\":\"opkwhojv\"},{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"xysmoc\",\"name\":\"bq\",\"type\":\"qvmkcxo\"},{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"elxprglyatddck\",\"name\":\"bcuejrjxgci\",\"type\":\"ibrhosxsdqr\"}],\"nextLink\":\"o\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"bt\",\"name\":\"gsfraoyzkoow\",\"type\":\"lmnguxaw\"},{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"yuuximerqfobwyzn\",\"name\":\"bykutw\",\"type\":\"fhpagmhrskdsnf\"}],\"nextLink\":\"doakgtdlmkkzevdl\"}") .toObject(WorkloadNetworkList.class); - Assertions.assertEquals("o", model.nextLink()); + Assertions.assertEquals("doakgtdlmkkzevdl", 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 index ea056d6ce0ba3..4be2e2b56f488 100644 --- 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 @@ -13,27 +13,27 @@ public final class WorkloadNetworkPortMirroringInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"xbvtvudu\",\"direction\":\"EGRESS\",\"source\":\"rmrlxqtvcof\",\"destination\":\"f\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":8171649502486820994},\"id\":\"knnqvsaznq\",\"name\":\"tor\",\"type\":\"dsg\"}") + "{\"properties\":{\"displayName\":\"ojlpijnkrxf\",\"direction\":\"EGRESS\",\"source\":\"c\",\"destination\":\"tizzronasxif\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":319144288054659459},\"id\":\"wesgogczh\",\"name\":\"nnxk\",\"type\":\"lgnyhmo\"}") .toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("xbvtvudu", model.displayName()); + Assertions.assertEquals("ojlpijnkrxf", model.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); - Assertions.assertEquals("rmrlxqtvcof", model.source()); - Assertions.assertEquals("f", model.destination()); - Assertions.assertEquals(8171649502486820994L, model.revision()); + Assertions.assertEquals("c", model.source()); + Assertions.assertEquals("tizzronasxif", model.destination()); + Assertions.assertEquals(319144288054659459L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("xbvtvudu") + WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("ojlpijnkrxf") .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("rmrlxqtvcof") - .withDestination("f") - .withRevision(8171649502486820994L); + .withSource("c") + .withDestination("tizzronasxif") + .withRevision(319144288054659459L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("xbvtvudu", model.displayName()); + Assertions.assertEquals("ojlpijnkrxf", model.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); - Assertions.assertEquals("rmrlxqtvcof", model.source()); - Assertions.assertEquals("f", model.destination()); - Assertions.assertEquals(8171649502486820994L, model.revision()); + Assertions.assertEquals("c", model.source()); + Assertions.assertEquals("tizzronasxif", model.destination()); + Assertions.assertEquals(319144288054659459L, 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 index 6a4d7d66f0e34..c9d9728a5899e 100644 --- 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 @@ -13,13 +13,13 @@ public final class WorkloadNetworkPortMirroringListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"dszue\",\"direction\":\"EGRESS\",\"source\":\"zkfzbeyv\",\"destination\":\"qi\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":3810630755643539146},\"id\":\"dxrbuukzcle\",\"name\":\"yhmlwpaztzp\",\"type\":\"fn\"},{\"properties\":{\"displayName\":\"wyfzqwhxxbuyqa\",\"direction\":\"EGRESS\",\"source\":\"qztpp\",\"destination\":\"o\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":1269488169933236475},\"id\":\"lmncw\",\"name\":\"obqwcsdbnwdcfh\",\"type\":\"cqdpfuv\"}],\"nextLink\":\"sbjjc\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"dntwjchrdgo\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"mwctondzjluudfd\",\"destination\":\"gg\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":5516945390083190100},\"id\":\"tgseinqfiufxqkn\",\"name\":\"irgne\",\"type\":\"ttwqmsni\"}],\"nextLink\":\"cdm\"}") .toObject(WorkloadNetworkPortMirroringList.class); - Assertions.assertEquals("dszue", model.value().get(0).displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.value().get(0).direction()); - Assertions.assertEquals("zkfzbeyv", model.value().get(0).source()); - Assertions.assertEquals("qi", model.value().get(0).destination()); - Assertions.assertEquals(3810630755643539146L, model.value().get(0).revision()); - Assertions.assertEquals("sbjjc", model.nextLink()); + Assertions.assertEquals("dntwjchrdgo", model.value().get(0).displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.value().get(0).direction()); + Assertions.assertEquals("mwctondzjluudfd", model.value().get(0).source()); + Assertions.assertEquals("gg", model.value().get(0).destination()); + Assertions.assertEquals(5516945390083190100L, model.value().get(0).revision()); + Assertions.assertEquals("cdm", 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 index b41b5b6ea0d1f..9102d8a114889 100644 --- 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 @@ -13,28 +13,28 @@ public final class WorkloadNetworkPortMirroringPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringProperties model = BinaryData.fromString( - "{\"displayName\":\"hmk\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"auwjuetaebu\",\"destination\":\"vdmovsmzlxwabm\",\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":8365209556085472058}") + "{\"displayName\":\"xkk\",\"direction\":\"INGRESS\",\"source\":\"rghxjb\",\"destination\":\"qxvcxgfrpdsofb\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":20984502868975858}") .toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("hmk", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("auwjuetaebu", model.source()); - Assertions.assertEquals("vdmovsmzlxwabm", model.destination()); - Assertions.assertEquals(8365209556085472058L, model.revision()); + Assertions.assertEquals("xkk", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("rghxjb", model.source()); + Assertions.assertEquals("qxvcxgfrpdsofb", model.destination()); + Assertions.assertEquals(20984502868975858L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPortMirroringProperties model - = new WorkloadNetworkPortMirroringProperties().withDisplayName("hmk") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("auwjuetaebu") - .withDestination("vdmovsmzlxwabm") - .withRevision(8365209556085472058L); + = new WorkloadNetworkPortMirroringProperties().withDisplayName("xkk") + .withDirection(PortMirroringDirectionEnum.INGRESS) + .withSource("rghxjb") + .withDestination("qxvcxgfrpdsofb") + .withRevision(20984502868975858L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("hmk", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("auwjuetaebu", model.source()); - Assertions.assertEquals("vdmovsmzlxwabm", model.destination()); - Assertions.assertEquals(8365209556085472058L, model.revision()); + Assertions.assertEquals("xkk", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("rghxjb", model.source()); + Assertions.assertEquals("qxvcxgfrpdsofb", model.destination()); + Assertions.assertEquals(20984502868975858L, 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 index 11fe5aeac21c9..543171e16dc4e 100644 --- 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 @@ -11,6 +11,6 @@ public final class WorkloadNetworkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkProperties model - = BinaryData.fromString("{\"provisioningState\":\"Failed\"}").toObject(WorkloadNetworkProperties.class); + = BinaryData.fromString("{\"provisioningState\":\"Canceled\"}").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 index d4978c83f5c43..1294038584249 100644 --- 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 @@ -12,10 +12,10 @@ public final class WorkloadNetworkPublicIPsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIPsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"pwjxezn\",\"numberOfPublicIPs\":3866044551927129985,\"publicIPBlock\":\"njwmwkpnbsazejj\",\"provisioningState\":\"Succeeded\"},\"id\":\"gfhsxttaugzxn\",\"name\":\"aa\",\"type\":\"pxdtnkdmkq\"},{\"properties\":{\"displayName\":\"wuenvr\",\"numberOfPublicIPs\":1643740308818465085,\"publicIPBlock\":\"aibrebqaaysjkixq\",\"provisioningState\":\"Updating\"},\"id\":\"tezlwff\",\"name\":\"iakp\",\"type\":\"pqqmted\"}],\"nextLink\":\"mmji\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"myst\",\"numberOfPublicIPs\":885610274962208064,\"publicIPBlock\":\"pfcvlerchpqbmfp\",\"provisioningState\":\"Updating\"},\"id\":\"widf\",\"name\":\"xsspuunnoxyhk\",\"type\":\"g\"},{\"properties\":{\"displayName\":\"rihpfhoq\",\"numberOfPublicIPs\":1011085759791678741,\"publicIPBlock\":\"dao\",\"provisioningState\":\"Updating\"},\"id\":\"l\",\"name\":\"jxxkzbrmsgei\",\"type\":\"siykzkdncjdxonbz\"}],\"nextLink\":\"gculap\"}") .toObject(WorkloadNetworkPublicIPsList.class); - Assertions.assertEquals("pwjxezn", model.value().get(0).displayName()); - Assertions.assertEquals(3866044551927129985L, model.value().get(0).numberOfPublicIPs()); - Assertions.assertEquals("mmji", model.nextLink()); + Assertions.assertEquals("myst", model.value().get(0).displayName()); + Assertions.assertEquals(885610274962208064L, model.value().get(0).numberOfPublicIPs()); + Assertions.assertEquals("gculap", 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 index e1b840e6078a6..c5cda7b61762f 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"ozphvwauyqncygu\",\"numberOfPublicIPs\":9207382017369514266,\"publicIPBlock\":\"mdscwxqupev\",\"provisioningState\":\"Updating\"},\"id\":\"totxhojujb\",\"name\":\"pelmcuvhixbjxyf\",\"type\":\"n\"}") + "{\"properties\":{\"displayName\":\"rpgogtqxep\",\"numberOfPublicIPs\":4258812781218679511,\"publicIPBlock\":\"uajlyj\",\"provisioningState\":\"Building\"},\"id\":\"fqzhv\",\"name\":\"cib\",\"type\":\"fmo\"}") .toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("ozphvwauyqncygu", model.displayName()); - Assertions.assertEquals(9207382017369514266L, model.numberOfPublicIPs()); + Assertions.assertEquals("rpgogtqxep", model.displayName()); + Assertions.assertEquals(4258812781218679511L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpInner model = new WorkloadNetworkPublicIpInner().withDisplayName("ozphvwauyqncygu") - .withNumberOfPublicIPs(9207382017369514266L); + WorkloadNetworkPublicIpInner model = new WorkloadNetworkPublicIpInner().withDisplayName("rpgogtqxep") + .withNumberOfPublicIPs(4258812781218679511L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("ozphvwauyqncygu", model.displayName()); - Assertions.assertEquals(9207382017369514266L, model.numberOfPublicIPs()); + Assertions.assertEquals("rpgogtqxep", model.displayName()); + Assertions.assertEquals(4258812781218679511L, 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 index 103d026745813..e12a3097dfba5 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpProperties model = BinaryData.fromString( - "{\"displayName\":\"r\",\"numberOfPublicIPs\":880079432937074833,\"publicIPBlock\":\"ttpkiwkkbnujrywv\",\"provisioningState\":\"Canceled\"}") + "{\"displayName\":\"xrkjpvdw\",\"numberOfPublicIPs\":4789424331234549662,\"publicIPBlock\":\"ivwzjbhyzs\",\"provisioningState\":\"Updating\"}") .toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("r", model.displayName()); - Assertions.assertEquals(880079432937074833L, model.numberOfPublicIPs()); + Assertions.assertEquals("xrkjpvdw", model.displayName()); + Assertions.assertEquals(4789424331234549662L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpProperties model - = new WorkloadNetworkPublicIpProperties().withDisplayName("r").withNumberOfPublicIPs(880079432937074833L); + WorkloadNetworkPublicIpProperties model = new WorkloadNetworkPublicIpProperties().withDisplayName("xrkjpvdw") + .withNumberOfPublicIPs(4789424331234549662L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("r", model.displayName()); - Assertions.assertEquals(880079432937074833L, model.numberOfPublicIPs()); + Assertions.assertEquals("xrkjpvdw", model.displayName()); + Assertions.assertEquals(4789424331234549662L, 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 index 2b9987e9c7e25..d2062517029df 100644 --- 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 @@ -14,27 +14,27 @@ public final class WorkloadNetworkSegmentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"abikns\",\"connectedGateway\":\"gj\",\"subnet\":{\"dhcpRanges\":[\"dtlwwrlkd\",\"tncvokot\"],\"gatewayAddress\":\"xdy\"},\"portVif\":[{\"portName\":\"ocogj\"},{\"portName\":\"dtbnnha\"},{\"portName\":\"ocrkvcikh\"},{\"portName\":\"p\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":7776859938318021776},\"id\":\"zikywgg\",\"name\":\"kallatmel\",\"type\":\"uipiccjzk\"}") + "{\"properties\":{\"displayName\":\"twbdsrezpdrhn\",\"connectedGateway\":\"yowqkdwytisibir\",\"subnet\":{\"dhcpRanges\":[\"kpzi\",\"ejzanlfz\",\"iavrm\"],\"gatewayAddress\":\"onok\"},\"portVif\":[{\"portName\":\"q\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2813820823921531110},\"id\":\"azszrnwoiindfpw\",\"name\":\"jylwbtlhflsj\",\"type\":\"dhszfjv\"}") .toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("abikns", model.displayName()); - Assertions.assertEquals("gj", model.connectedGateway()); - Assertions.assertEquals("dtlwwrlkd", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("xdy", model.subnet().gatewayAddress()); - Assertions.assertEquals(7776859938318021776L, model.revision()); + Assertions.assertEquals("twbdsrezpdrhn", model.displayName()); + Assertions.assertEquals("yowqkdwytisibir", model.connectedGateway()); + Assertions.assertEquals("kpzi", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("onok", model.subnet().gatewayAddress()); + Assertions.assertEquals(2813820823921531110L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("abikns") - .withConnectedGateway("gj") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("dtlwwrlkd", "tncvokot")) - .withGatewayAddress("xdy")) - .withRevision(7776859938318021776L); + WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("twbdsrezpdrhn") + .withConnectedGateway("yowqkdwytisibir") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("kpzi", "ejzanlfz", "iavrm")) + .withGatewayAddress("onok")) + .withRevision(2813820823921531110L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("abikns", model.displayName()); - Assertions.assertEquals("gj", model.connectedGateway()); - Assertions.assertEquals("dtlwwrlkd", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("xdy", model.subnet().gatewayAddress()); - Assertions.assertEquals(7776859938318021776L, model.revision()); + Assertions.assertEquals("twbdsrezpdrhn", model.displayName()); + Assertions.assertEquals("yowqkdwytisibir", model.connectedGateway()); + Assertions.assertEquals("kpzi", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("onok", model.subnet().gatewayAddress()); + Assertions.assertEquals(2813820823921531110L, 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 index 602c91737e097..e8b62179f2fb8 100644 --- 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 @@ -12,7 +12,7 @@ public final class WorkloadNetworkSegmentPortVifTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentPortVif model - = BinaryData.fromString("{\"portName\":\"njhf\"}").toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("njhf", model.portName()); + = BinaryData.fromString("{\"portName\":\"yajguqfhwygzlv\"}").toObject(WorkloadNetworkSegmentPortVif.class); + Assertions.assertEquals("yajguqfhwygzlv", 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 index 7537355d2a3dc..01443c72ec230 100644 --- 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 @@ -14,27 +14,28 @@ public final class WorkloadNetworkSegmentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentProperties model = BinaryData.fromString( - "{\"displayName\":\"v\",\"connectedGateway\":\"vc\",\"subnet\":{\"dhcpRanges\":[\"hyrnxxmu\",\"edndr\",\"v\"],\"gatewayAddress\":\"kwqqtchealmf\"},\"portVif\":[{\"portName\":\"aygdvwvgpioh\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":4267712994723917741}") + "{\"displayName\":\"gofel\",\"connectedGateway\":\"grqmqhldvrii\",\"subnet\":{\"dhcpRanges\":[\"al\",\"hfkvtvsexsowuel\",\"qhhahhxvrhmzkwpj\",\"wws\"],\"gatewayAddress\":\"ghftqsxhqxujxuk\"},\"portVif\":[{\"portName\":\"igrjguufzdm\"},{\"portName\":\"qtfihwhbotzinga\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":3853655697248732253}") .toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("v", model.displayName()); - Assertions.assertEquals("vc", model.connectedGateway()); - Assertions.assertEquals("hyrnxxmu", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("kwqqtchealmf", model.subnet().gatewayAddress()); - Assertions.assertEquals(4267712994723917741L, model.revision()); + Assertions.assertEquals("gofel", model.displayName()); + Assertions.assertEquals("grqmqhldvrii", model.connectedGateway()); + Assertions.assertEquals("al", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("ghftqsxhqxujxuk", model.subnet().gatewayAddress()); + Assertions.assertEquals(3853655697248732253L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("v") - .withConnectedGateway("vc") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("hyrnxxmu", "edndr", "v")) - .withGatewayAddress("kwqqtchealmf")) - .withRevision(4267712994723917741L); + WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("gofel") + .withConnectedGateway("grqmqhldvrii") + .withSubnet(new WorkloadNetworkSegmentSubnet() + .withDhcpRanges(Arrays.asList("al", "hfkvtvsexsowuel", "qhhahhxvrhmzkwpj", "wws")) + .withGatewayAddress("ghftqsxhqxujxuk")) + .withRevision(3853655697248732253L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("v", model.displayName()); - Assertions.assertEquals("vc", model.connectedGateway()); - Assertions.assertEquals("hyrnxxmu", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("kwqqtchealmf", model.subnet().gatewayAddress()); - Assertions.assertEquals(4267712994723917741L, model.revision()); + Assertions.assertEquals("gofel", model.displayName()); + Assertions.assertEquals("grqmqhldvrii", model.connectedGateway()); + Assertions.assertEquals("al", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("ghftqsxhqxujxuk", model.subnet().gatewayAddress()); + Assertions.assertEquals(3853655697248732253L, 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 index 438795b83da64..2133394c7181a 100644 --- 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 @@ -12,20 +12,20 @@ public final class WorkloadNetworkSegmentSubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkSegmentSubnet model - = BinaryData.fromString("{\"dhcpRanges\":[\"pxgy\",\"agvrvmnpkuk\",\"himdbl\"],\"gatewayAddress\":\"wi\"}") - .toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("pxgy", model.dhcpRanges().get(0)); - Assertions.assertEquals("wi", model.gatewayAddress()); + WorkloadNetworkSegmentSubnet model = BinaryData.fromString( + "{\"dhcpRanges\":[\"udphqamvdkfwyn\",\"cvtbv\",\"ayhmtnvyqiatkz\",\"pcnp\"],\"gatewayAddress\":\"cjaesgvvs\"}") + .toObject(WorkloadNetworkSegmentSubnet.class); + Assertions.assertEquals("udphqamvdkfwyn", model.dhcpRanges().get(0)); + Assertions.assertEquals("cjaesgvvs", model.gatewayAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentSubnet model - = new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("pxgy", "agvrvmnpkuk", "himdbl")) - .withGatewayAddress("wi"); + WorkloadNetworkSegmentSubnet model = new WorkloadNetworkSegmentSubnet() + .withDhcpRanges(Arrays.asList("udphqamvdkfwyn", "cvtbv", "ayhmtnvyqiatkz", "pcnp")) + .withGatewayAddress("cjaesgvvs"); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("pxgy", model.dhcpRanges().get(0)); - Assertions.assertEquals("wi", model.gatewayAddress()); + Assertions.assertEquals("udphqamvdkfwyn", model.dhcpRanges().get(0)); + Assertions.assertEquals("cjaesgvvs", 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 index f187949617aaf..0f49df96e10b3 100644 --- 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 @@ -12,13 +12,13 @@ public final class WorkloadNetworkSegmentsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"btgiwbwoenwas\",\"connectedGateway\":\"tdtkcn\",\"subnet\":{\"dhcpRanges\":[\"p\",\"kulpiujwaasi\",\"qiiobyuqer\",\"qlpqwcciuq\"],\"gatewayAddress\":\"dbutauvfbtkuwhh\"},\"portVif\":[{\"portName\":\"ojoxafnndlp\"},{\"portName\":\"hkoymkcdyhbp\"},{\"portName\":\"pwdreqnovvqf\"},{\"portName\":\"ljxywsu\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":1595532838454650942},\"id\":\"tgadgvraeaen\",\"name\":\"qnzarrwl\",\"type\":\"uu\"},{\"properties\":{\"displayName\":\"qkacewii\",\"connectedGateway\":\"pubjibw\",\"subnet\":{\"dhcpRanges\":[\"ohqkvpuvksgpls\",\"kn\",\"n\",\"synljphuopxodl\"],\"gatewayAddress\":\"ynt\"},\"portVif\":[{\"portName\":\"hleosjsw\"},{\"portName\":\"mslyzrpzbchckqqz\"},{\"portName\":\"ox\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":8143854718765989330},\"id\":\"ked\",\"name\":\"atrwyhqmibzyh\",\"type\":\"itsmypyyn\"}],\"nextLink\":\"dpumnzgmw\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"twaenuuzko\",\"connectedGateway\":\"minrfdw\",\"subnet\":{\"dhcpRanges\":[\"hziuiefozbhdms\",\"l\"],\"gatewayAddress\":\"qhoftrmaequiah\"},\"portVif\":[{\"portName\":\"lfaoqzpiyylhaln\"},{\"portName\":\"hc\"},{\"portName\":\"ph\"},{\"portName\":\"ivwitqscywugg\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":6648537753700098134},\"id\":\"emh\",\"name\":\"i\",\"type\":\"sbrgz\"},{\"properties\":{\"displayName\":\"swe\",\"connectedGateway\":\"qwdxggicc\",\"subnet\":{\"dhcpRanges\":[\"huexmk\",\"tlstvlzywem\"],\"gatewayAddress\":\"rncsdtclu\"},\"portVif\":[{\"portName\":\"bsfgytguslfea\"},{\"portName\":\"ygqukyhejh\"},{\"portName\":\"sx\"},{\"portName\":\"pelol\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":8128051497759597763},\"id\":\"ujzra\",\"name\":\"htwdwrftswibyrcd\",\"type\":\"bhshfwpracstwity\"},{\"properties\":{\"displayName\":\"vxccedcp\",\"connectedGateway\":\"dyodnwzxltj\",\"subnet\":{\"dhcpRanges\":[\"ltiugcxnavv\"],\"gatewayAddress\":\"qiby\"},\"portVif\":[{\"portName\":\"owx\"},{\"portName\":\"mdjrkvfgbvfvp\"},{\"portName\":\"odacizs\"},{\"portName\":\"lhkrribdeibqipqk\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":4034217572792949127},\"id\":\"krefajpjo\",\"name\":\"wkqnyhg\",\"type\":\"ij\"},{\"properties\":{\"displayName\":\"vfxzsjab\",\"connectedGateway\":\"systawfsdjp\",\"subnet\":{\"dhcpRanges\":[\"bjxbkzbzk\"],\"gatewayAddress\":\"ncj\"},\"portVif\":[{\"portName\":\"urgkakmokzhjjk\"},{\"portName\":\"fhmouwq\"},{\"portName\":\"zrfze\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":7551956675766407600},\"id\":\"yuhqlbjbsybbqwrv\",\"name\":\"ldgmfpgvmpip\",\"type\":\"slthaq\"}],\"nextLink\":\"ss\"}") .toObject(WorkloadNetworkSegmentsList.class); - Assertions.assertEquals("btgiwbwoenwas", model.value().get(0).displayName()); - Assertions.assertEquals("tdtkcn", model.value().get(0).connectedGateway()); - Assertions.assertEquals("p", model.value().get(0).subnet().dhcpRanges().get(0)); - Assertions.assertEquals("dbutauvfbtkuwhh", model.value().get(0).subnet().gatewayAddress()); - Assertions.assertEquals(1595532838454650942L, model.value().get(0).revision()); - Assertions.assertEquals("dpumnzgmw", model.nextLink()); + Assertions.assertEquals("twaenuuzko", model.value().get(0).displayName()); + Assertions.assertEquals("minrfdw", model.value().get(0).connectedGateway()); + Assertions.assertEquals("hziuiefozbhdms", model.value().get(0).subnet().dhcpRanges().get(0)); + Assertions.assertEquals("qhoftrmaequiah", model.value().get(0).subnet().gatewayAddress()); + Assertions.assertEquals(6648537753700098134L, model.value().get(0).revision()); + Assertions.assertEquals("ss", 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 index 7bec28b49258f..27fdc501eba14 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkVMGroupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"nuuzkopbm\",\"members\":[\"fdwoyuhh\",\"iuiefozbhdmsm\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":1203862565285552699},\"id\":\"maequiahxicslfa\",\"name\":\"qzpiyyl\",\"type\":\"alnswhccsphk\"}") + "{\"properties\":{\"displayName\":\"umrtwnawjsl\",\"members\":[\"kojgcyzts\",\"mznbaeqphch\",\"nrnrp\",\"ehuwrykqgaifmvik\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":8629783382496754434},\"id\":\"jdz\",\"name\":\"xcv\",\"type\":\"srhnjivo\"}") .toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("nuuzkopbm", model.displayName()); - Assertions.assertEquals("fdwoyuhh", model.members().get(0)); - Assertions.assertEquals(1203862565285552699L, model.revision()); + Assertions.assertEquals("umrtwnawjsl", model.displayName()); + Assertions.assertEquals("kojgcyzts", model.members().get(0)); + Assertions.assertEquals(8629783382496754434L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("nuuzkopbm") - .withMembers(Arrays.asList("fdwoyuhh", "iuiefozbhdmsm")) - .withRevision(1203862565285552699L); + WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("umrtwnawjsl") + .withMembers(Arrays.asList("kojgcyzts", "mznbaeqphch", "nrnrp", "ehuwrykqgaifmvik")) + .withRevision(8629783382496754434L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("nuuzkopbm", model.displayName()); - Assertions.assertEquals("fdwoyuhh", model.members().get(0)); - Assertions.assertEquals(1203862565285552699L, model.revision()); + Assertions.assertEquals("umrtwnawjsl", model.displayName()); + Assertions.assertEquals("kojgcyzts", model.members().get(0)); + Assertions.assertEquals(8629783382496754434L, 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 index 3261543d43d06..eefcd87ba814b 100644 --- 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 @@ -13,21 +13,22 @@ public final class WorkloadNetworkVMGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupProperties model = BinaryData.fromString( - "{\"displayName\":\"vwitqscyw\",\"members\":[\"woluhczbwemhair\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":1910924176223083649}") + "{\"displayName\":\"tnovqfzgemjdftul\",\"members\":[\"duceamtmc\",\"u\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":708418830447367497}") .toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("vwitqscyw", model.displayName()); - Assertions.assertEquals("woluhczbwemhair", model.members().get(0)); - Assertions.assertEquals(1910924176223083649L, model.revision()); + Assertions.assertEquals("tnovqfzgemjdftul", model.displayName()); + Assertions.assertEquals("duceamtmc", model.members().get(0)); + Assertions.assertEquals(708418830447367497L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("vwitqscyw") - .withMembers(Arrays.asList("woluhczbwemhair")) - .withRevision(1910924176223083649L); + WorkloadNetworkVMGroupProperties model + = new WorkloadNetworkVMGroupProperties().withDisplayName("tnovqfzgemjdftul") + .withMembers(Arrays.asList("duceamtmc", "u")) + .withRevision(708418830447367497L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("vwitqscyw", model.displayName()); - Assertions.assertEquals("woluhczbwemhair", model.members().get(0)); - Assertions.assertEquals(1910924176223083649L, model.revision()); + Assertions.assertEquals("tnovqfzgemjdftul", model.displayName()); + Assertions.assertEquals("duceamtmc", model.members().get(0)); + Assertions.assertEquals(708418830447367497L, 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 index 12a328b7afd65..1924248c3d56f 100644 --- 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 @@ -12,11 +12,11 @@ public final class WorkloadNetworkVMGroupsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"u\",\"members\":[\"mqlgk\",\"btndo\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":1271439560574404501},\"id\":\"ujitcjedftww\",\"name\":\"ezkojvdcp\",\"type\":\"foqouicybx\"},{\"properties\":{\"displayName\":\"gszufoxciqopid\",\"members\":[\"ciodhkhaz\",\"khnzbonlw\",\"toego\",\"dwbwhkszzcmrvexz\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":540192537661103477},\"id\":\"aoyzkoow\",\"name\":\"lmnguxaw\",\"type\":\"aldsy\"},{\"properties\":{\"displayName\":\"imerqfobwyznk\",\"members\":[\"utwpfhp\",\"gmhrskdsnfdsdoak\"],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":6593579522164343265},\"id\":\"vdlhewpusdsttwv\",\"name\":\"gvbbejdcng\",\"type\":\"qmoa\"}],\"nextLink\":\"fgmjzrwrdgrt\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"vz\",\"members\":[\"ycnunvjsrtk\",\"awnopqgikyzirtxd\",\"uxzejntpsew\",\"ioilqukrydxtq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":5252415972799158831},\"id\":\"ufhyaomtbgh\",\"name\":\"avgrvkffovjz\",\"type\":\"pjbi\"},{\"properties\":{\"displayName\":\"mfxumvfcluyovw\",\"members\":[\"kfezzxscyhwz\",\"g\",\"rujbzbomvzzbtdc\",\"vp\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":4156012930167419412},\"id\":\"wdsh\",\"name\":\"ssnrbgye\",\"type\":\"rymsgaojfmw\"},{\"properties\":{\"displayName\":\"tmr\",\"members\":[\"rctym\",\"xoftpipiwyczu\",\"xacpqjli\",\"hyus\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":5972606310193139455},\"id\":\"fwdgzxulucvp\",\"name\":\"mrsreuzvxurisjnh\",\"type\":\"ytxifqjzgxmrh\"},{\"properties\":{\"displayName\":\"wp\",\"members\":[\"utr\",\"jupauut\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2623463508515246746},\"id\":\"qg\",\"name\":\"zpnfqntcypsxj\",\"type\":\"foimwkslircizjxv\"}],\"nextLink\":\"fceacvlhvygd\"}") .toObject(WorkloadNetworkVMGroupsList.class); - Assertions.assertEquals("u", model.value().get(0).displayName()); - Assertions.assertEquals("mqlgk", model.value().get(0).members().get(0)); - Assertions.assertEquals(1271439560574404501L, model.value().get(0).revision()); - Assertions.assertEquals("fgmjzrwrdgrt", model.nextLink()); + Assertions.assertEquals("vz", model.value().get(0).displayName()); + Assertions.assertEquals("ycnunvjsrtk", model.value().get(0).members().get(0)); + Assertions.assertEquals(5252415972799158831L, model.value().get(0).revision()); + Assertions.assertEquals("fceacvlhvygd", 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 index 4f326ab634d01..efc1e08f2c55a 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"sfgytguslfead\",\"vmType\":\"EDGE\"},\"id\":\"ukyhejhzis\",\"name\":\"gfpelolppvksrpqv\",\"type\":\"jzraehtwdwrf\"}") + "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"txhwgfws\",\"vmType\":\"EDGE\"},\"id\":\"coezbrhubskh\",\"name\":\"dyg\",\"type\":\"ookk\"}") .toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("sfgytguslfead", model.displayName()); + Assertions.assertEquals("txhwgfws", 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 index d2cca7b33fa06..8b4e138445626 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineProperties model = BinaryData - .fromString("{\"provisioningState\":\"Canceled\",\"displayName\":\"byrcdlbhshfwp\",\"vmType\":\"REGULAR\"}") + .fromString("{\"provisioningState\":\"Failed\",\"displayName\":\"bvleorfmluiqtqzf\",\"vmType\":\"EDGE\"}") .toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("byrcdlbhshfwp", model.displayName()); + Assertions.assertEquals("bvleorfmluiqtqzf", 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 index 902f76fdb5e8d..4ef437d6a5754 100644 --- 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 @@ -12,9 +12,9 @@ public final class WorkloadNetworkVirtualMachinesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"qwdxggicc\",\"vmType\":\"REGULAR\"},\"id\":\"huexmk\",\"name\":\"tlstvlzywem\",\"type\":\"zrncsdt\"}],\"nextLink\":\"u\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"ssxmojms\",\"vmType\":\"REGULAR\"},\"id\":\"prvkwcfzqljyxgtc\",\"name\":\"heyd\",\"type\":\"sdshmkxmaehvb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"pltfnhtba\",\"vmType\":\"EDGE\"},\"id\":\"ywrckp\",\"name\":\"kl\",\"type\":\"hpluodpvruudlg\"},{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"ostgkts\",\"vmType\":\"EDGE\"},\"id\":\"eclze\",\"name\":\"qbcvhzlhplod\",\"type\":\"kdl\"}],\"nextLink\":\"qfbumlkxtrqjf\"}") .toObject(WorkloadNetworkVirtualMachinesList.class); - Assertions.assertEquals("qwdxggicc", model.value().get(0).displayName()); - Assertions.assertEquals("u", model.nextLink()); + Assertions.assertEquals("ssxmojms", model.value().get(0).displayName()); + Assertions.assertEquals("qfbumlkxtrqjf", 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 index 85c9901e387da..b37f411f9f45e 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDhcpMockTests { @Test public void testCreateDhcp() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"petogebjox\",\"segments\":[\"vnh\"],\"provisioningState\":\"Succeeded\",\"revision\":463304728293019081},\"id\":\"kzjcjbtrgae\",\"name\":\"vvib\",\"type\":\"xjjs\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"leohibetnluankr\",\"segments\":[\"eeebtijvacv\",\"mq\",\"bqqxlaj\",\"nw\"],\"provisioningState\":\"Succeeded\",\"revision\":2784430533313824675},\"id\":\"jkuyxoafgaoq\",\"name\":\"tfaeyl\",\"type\":\"nm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testCreateDhcp() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDhcp response = manager.workloadNetworks() - .defineDhcp("ikf") - .withExistingWorkloadNetwork("wotey", "wcluqovekqvgq", "uwifzmpjwyiv") + .defineDhcp("rzpasccbiuimzdly") + .withExistingWorkloadNetwork("aiouaubrjt", "oq", "fuojrngif") .withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("hrfsphuagrtti").withRevision(7883022690716225158L)) + new WorkloadNetworkDhcpEntity().withDisplayName("qwmkyoquf").withRevision(4194786245193898311L)) .create(); - Assertions.assertEquals("petogebjox", response.properties().displayName()); - Assertions.assertEquals(463304728293019081L, response.properties().revision()); + Assertions.assertEquals("leohibetnluankr", response.properties().displayName()); + Assertions.assertEquals(2784430533313824675L, 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 index 6d9beda288905..05b0941487e86 100644 --- 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateDnsServiceMockTests { @Test public void testCreateDnsService() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"gcealzxwh\",\"dnsServiceIp\":\"nsymoyqhlwigd\",\"defaultDnsZone\":\"bkbxgomfa\",\"fqdnZones\":[\"asqvd\",\"e\",\"y\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":3603243010812205554},\"id\":\"bezkgimsidxasic\",\"name\":\"dyvvjskgfmocwahp\",\"type\":\"gat\"}"; + = "{\"properties\":{\"displayName\":\"ids\",\"dnsServiceIp\":\"ultxijjumfq\",\"defaultDnsZone\":\"z\",\"fqdnZones\":[\"nm\",\"jng\",\"qdqx\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":5760443423859824953},\"id\":\"zsvtuikzhajqgl\",\"name\":\"fh\",\"type\":\"l\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,21 @@ public void testCreateDnsService() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsService response = manager.workloadNetworks() - .defineDnsService("ti") - .withExistingWorkloadNetwork("tilaxh", "fhqlyvi", "ouwivkxoyzunbixx") - .withDisplayName("pwpgclrci") - .withDnsServiceIp("soxfrken") - .withDefaultDnsZone("m") - .withFqdnZones(Arrays.asList("frpmpdnqqskaw")) - .withLogLevel(DnsServiceLogLevelEnum.INFO) - .withRevision(118268358895074671L) + .defineDnsService("hahzvechndbnwi") + .withExistingWorkloadNetwork("prprsnmokay", "ejnhlbkpb", "pcpil") + .withDisplayName("lewjwiuubwef") + .withDnsServiceIp("fapaqtfer") + .withDefaultDnsZone("wexjkmfxapjwogq") + .withFqdnZones(Arrays.asList("bpudcdab")) + .withLogLevel(DnsServiceLogLevelEnum.DEBUG) + .withRevision(8313394416637011338L) .create(); - Assertions.assertEquals("gcealzxwh", response.displayName()); - Assertions.assertEquals("nsymoyqhlwigd", response.dnsServiceIp()); - Assertions.assertEquals("bkbxgomfa", response.defaultDnsZone()); - Assertions.assertEquals("asqvd", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, response.logLevel()); - Assertions.assertEquals(3603243010812205554L, response.revision()); + Assertions.assertEquals("ids", response.displayName()); + Assertions.assertEquals("ultxijjumfq", response.dnsServiceIp()); + Assertions.assertEquals("z", response.defaultDnsZone()); + Assertions.assertEquals("nm", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.logLevel()); + Assertions.assertEquals(5760443423859824953L, 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 index d35e2dd2a06ba..db9087f2b29b6 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDnsZoneMockTests { @Test public void testCreateDnsZone() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"v\",\"domain\":[\"exavoxt\",\"glecdmdqbwpypq\"],\"dnsServerIps\":[\"fjacbslhhxudb\"],\"sourceIp\":\"odhtnsirudhzm\",\"dnsServices\":5834441974994701592,\"provisioningState\":\"Succeeded\",\"revision\":8486259057106369538},\"id\":\"zrcxfailcfxwmdbo\",\"name\":\"dfgsftufqobrj\",\"type\":\"nac\"}"; + = "{\"properties\":{\"displayName\":\"lkafhonqjuje\",\"domain\":[\"pzvcpopmxelnwc\",\"tyjedex\",\"mlfmkqs\",\"azuawx\"],\"dnsServerIps\":[\"puamwabzxr\"],\"sourceIp\":\"cush\",\"dnsServices\":5616883092736591366,\"provisioningState\":\"Succeeded\",\"revision\":4154943067306073010},\"id\":\"sflvgsgzwywakoih\",\"name\":\"nsmjbl\",\"type\":\"ljhlnymzotq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,21 +32,21 @@ public void testCreateDnsZone() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsZone response = manager.workloadNetworks() - .defineDnsZone("yxkyxvx") - .withExistingWorkloadNetwork("eaahhvjhhn", "kzyb", "jjidjk") - .withDisplayName("lbj") - .withDomain(Arrays.asList("ljlageuaulxu", "smjbnkppxyn", "nlsvxeiz")) - .withDnsServerIps(Arrays.asList("klnsrmffey", "xcktpiymerteeamm", "qiekkkzddrt")) - .withSourceIp("doj") - .withDnsServices(2082724442990629363L) - .withRevision(8464578871437548472L) + .defineDnsZone("hv") + .withExistingWorkloadNetwork("qryxyn", "nzrdpsovwxz", "ptgoeiybbabp") + .withDisplayName("kvntjlrigjkskyri") + .withDomain(Arrays.asList("zid", "xwaabzmifrygznmm", "xrizkzobgop")) + .withDnsServerIps(Arrays.asList("slnelx")) + .withSourceIp("ixynllxecwcrojp") + .withDnsServices(2433482650518056787L) + .withRevision(8260049170746325095L) .create(); - Assertions.assertEquals("v", response.displayName()); - Assertions.assertEquals("exavoxt", response.domain().get(0)); - Assertions.assertEquals("fjacbslhhxudb", response.dnsServerIps().get(0)); - Assertions.assertEquals("odhtnsirudhzm", response.sourceIp()); - Assertions.assertEquals(5834441974994701592L, response.dnsServices()); - Assertions.assertEquals(8486259057106369538L, response.revision()); + Assertions.assertEquals("lkafhonqjuje", response.displayName()); + Assertions.assertEquals("pzvcpopmxelnwc", response.domain().get(0)); + Assertions.assertEquals("puamwabzxr", response.dnsServerIps().get(0)); + Assertions.assertEquals("cush", response.sourceIp()); + Assertions.assertEquals(5616883092736591366L, response.dnsServices()); + Assertions.assertEquals(4154943067306073010L, 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 index 874df625a486b..8aa62389f1690 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreatePortMirroringMockTests { @Test public void testCreatePortMirroring() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"snfepgfewetwlyx\",\"direction\":\"EGRESS\",\"source\":\"ykxhdjh\",\"destination\":\"mmbcxfhbcp\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2736440248619026147},\"id\":\"qizxfpxtgqscjavf\",\"name\":\"juhdqazkmtgguwpi\",\"type\":\"r\"}"; + = "{\"properties\":{\"displayName\":\"ugcmjkavlgorb\",\"direction\":\"INGRESS\",\"source\":\"mdtzfjltfvnzc\",\"destination\":\"t\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":175217187647549026},\"id\":\"dbzqgqqihed\",\"name\":\"vqwt\",\"type\":\"mkyi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,19 +32,19 @@ public void testCreatePortMirroring() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPortMirroring response = manager.workloadNetworks() - .definePortMirroring("hujswtwkozzwcul") - .withExistingWorkloadNetwork("oqbeitpkxzt", "oobklftidgfcwq", "pimaqxzhemjyh") - .withDisplayName("wpfaj") - .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("tlwtjjguktalhsn") - .withDestination("cdmxzrpoaiml") - .withRevision(1869665425773313749L) + .definePortMirroring("ciqdsme") + .withExistingWorkloadNetwork("gv", "irpghriypoqeyh", "qhykprlpyzn") + .withDisplayName("tdfuxt") + .withDirection(PortMirroringDirectionEnum.INGRESS) + .withSource("ibmi") + .withDestination("nnust") + .withRevision(5871871887515703016L) .create(); - Assertions.assertEquals("snfepgfewetwlyx", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); - Assertions.assertEquals("ykxhdjh", response.source()); - Assertions.assertEquals("mmbcxfhbcp", response.destination()); - Assertions.assertEquals(2736440248619026147L, response.revision()); + Assertions.assertEquals("ugcmjkavlgorb", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.direction()); + Assertions.assertEquals("mdtzfjltfvnzc", response.source()); + Assertions.assertEquals("t", response.destination()); + Assertions.assertEquals(175217187647549026L, 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 index 61b62fdeaccda..914f790f310c1 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksCreatePublicIPMockTests { @Test public void testCreatePublicIP() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"gc\",\"numberOfPublicIPs\":3532216119776852559,\"publicIPBlock\":\"wmbtmvpdvjdhtt\",\"provisioningState\":\"Succeeded\"},\"id\":\"edxihchrphkmcrj\",\"name\":\"qnsdfzpbgtgky\",\"type\":\"kdghrjeuutlwx\"}"; + = "{\"properties\":{\"displayName\":\"fmd\",\"numberOfPublicIPs\":6699209546481289729,\"publicIPBlock\":\"gi\",\"provisioningState\":\"Succeeded\"},\"id\":\"felisdjub\",\"name\":\"gbqi\",\"type\":\"kxkbsazgakgacyr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreatePublicIP() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPublicIp response = manager.workloadNetworks() - .definePublicIP("zvulj") - .withExistingWorkloadNetwork("cc", "knh", "kizvytn") - .withDisplayName("eranokqgukkjqnv") - .withNumberOfPublicIPs(8939885428846863813L) + .definePublicIP("ujlzqnhcvsqltn") + .withExistingWorkloadNetwork("ryuzcbmqqv", "mv", "fgtayxonsup") + .withDisplayName("bgsxgnxfyqonmpq") + .withNumberOfPublicIPs(1423276340735833697L) .create(); - Assertions.assertEquals("gc", response.displayName()); - Assertions.assertEquals(3532216119776852559L, response.numberOfPublicIPs()); + Assertions.assertEquals("fmd", response.displayName()); + Assertions.assertEquals(6699209546481289729L, response.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java index ad3eb45a35d17..73cab07a8586f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateSegmentMockTests { @Test public void testCreateSegment() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"agy\",\"connectedGateway\":\"qfby\",\"subnet\":{\"dhcpRanges\":[\"giagtcojo\",\"qwogfnzjvus\",\"zldmozuxy\",\"fsbtkad\"],\"gatewayAddress\":\"s\"},\"portVif\":[{\"portName\":\"tgkbugrjqctojc\"},{\"portName\":\"sofieypefojyqd\"},{\"portName\":\"u\"},{\"portName\":\"cp\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":4772372481641988855},\"id\":\"lhzdsqtzb\",\"name\":\"rgnowcjhfgm\",\"type\":\"ecactx\"}"; + = "{\"properties\":{\"displayName\":\"akchzyvlixqnrk\",\"connectedGateway\":\"kjibnxmysuxswqrn\",\"subnet\":{\"dhcpRanges\":[\"ijpstte\",\"oqq\",\"wcyyufmhruncu\",\"mqspkcdqzhlctdd\"],\"gatewayAddress\":\"qn\"},\"portVif\":[{\"portName\":\"chrqb\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":3423454128709861544},\"id\":\"dcwboxjum\",\"name\":\"qqoli\",\"type\":\"r\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +33,19 @@ public void testCreateSegment() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkSegment response = manager.workloadNetworks() - .defineSegment("xg") - .withExistingWorkloadNetwork("spave", "hrv", "bunzozudh") - .withDisplayName("yxcdyuibhmfdnbzy") - .withConnectedGateway("f") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("naeo", "srvhmgorffuki")) - .withGatewayAddress("vwmzhwplefaxvxil")) - .withRevision(8809168943963914641L) + .defineSegment("ypuuwwltvuqjctze") + .withExistingWorkloadNetwork("lvidizozs", "bccxjmonfdgn", "n") + .withDisplayName("if") + .withConnectedGateway("hmkdasvfl") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("cu", "chxgs", "boldforobwj")) + .withGatewayAddress("izbfhfovvacq")) + .withRevision(8492119421545831935L) .create(); - Assertions.assertEquals("agy", response.displayName()); - Assertions.assertEquals("qfby", response.connectedGateway()); - Assertions.assertEquals("giagtcojo", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("s", response.subnet().gatewayAddress()); - Assertions.assertEquals(4772372481641988855L, response.revision()); + Assertions.assertEquals("akchzyvlixqnrk", response.displayName()); + Assertions.assertEquals("kjibnxmysuxswqrn", response.connectedGateway()); + Assertions.assertEquals("ijpstte", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("qn", response.subnet().gatewayAddress()); + Assertions.assertEquals(3423454128709861544L, 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 index 9973ac7f095ef..43da44348603b 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateVMGroupMockTests { @Test public void testCreateVMGroup() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"hzjhf\",\"members\":[\"vvmu\",\"gpmuneqsxvmhfbuz\",\"yihsasbhudypohyu\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":3075885746767216016},\"id\":\"rpfoobr\",\"name\":\"ttymsjny\",\"type\":\"qdnfwqzdz\"}"; + = "{\"properties\":{\"displayName\":\"xbkwv\",\"members\":[\"zvd\",\"bzdixzmq\",\"noda\",\"opqhewjptmc\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":7127280864515771015},\"id\":\"ndlatutmzlbi\",\"name\":\"jlvfhrbbpneqv\",\"type\":\"wwyyurmoch\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testCreateVMGroup() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVMGroup response = manager.workloadNetworks() - .defineVMGroup("uvyinzqodfvpgs") - .withExistingWorkloadNetwork("jcivmmg", "f", "fiwrxgkn") - .withDisplayName("gsgbpfgzdjt") - .withMembers(Arrays.asList("flbqvgaq", "lgafcqusrdve")) - .withRevision(4392924030472678320L) + .defineVMGroup("sufco") + .withExistingWorkloadNetwork("cysihs", "qcwdhoh", "dtmcd") + .withDisplayName("bzlmcm") + .withMembers(Arrays.asList("cvhd", "evwqqxeyskonq", "inkfkbgbz", "owxeqocljmy")) + .withRevision(7238686048723622110L) .create(); - Assertions.assertEquals("hzjhf", response.displayName()); - Assertions.assertEquals("vvmu", response.members().get(0)); - Assertions.assertEquals(3075885746767216016L, response.revision()); + Assertions.assertEquals("xbkwv", response.displayName()); + Assertions.assertEquals("zvd", response.members().get(0)); + Assertions.assertEquals(7127280864515771015L, 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 index db2e52bea93b1..3fb9c383e28a8 100644 --- 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 @@ -28,7 +28,8 @@ public void testDeleteDhcp() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworks() - .deleteDhcp("jdftuljltd", "ceamtm", "zuo", "ejwcwwqiok", com.azure.core.util.Context.NONE); + .deleteDhcp("tgkbugrjqctojc", "isofieypefojyqd", "cuplcplcwkhih", "hlhzdsqtzbsrgno", + 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 index 2e86bcdcc8136..241aa7ac97bea 100644 --- 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 @@ -27,7 +27,8 @@ public void testDeleteDnsService() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deleteDnsService("xsspuunnoxyhk", "g", "ddrihpf", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deleteDnsService("jbjsvgjrwh", "yvycytdclxgcckn", "nwm", 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 index e2ca2a5071ce3..f4c81319cffc8 100644 --- 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 @@ -27,7 +27,8 @@ public void testDeleteDnsZone() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deleteDnsZone("iykhy", "wf", "jlb", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deleteDnsZone("f", "xnmwmqtibxyijddt", "qcttadijaeukmrsi", 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 index fb3a6eaa9eaba..0912a80dc891f 100644 --- 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 @@ -27,8 +27,7 @@ public void testDeletePortMirroring() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks() - .deletePortMirroring("hminyflnorwmduv", "pklvxw", "ygdxpgpqchis", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deletePortMirroring("jcivmmg", "f", "fiwrxgkn", 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 index c6e6b991236fb..5748dae11cbc3 100644 --- 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 @@ -27,7 +27,7 @@ public void testDeletePublicIP() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deletePublicIP("g", "khocxvdfffwaf", "roud", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deletePublicIP("zmlovuanash", "xlpm", "erbdk", 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 index 93189e09cf666..009f09b25baa0 100644 --- 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 @@ -28,8 +28,7 @@ public void testDeleteSegment() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworks() - .deleteSegment("yuspskas", "vlmfwdgzxulucv", "amrsreuzv", "urisjnhnytxifqj", - com.azure.core.util.Context.NONE); + .deleteSegment("g", "khocxvdfffwaf", "roud", "spave", 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 index 34f36d3713b5f..1d4bf46ef6d11 100644 --- 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 @@ -27,7 +27,7 @@ public void testDeleteVMGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deleteVMGroup("lgy", "vutpthjoxo", "smsks", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteVMGroup("qfr", "qlkzme", "nitgvkxlz", 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 index 1e2c3d30dbcf6..dc21c4b10e265 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetDhcpWithResponseMockTests { @Test public void testGetDhcpWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"dvk\",\"segments\":[\"jdz\"],\"provisioningState\":\"Failed\",\"revision\":9195569848009574946},\"id\":\"hnjivo\",\"name\":\"v\",\"type\":\"novqfzge\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"awiuagyd\",\"segments\":[\"bylyrfgia\",\"tcojocqwo\"],\"provisioningState\":\"Updating\",\"revision\":5588254011472132694},\"id\":\"sfzldmoz\",\"name\":\"xylfsb\",\"type\":\"kadpysown\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetDhcpWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDhcp response = manager.workloadNetworks() - .getDhcpWithResponse("fmznba", "qphchqnrnrpxehuw", "ykqgaifmvik", com.azure.core.util.Context.NONE) + .getDhcpWithResponse("qxtjjfzqlqhyca", "odggx", "beesmieknlra", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dvk", response.properties().displayName()); - Assertions.assertEquals(9195569848009574946L, response.properties().revision()); + Assertions.assertEquals("awiuagyd", response.properties().displayName()); + Assertions.assertEquals(5588254011472132694L, 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 index 6407382c611ee..6b736149acde3 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksGetDnsServiceWithResponseMockTests { @Test public void testGetDnsServiceWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"baiyhddviaceg\",\"dnsServiceIp\":\"m\",\"defaultDnsZone\":\"fpmvmemfnczd\",\"fqdnZones\":[\"b\",\"lxlllchpo\",\"bzevwrd\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":9047416798509661707},\"id\":\"wsmystuluqypf\",\"name\":\"vlerchpqbmfpjba\",\"type\":\"widf\"}"; + = "{\"properties\":{\"displayName\":\"hzmme\",\"dnsServiceIp\":\"kdlpa\",\"defaultDnsZone\":\"rcxfailcfxwmdb\",\"fqdnZones\":[\"fgsftufqob\",\"jln\",\"cgcckknhxkizvyt\",\"rzvul\"],\"logLevel\":\"FATAL\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":1051106432166933965},\"id\":\"gukkjqnvbroy\",\"name\":\"a\",\"type\":\"xulcdisdos\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,14 @@ public void testGetDnsServiceWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsService response = manager.workloadNetworks() - .getDnsServiceWithResponse("px", "wjplma", "stcyohpfkyrkdbd", "iogsjkmnwq", - com.azure.core.util.Context.NONE) + .getDnsServiceWithResponse("pqtgsfjac", "slhhxudbxv", "d", "tnsi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("baiyhddviaceg", response.displayName()); - Assertions.assertEquals("m", response.dnsServiceIp()); - Assertions.assertEquals("fpmvmemfnczd", response.defaultDnsZone()); - Assertions.assertEquals("b", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.logLevel()); - Assertions.assertEquals(9047416798509661707L, response.revision()); + Assertions.assertEquals("hzmme", response.displayName()); + Assertions.assertEquals("kdlpa", response.dnsServiceIp()); + Assertions.assertEquals("rcxfailcfxwmdb", response.defaultDnsZone()); + Assertions.assertEquals("fgsftufqob", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.logLevel()); + Assertions.assertEquals(1051106432166933965L, 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 index 7c05e85278a5d..6c77a503cc191 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetDnsZoneWithResponseMockTests { @Test public void testGetDnsZoneWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"uztcktyhjtqed\",\"domain\":[\"ulwm\",\"rqzz\",\"rjvpglydzgkrvqee\",\"toepryu\"],\"dnsServerIps\":[\"ytp\",\"dmovzvfva\",\"wzqa\"],\"sourceIp\":\"lgzurig\",\"dnsServices\":4544236688410248601,\"provisioningState\":\"Updating\",\"revision\":442627726134054774},\"id\":\"okpvzm\",\"name\":\"qtmldgxo\",\"type\":\"firclnpkciayz\"}"; + = "{\"properties\":{\"displayName\":\"ajoylhjl\",\"domain\":[\"y\",\"primr\"],\"dnsServerIps\":[\"teecjmeislst\",\"asylwx\"],\"sourceIp\":\"aumweoohguufu\",\"dnsServices\":2748183930947748817,\"provisioningState\":\"Updating\",\"revision\":7433692398956601722},\"id\":\"zolbaemwmdxmebw\",\"name\":\"scjpahlxv\",\"type\":\"a\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,14 @@ public void testGetDnsZoneWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsZone response = manager.workloadNetworks() - .getDnsZoneWithResponse("bkkd", "flvestmjlxrrilo", "apeewchpxlkt", "kuziycsle", - com.azure.core.util.Context.NONE) + .getDnsZoneWithResponse("a", "llibphbqzmizak", "kan", "jpdn", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("uztcktyhjtqed", response.displayName()); - Assertions.assertEquals("ulwm", response.domain().get(0)); - Assertions.assertEquals("ytp", response.dnsServerIps().get(0)); - Assertions.assertEquals("lgzurig", response.sourceIp()); - Assertions.assertEquals(4544236688410248601L, response.dnsServices()); - Assertions.assertEquals(442627726134054774L, response.revision()); + Assertions.assertEquals("ajoylhjl", response.displayName()); + Assertions.assertEquals("y", response.domain().get(0)); + Assertions.assertEquals("teecjmeislst", response.dnsServerIps().get(0)); + Assertions.assertEquals("aumweoohguufu", response.sourceIp()); + Assertions.assertEquals(2748183930947748817L, response.dnsServices()); + Assertions.assertEquals(7433692398956601722L, 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 index 0a3b9b6bb552a..458f8c46830eb 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetGatewayWithResponseMockTests { @Test public void testGetGatewayWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"clzedqbcvh\",\"path\":\"h\"},\"id\":\"odqkdlwwqfb\",\"name\":\"mlkxtrqjfs\",\"type\":\"lmbtxhwgfwsrt\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"g\",\"path\":\"joxslhvnhla\"},\"id\":\"q\",\"name\":\"kkzjcjbtrga\",\"type\":\"hvv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetGatewayWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkGateway response = manager.workloadNetworks() - .getGatewayWithResponse("uodpv", "uudl", "zibt", "ostgkts", com.azure.core.util.Context.NONE) + .getGatewayWithResponse("metttwgd", "lqxihhrmooiz", "seypxiutcxapz", "y", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("clzedqbcvh", response.displayName()); + Assertions.assertEquals("g", 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 index 8b637a4ca0063..605a7475c74ba 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksGetPortMirroringWithResponseMockTests { @Test public void testGetPortMirroringWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"m\",\"direction\":\"EGRESS\",\"source\":\"guaadraufactkahz\",\"destination\":\"ajjziuxxpshne\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":379152667379515000},\"id\":\"ubkwdle\",\"name\":\"rds\",\"type\":\"tujbazpju\"}"; + = "{\"properties\":{\"displayName\":\"snfepgfewetwlyx\",\"direction\":\"EGRESS\",\"source\":\"ykxhdjh\",\"destination\":\"mmbcxfhbcp\",\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":2736440248619026147},\"id\":\"qizxfpxtgqscjavf\",\"name\":\"juhdqazkmtgguwpi\",\"type\":\"r\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetPortMirroringWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPortMirroring response = manager.workloadNetworks() - .getPortMirroringWithResponse("uwrbehwagoh", "uffkmrqemvvh", "xtdr", "futacoebjvewzc", + .getPortMirroringWithResponse("aaomylweazu", "cse", "hwwn", "jhlfzswpchwahf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("m", response.displayName()); + Assertions.assertEquals("snfepgfewetwlyx", response.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); - Assertions.assertEquals("guaadraufactkahz", response.source()); - Assertions.assertEquals("ajjziuxxpshne", response.destination()); - Assertions.assertEquals(379152667379515000L, response.revision()); + Assertions.assertEquals("ykxhdjh", response.source()); + Assertions.assertEquals("mmbcxfhbcp", response.destination()); + Assertions.assertEquals(2736440248619026147L, 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 index ec6d407e27f7f..9b62bf43b5992 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetPublicIPWithResponseMockTests { @Test public void testGetPublicIPWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"hfrbbc\",\"numberOfPublicIPs\":4254083119054920341,\"publicIPBlock\":\"tltdhlfkqojpy\",\"provisioningState\":\"Failed\"},\"id\":\"rdcnifmzzsdy\",\"name\":\"brn\",\"type\":\"suxmpraf\"}"; + = "{\"properties\":{\"displayName\":\"lnzonzlrpiqywn\",\"numberOfPublicIPs\":7895495047582223702,\"publicIPBlock\":\"z\",\"provisioningState\":\"Succeeded\"},\"id\":\"zehtdhgb\",\"name\":\"k\",\"type\":\"reljeamur\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetPublicIPWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPublicIp response = manager.workloadNetworks() - .getPublicIPWithResponse("bvpoekrsgsgbdhu", "qgnjdgkynscli", "hzvhxnkomtkubo", "ppnvdxz", + .getPublicIPWithResponse("rsjuivfcdisyir", "xzhczexrxz", "ujrtrhqvwr", "vk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hfrbbc", response.displayName()); - Assertions.assertEquals(4254083119054920341L, response.numberOfPublicIPs()); + Assertions.assertEquals("lnzonzlrpiqywn", response.displayName()); + Assertions.assertEquals(7895495047582223702L, 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 index a03075f1e11fc..bb42a3f722c8f 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetSegmentWithResponseMockTests { @Test public void testGetSegmentWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"vwxnbkfe\",\"connectedGateway\":\"xscyhwzdgirujbz\",\"subnet\":{\"dhcpRanges\":[\"zzbtdcqvpniyujvi\",\"l\"],\"gatewayAddress\":\"shfssnrbgyef\"},\"portVif\":[{\"portName\":\"gaojf\"},{\"portName\":\"nc\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":8990215421896908005},\"id\":\"tymoxoftp\",\"name\":\"piwyczuhxacpqjl\",\"type\":\"h\"}"; + = "{\"properties\":{\"displayName\":\"yik\",\"connectedGateway\":\"lauyav\",\"subnet\":{\"dhcpRanges\":[\"ncstt\",\"jfybvpoekrsgsgb\",\"huzqgn\",\"dgkynscliqhzvhxn\"],\"gatewayAddress\":\"mtk\"},\"portVif\":[{\"portName\":\"ppnvdxz\"},{\"portName\":\"ihfrbbcevqa\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":9015448282305825378},\"id\":\"qojpy\",\"name\":\"vgtrdcnifmzzs\",\"type\":\"ymbrnysuxmpraf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetSegmentWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkSegment response = manager.workloadNetworks() - .getSegmentWithResponse("yaomtb", "hhavgrvkffovjz", "pjbi", "gjmfxumvfcl", com.azure.core.util.Context.NONE) + .getSegmentWithResponse("tj", "zysdzh", "zwwva", "qyuvvfonkp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vwxnbkfe", response.displayName()); - Assertions.assertEquals("xscyhwzdgirujbz", response.connectedGateway()); - Assertions.assertEquals("zzbtdcqvpniyujvi", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("shfssnrbgyef", response.subnet().gatewayAddress()); - Assertions.assertEquals(8990215421896908005L, response.revision()); + Assertions.assertEquals("yik", response.displayName()); + Assertions.assertEquals("lauyav", response.connectedGateway()); + Assertions.assertEquals("ncstt", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("mtk", response.subnet().gatewayAddress()); + Assertions.assertEquals(9015448282305825378L, 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 index 9048fbfbdc272..a14444a5865b4 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetVMGroupWithResponseMockTests { @Test public void testGetVMGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"macjekn\",\"members\":[\"hqvcimpevfgmblr\",\"ilbywdxsm\",\"ccwr\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":703476384882918279},\"id\":\"szqujizdvoq\",\"name\":\"tiby\",\"type\":\"wb\"}"; + = "{\"properties\":{\"displayName\":\"zgtila\",\"members\":[\"fhqlyvi\",\"ouwivkxoyzunbixx\",\"ti\",\"vcpwpgclrc\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":6631490194181258927},\"id\":\"enxpmyyefr\",\"name\":\"mpdnqqskawa\",\"type\":\"qvmmbn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,12 @@ public void testGetVMGroupWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVMGroup response = manager.workloadNetworks() - .getVMGroupWithResponse("ao", "jchvcyy", "s", "gdotcubiipuipwo", com.azure.core.util.Context.NONE) + .getVMGroupWithResponse("uzjyihsasbhudypo", "yue", "slynsqyrpfoo", "rlttymsjnygqdnfw", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("macjekn", response.displayName()); - Assertions.assertEquals("hqvcimpevfgmblr", response.members().get(0)); - Assertions.assertEquals(703476384882918279L, response.revision()); + Assertions.assertEquals("zgtila", response.displayName()); + Assertions.assertEquals("fhqlyvi", response.members().get(0)); + Assertions.assertEquals(6631490194181258927L, 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 index 522c0cf3a6bc3..0d2321b38f671 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetVirtualMachineWithResponseMockTests { @Test public void testGetVirtualMachineWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"pjui\",\"vmType\":\"REGULAR\"},\"id\":\"k\",\"name\":\"dzf\",\"type\":\"azivjlfrqttbajl\"}"; + = "{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"vblbjednljlageua\",\"vmType\":\"EDGE\"},\"id\":\"nsmjbnkppxynen\",\"name\":\"svxeizzgwklnsr\",\"type\":\"ffeycx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetVirtualMachineWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVirtualMachine response = manager.workloadNetworks() - .getVirtualMachineWithResponse("minsgowzf", "tsttktlahbq", "ctxtgzukxi", "mmqtgqqqxhr", + .getVirtualMachineWithResponse("pqg", "tjeaahhvjhh", "akz", "bbjjidjksyxk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("pjui", response.displayName()); + Assertions.assertEquals("vblbjednljlageua", 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 index 8a7d270979b55..0b84a1ea68f28 100644 --- 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 @@ -20,7 +20,7 @@ public final class WorkloadNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"nqfiufxqknpi\",\"name\":\"gnepttwqmsni\",\"type\":\"fcdmqnrojlpijn\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"rr\",\"name\":\"vpglydz\",\"type\":\"krvq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetwork response = manager.workloadNetworks() - .getWithResponse("uu", "fdlwg", "ytsbwtovv", com.azure.core.util.Context.NONE) + .getWithResponse("ktwkuziyc", "levufuztcktyhj", "qedcgzulwm", 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 index cdc4bb74af978..a4bdb21bf8456 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListDhcpMockTests { @Test public void testListDhcp() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"g\",\"segments\":[\"nfqn\",\"cypsxjv\",\"oimwkslirc\"],\"provisioningState\":\"Failed\",\"revision\":8449348931909561214},\"id\":\"fceacvlhvygd\",\"name\":\"ftumrtwnawjslbiw\",\"type\":\"ojgcyzt\"}]}"; + = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"yxcdyuibhmfdnbzy\",\"segments\":[\"vfcjnaeoisrvhmg\"],\"provisioningState\":\"Failed\",\"revision\":2822407997617521552},\"id\":\"scvwmzhwplef\",\"name\":\"xvxilcbtg\",\"type\":\"hnze\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testListDhcp() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworks() - .listDhcp("gxmrhublwp", "esutrgjupauutpw", "qhih", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().listDhcp("hrv", "bunzozudh", "xg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("g", response.iterator().next().properties().displayName()); - Assertions.assertEquals(8449348931909561214L, response.iterator().next().properties().revision()); + Assertions.assertEquals("yxcdyuibhmfdnbzy", response.iterator().next().properties().displayName()); + Assertions.assertEquals(2822407997617521552L, 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 index 662bf39cd6bad..2333e50ea47a8 100644 --- 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksListDnsServicesMockTests { @Test public void testListDnsServices() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"ligovibrxkpm\",\"dnsServiceIp\":\"azur\",\"defaultDnsZone\":\"cbgoor\",\"fqdnZones\":[\"oybfhjxakvvj\",\"slordilmyww\",\"kgkxn\",\"edabgyvudtjue\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":8529210988663924924},\"id\":\"j\",\"name\":\"xccybvpa\",\"type\":\"akkud\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"kgdoj\",\"dnsServiceIp\":\"xv\",\"defaultDnsZone\":\"refdee\",\"fqdnZones\":[\"cuijpxt\",\"s\",\"wprtu\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":8726216389105102201},\"id\":\"bxv\",\"name\":\"titvtzeexavox\",\"type\":\"fglecdmdqbwp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testListDnsServices() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworks() - .listDnsServices("atnwxyiopi", "kqqfk", "vscx", com.azure.core.util.Context.NONE); + .listDnsServices("ktp", "ymerteeammxq", "ekkkzd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ligovibrxkpm", response.iterator().next().displayName()); - Assertions.assertEquals("azur", response.iterator().next().dnsServiceIp()); - Assertions.assertEquals("cbgoor", response.iterator().next().defaultDnsZone()); - Assertions.assertEquals("oybfhjxakvvj", response.iterator().next().fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, response.iterator().next().logLevel()); - Assertions.assertEquals(8529210988663924924L, response.iterator().next().revision()); + Assertions.assertEquals("kgdoj", response.iterator().next().displayName()); + Assertions.assertEquals("xv", response.iterator().next().dnsServiceIp()); + Assertions.assertEquals("refdee", response.iterator().next().defaultDnsZone()); + Assertions.assertEquals("cuijpxt", response.iterator().next().fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.iterator().next().logLevel()); + Assertions.assertEquals(8726216389105102201L, 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 index 337770a37aab1..6241707fdfb95 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListDnsZonesMockTests { @Test public void testListDnsZones() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"ykzkdncjdxo\",\"domain\":[\"oggculapz\",\"y\",\"pgogtqxepny\"],\"dnsServerIps\":[\"uajlyj\",\"lvofqzhvfcibyfmo\"],\"sourceIp\":\"xrkjpvdw\",\"dnsServices\":4789424331234549662,\"provisioningState\":\"Succeeded\",\"revision\":4970789347057836253},\"id\":\"bhyzsxjr\",\"name\":\"ambtrnegvm\",\"type\":\"vuqeqvldspast\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"dqns\",\"domain\":[\"pbgtgkylkdghrj\",\"uutlwxezwzhok\",\"bwnhhtql\"],\"dnsServerIps\":[\"gppipifh\",\"f\",\"oajvgcxtxjcs\",\"eafidltugsresm\"],\"sourceIp\":\"sjhoiftxfkfwegpr\",\"dnsServices\":2543866141895923842,\"provisioningState\":\"Failed\",\"revision\":1203918131224408172},\"id\":\"qtgdqohmcwsl\",\"name\":\"riz\",\"type\":\"tpwb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testListDnsZones() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworks() - .listDnsZones("oqcaaewdaomdj", "l", "jxxkzbrmsgei", com.azure.core.util.Context.NONE); + .listDnsZones("tmvpdvjdhtt", "a", "fedxihchrphkm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ykzkdncjdxo", response.iterator().next().displayName()); - Assertions.assertEquals("oggculapz", response.iterator().next().domain().get(0)); - Assertions.assertEquals("uajlyj", response.iterator().next().dnsServerIps().get(0)); - Assertions.assertEquals("xrkjpvdw", response.iterator().next().sourceIp()); - Assertions.assertEquals(4789424331234549662L, response.iterator().next().dnsServices()); - Assertions.assertEquals(4970789347057836253L, response.iterator().next().revision()); + Assertions.assertEquals("dqns", response.iterator().next().displayName()); + Assertions.assertEquals("pbgtgkylkdghrj", response.iterator().next().domain().get(0)); + Assertions.assertEquals("gppipifh", response.iterator().next().dnsServerIps().get(0)); + Assertions.assertEquals("sjhoiftxfkfwegpr", response.iterator().next().sourceIp()); + Assertions.assertEquals(2543866141895923842L, response.iterator().next().dnsServices()); + Assertions.assertEquals(1203918131224408172L, 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 index af4baf2ab331f..d62edd360b5ad 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListGatewaysMockTests { @Test public void testListGateways() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"zqljyxgtczh\",\"path\":\"dbsdshm\"},\"id\":\"maehvbbxurip\",\"name\":\"tfnhtbaxkgxywr\",\"type\":\"kpyklyhp\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"wyivqikf\",\"path\":\"vhrfsphuagrt\"},\"id\":\"kteusqczk\",\"name\":\"yklxubyjaffmmfbl\",\"type\":\"qcuubgqibrta\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListGateways() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworks().listGateways("ssxmojms", "p", "jpr", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listGateways("cjhfgmvecactxmw", "teyowclu", "ovekqvgqouwi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zqljyxgtczh", response.iterator().next().displayName()); + Assertions.assertEquals("wyivqikf", 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 index e11a10a54e1dd..6e2da7776a7b9 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"wqknfdn\",\"name\":\"wjchrdg\",\"type\":\"ihxumwctondzj\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"kdmflvestmjlx\",\"name\":\"ril\",\"type\":\"zapeewchpx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().list("bfpncurdo", "wiithtywub", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().list("kambtrnegvmnvuqe", "vldspa", 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 index 3756fdec7aa85..893477a645d59 100644 --- 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksListPortMirroringMockTests { @Test public void testListPortMirroring() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"kkqfqjbvle\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"luiqtqzfavyvnqq\",\"destination\":\"aryeu\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":6983272609248896319},\"id\":\"zslesjcbher\",\"name\":\"ntiew\",\"type\":\"jcvb\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"lftidgfcwqmpim\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"hemjy\",\"destination\":\"hujswtwkozzwcul\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":3474722441210213341},\"id\":\"jwltlwtjjgu\",\"name\":\"talhsnvkcdmxzr\",\"type\":\"oaimlnw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testListPortMirroring() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworks().listPortMirroring("wcoezbrhub", "kh", "dyg", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listPortMirroring("brxjjsto", "beitpkx", "tmo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kkqfqjbvle", response.iterator().next().displayName()); + Assertions.assertEquals("lftidgfcwqmpim", response.iterator().next().displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.iterator().next().direction()); - Assertions.assertEquals("luiqtqzfavyvnqq", response.iterator().next().source()); - Assertions.assertEquals("aryeu", response.iterator().next().destination()); - Assertions.assertEquals(6983272609248896319L, response.iterator().next().revision()); + Assertions.assertEquals("hemjy", response.iterator().next().source()); + Assertions.assertEquals("hujswtwkozzwcul", response.iterator().next().destination()); + Assertions.assertEquals(3474722441210213341L, 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 index bed570659ae3a..88abe232699ab 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListPublicIPsMockTests { @Test public void testListPublicIPs() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"ysdzhez\",\"numberOfPublicIPs\":168889850294802067,\"publicIPBlock\":\"qyuvvfonkp\",\"provisioningState\":\"Updating\"},\"id\":\"ikvylauya\",\"name\":\"luwmncst\",\"type\":\"ijf\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"dqwyxeb\",\"numberOfPublicIPs\":5927921282145979607,\"publicIPBlock\":\"zznrtffyaqi\",\"provisioningState\":\"Canceled\"},\"id\":\"eioqaqhvse\",\"name\":\"fuqyrxpdlcgqlsi\",\"type\":\"mjqfrddgamquhio\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testListPublicIPs() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworks() - .listPublicIPs("xqvkjlmxhomdyn", "dwdigumb", "raauzzpt", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().listPublicIPs("ekpndzaapmudq", "eqw", "gp", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ysdzhez", response.iterator().next().displayName()); - Assertions.assertEquals(168889850294802067L, response.iterator().next().numberOfPublicIPs()); + Assertions.assertEquals("dqwyxeb", response.iterator().next().displayName()); + Assertions.assertEquals(5927921282145979607L, 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 index f7e312933f575..5567308b56d3f 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListSegmentsMockTests { @Test public void testListSegments() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"yzhftwesgogczh\",\"connectedGateway\":\"nxkrlgnyhmossxkk\",\"subnet\":{\"dhcpRanges\":[\"rghxjb\",\"hqxvcxgfrpdsofbs\",\"rnsvbuswd\",\"z\"],\"gatewayAddress\":\"bycnunvjsrtkf\"},\"portVif\":[{\"portName\":\"pqgik\"},{\"portName\":\"irtx\"},{\"portName\":\"uxzejntpsew\"},{\"portName\":\"oi\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":1902366482512122706},\"id\":\"qmi\",\"name\":\"ox\",\"type\":\"rgguf\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"tpzdmovzvfvaawzq\",\"connectedGateway\":\"f\",\"subnet\":{\"dhcpRanges\":[\"riglaec\"],\"gatewayAddress\":\"dticokpvzml\"},\"portVif\":[{\"portName\":\"dgxobfircl\"},{\"portName\":\"kciayzri\"},{\"portName\":\"hya\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":8892395873525165573},\"id\":\"vkjlmxhom\",\"name\":\"ynhdwdigum\",\"type\":\"nraauzz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testListSegments() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworks() - .listSegments("rxfrddhc", "atiz", "ronasxift", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().listSegments("ev", "oepry", "t", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yzhftwesgogczh", response.iterator().next().displayName()); - Assertions.assertEquals("nxkrlgnyhmossxkk", response.iterator().next().connectedGateway()); - Assertions.assertEquals("rghxjb", response.iterator().next().subnet().dhcpRanges().get(0)); - Assertions.assertEquals("bycnunvjsrtkf", response.iterator().next().subnet().gatewayAddress()); - Assertions.assertEquals(1902366482512122706L, response.iterator().next().revision()); + Assertions.assertEquals("tpzdmovzvfvaawzq", response.iterator().next().displayName()); + Assertions.assertEquals("f", response.iterator().next().connectedGateway()); + Assertions.assertEquals("riglaec", response.iterator().next().subnet().dhcpRanges().get(0)); + Assertions.assertEquals("dticokpvzml", response.iterator().next().subnet().gatewayAddress()); + Assertions.assertEquals(8892395873525165573L, 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 index b5a3eb7df77f0..f332fd9f46db0 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListVMGroupsMockTests { @Test public void testListVMGroups() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"bqplh\",\"members\":[\"uuepzlrphwzsoldw\",\"yuqdu\",\"vmnnrw\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":7474437390455039579},\"id\":\"ywjhhgdnhx\",\"name\":\"sivfomilo\",\"type\":\"ggdufiqndieu\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"lgafcqusrdve\",\"members\":[\"sdtutnwlduyc\",\"uzhyrmewipmvekdx\",\"kuqgsjjxundxgket\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":7918905716501947847},\"id\":\"mhv\",\"name\":\"muvgp\",\"type\":\"uneqsxvmhf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListVMGroups() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworks() - .listVMGroups("epn", "bjcrxgibbdaxco", "fozauorsuk", com.azure.core.util.Context.NONE); + .listVMGroups("uvyinzqodfvpgs", "oxgsgbpfgzdjtx", "zflbqvg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bqplh", response.iterator().next().displayName()); - Assertions.assertEquals("uuepzlrphwzsoldw", response.iterator().next().members().get(0)); - Assertions.assertEquals(7474437390455039579L, response.iterator().next().revision()); + Assertions.assertEquals("lgafcqusrdve", response.iterator().next().displayName()); + Assertions.assertEquals("sdtutnwlduyc", response.iterator().next().members().get(0)); + Assertions.assertEquals(7918905716501947847L, 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 index a60ed331609d6..ac83c6498420b 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListVirtualMachinesMockTests { @Test public void testListVirtualMachines() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"l\",\"vmType\":\"REGULAR\"},\"id\":\"oupfgfb\",\"name\":\"jub\",\"type\":\"yhgk\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"sqvdaeyygux\",\"vmType\":\"EDGE\"},\"id\":\"qzhzbezkgimsi\",\"name\":\"xasicddyvvjskg\",\"type\":\"mocwa\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListVirtualMachines() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworks() - .listVirtualMachines("pi", "lqol", "xkcgxxlxsffgcvi", com.azure.core.util.Context.NONE); + .listVirtualMachines("qdrfegcealzxwhc", "nsymoyqhlwigd", "vbkbxgomf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("l", response.iterator().next().displayName()); + Assertions.assertEquals("sqvdaeyygux", response.iterator().next().displayName()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml index 91364d1b47909..c311e5f593fb7 100644 --- a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/vmware/Microsoft.AVS.Management -commit: a434707db696a6915e18cafa1ea60a171da0e15f +commit: 487745a020644e03832689ae47ed413084e47f5f repo: Azure/azure-rest-api-specs additionalDirectories: From 67de7bc67c87b4bc9f0e013f593f84a26d34b78d Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 23 Jul 2024 16:26:54 +0800 Subject: [PATCH 14/17] regen --- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 1769 ++++++++++++- .../azure/resourcemanager/avs/AvsManager.java | 48 +- .../resourcemanager/avs/fluent/AvsClient.java | 18 +- .../avs/fluent/IscsiPathsClient.java | 36 +- .../avs/fluent/WorkloadNetworksClient.java | 402 +-- .../avs/implementation/AddonsClientImpl.java | 8 +- .../AuthorizationsClientImpl.java | 8 +- .../avs/implementation/AvsClientBuilder.java | 38 +- .../avs/implementation/AvsClientImpl.java | 44 +- .../implementation/CloudLinksClientImpl.java | 8 +- .../implementation/ClustersClientImpl.java | 8 +- .../implementation/DatastoresClientImpl.java | 8 +- .../GlobalReachConnectionsClientImpl.java | 8 +- .../HcxEnterpriseSitesClientImpl.java | 8 +- .../avs/implementation/IscsiPathImpl.java | 91 +- .../implementation/IscsiPathsClientImpl.java | 185 +- .../avs/implementation/IscsiPathsImpl.java | 105 +- .../implementation/LocationsClientImpl.java | 8 +- .../implementation/OperationsClientImpl.java | 8 +- .../PlacementPoliciesClientImpl.java | 8 +- .../PrivateCloudsClientImpl.java | 8 +- .../ScriptCmdletsClientImpl.java | 8 +- .../ScriptExecutionsClientImpl.java | 8 +- .../ScriptPackagesClientImpl.java | 8 +- .../VirtualMachinesClientImpl.java | 8 +- .../WorkloadNetworkDhcpImpl.java | 17 +- .../WorkloadNetworkDnsServiceImpl.java | 24 +- .../WorkloadNetworkDnsZoneImpl.java | 23 +- .../WorkloadNetworkPortMirroringImpl.java | 26 +- .../WorkloadNetworkPublicIpImpl.java | 16 +- .../WorkloadNetworkSegmentImpl.java | 23 +- .../WorkloadNetworkVMGroupImpl.java | 23 +- .../WorkloadNetworksClientImpl.java | 2275 ++++++----------- .../implementation/WorkloadNetworksImpl.java | 349 +-- .../resourcemanager/avs/models/IscsiPath.java | 122 - .../avs/models/IscsiPaths.java | 64 +- .../avs/models/WorkloadNetworkDhcp.java | 6 +- .../avs/models/WorkloadNetworkDnsService.java | 6 +- .../avs/models/WorkloadNetworkDnsZone.java | 6 +- .../models/WorkloadNetworkPortMirroring.java | 6 +- .../avs/models/WorkloadNetworkPublicIp.java | 6 +- .../avs/models/WorkloadNetworkSegment.java | 6 +- .../avs/models/WorkloadNetworkVMGroup.java | 6 +- .../avs/models/WorkloadNetworks.java | 163 +- .../AddonsCreateOrUpdateSamples.java | 30 + .../avs/generated/AddonsDeleteSamples.java | 22 + .../avs/generated/AddonsGetSamples.java | 22 + .../avs/generated/AddonsListSamples.java | 22 + .../AuthorizationsCreateOrUpdateSamples.java | 23 + .../AuthorizationsDeleteSamples.java | 22 + .../generated/AuthorizationsGetSamples.java | 23 + .../generated/AuthorizationsListSamples.java | 22 + .../CloudLinksCreateOrUpdateSamples.java | 28 + .../generated/CloudLinksDeleteSamples.java | 22 + .../avs/generated/CloudLinksGetSamples.java | 22 + .../avs/generated/CloudLinksListSamples.java | 22 + .../ClustersCreateOrUpdateSamples.java | 30 + .../avs/generated/ClustersDeleteSamples.java | 22 + .../avs/generated/ClustersGetSamples.java | 22 + .../avs/generated/ClustersListSamples.java | 22 + .../generated/ClustersListZonesSamples.java | 22 + .../avs/generated/ClustersUpdateSamples.java | 27 + .../DatastoresCreateOrUpdateSamples.java | 30 + .../generated/DatastoresDeleteSamples.java | 22 + .../avs/generated/DatastoresGetSamples.java | 23 + .../avs/generated/DatastoresListSamples.java | 22 + ...ReachConnectionsCreateOrUpdateSamples.java | 29 + .../GlobalReachConnectionsDeleteSamples.java | 23 + .../GlobalReachConnectionsGetSamples.java | 24 + .../GlobalReachConnectionsListSamples.java | 23 + ...xEnterpriseSitesCreateOrUpdateSamples.java | 23 + .../HcxEnterpriseSitesDeleteSamples.java | 23 + .../HcxEnterpriseSitesGetSamples.java | 22 + .../HcxEnterpriseSitesListSamples.java | 23 + .../IscsiPathsCreateOrUpdateSamples.java | 27 + .../generated/IscsiPathsDeleteSamples.java | 22 + .../avs/generated/IscsiPathsGetSamples.java | 22 + .../IscsiPathsListByPrivateCloudSamples.java | 22 + ...ocationsCheckQuotaAvailabilitySamples.java | 23 + ...ocationsCheckTrialAvailabilitySamples.java | 23 + .../avs/generated/OperationsListSamples.java | 22 + ...lacementPoliciesCreateOrUpdateSamples.java | 40 + .../PlacementPoliciesDeleteSamples.java | 23 + .../PlacementPoliciesGetSamples.java | 23 + .../PlacementPoliciesListSamples.java | 22 + .../PlacementPoliciesUpdateSamples.java | 41 + .../PrivateCloudsCreateOrUpdateSamples.java | 51 + .../generated/PrivateCloudsDeleteSamples.java | 22 + ...rivateCloudsGetByResourceGroupSamples.java | 22 + ...vateCloudsListAdminCredentialsSamples.java | 23 + ...ivateCloudsListByResourceGroupSamples.java | 22 + .../generated/PrivateCloudsListSamples.java | 23 + ...rivateCloudsRotateNsxtPasswordSamples.java | 23 + ...ateCloudsRotateVcenterPasswordSamples.java | 23 + .../generated/PrivateCloudsUpdateSamples.java | 40 + .../generated/ScriptCmdletsGetSamples.java | 24 + .../generated/ScriptCmdletsListSamples.java | 22 + ...ScriptExecutionsCreateOrUpdateSamples.java | 40 + .../ScriptExecutionsDeleteSamples.java | 23 + ...riptExecutionsGetExecutionLogsSamples.java | 30 + .../generated/ScriptExecutionsGetSamples.java | 23 + .../ScriptExecutionsListSamples.java | 22 + .../generated/ScriptPackagesGetSamples.java | 23 + .../generated/ScriptPackagesListSamples.java | 22 + .../generated/VirtualMachinesGetSamples.java | 23 + .../generated/VirtualMachinesListSamples.java | 22 + ...irtualMachinesRestrictMovementSamples.java | 29 + .../WorkloadNetworksCreateDhcpSamples.java | 2 +- ...rkloadNetworksCreateDnsServiceSamples.java | 2 +- .../WorkloadNetworksCreateDnsZoneSamples.java | 2 +- ...oadNetworksCreatePortMirroringSamples.java | 2 +- ...WorkloadNetworksCreatePublicIPSamples.java | 2 +- .../WorkloadNetworksCreateSegmentSamples.java | 2 +- .../WorkloadNetworksCreateVMGroupSamples.java | 5 +- .../WorkloadNetworksDeleteDhcpSamples.java | 2 +- .../WorkloadNetworksDeleteSegmentSamples.java | 3 +- .../WorkloadNetworksGetDnsServiceSamples.java | 2 +- .../WorkloadNetworksGetDnsZoneSamples.java | 2 +- .../WorkloadNetworksGetGatewaySamples.java | 2 +- ...rkloadNetworksGetPortMirroringSamples.java | 2 +- .../WorkloadNetworksGetPublicIPSamples.java | 2 +- .../generated/WorkloadNetworksGetSamples.java | 2 +- .../WorkloadNetworksGetSegmentSamples.java | 2 +- .../WorkloadNetworksGetVMGroupSamples.java | 2 +- ...kloadNetworksGetVirtualMachineSamples.java | 2 +- .../WorkloadNetworksListDhcpSamples.java | 2 +- ...orkloadNetworksListDnsServicesSamples.java | 2 +- .../WorkloadNetworksListDnsZonesSamples.java | 2 +- .../WorkloadNetworksListGatewaysSamples.java | 2 +- ...kloadNetworksListPortMirroringSamples.java | 2 +- .../WorkloadNetworksListPublicIPsSamples.java | 2 +- .../WorkloadNetworksListSegmentsSamples.java | 2 +- .../WorkloadNetworksListVMGroupsSamples.java | 2 +- ...oadNetworksListVirtualMachinesSamples.java | 2 +- ...rkloadNetworksUpdateDnsServiceSamples.java | 2 +- .../WorkloadNetworksUpdateDnsZoneSamples.java | 2 +- ...oadNetworksUpdatePortMirroringSamples.java | 2 +- .../WorkloadNetworksUpdateSegmentSamples.java | 2 +- .../WorkloadNetworksUpdateVMGroupSamples.java | 2 +- .../generated/AddonArcPropertiesTests.java | 8 +- .../generated/AddonHcxPropertiesTests.java | 8 +- .../avs/generated/AddonInnerTests.java | 2 +- .../avs/generated/AddonListTests.java | 4 +- .../avs/generated/AddonPropertiesTests.java | 2 +- .../avs/generated/AddonVrPropertiesTests.java | 12 +- .../AddonsCreateOrUpdateMockTests.java | 40 + .../avs/generated/AddonsDeleteMockTests.java | 33 + .../AddonsGetWithResponseMockTests.java | 37 + .../avs/generated/AddonsListMockTests.java | 37 + .../AuthorizationsDeleteMockTests.java | 33 + .../avs/generated/CloudLinkInnerTests.java | 8 +- .../avs/generated/CloudLinkListTests.java | 6 +- .../generated/CloudLinkPropertiesTests.java | 8 +- .../CloudLinksCreateOrUpdateMockTests.java | 41 + .../generated/CloudLinksDeleteMockTests.java | 33 + .../CloudLinksGetWithResponseMockTests.java | 39 + .../generated/CloudLinksListMockTests.java | 39 + .../ClustersCreateOrUpdateMockTests.java | 58 + .../generated/ClustersDeleteMockTests.java | 33 + .../ClustersGetWithResponseMockTests.java | 47 + .../avs/generated/ClustersListMockTests.java | 47 + ...lustersListZonesWithResponseMockTests.java | 37 + .../DatastoresCreateOrUpdateMockTests.java | 53 + .../generated/DatastoresDeleteMockTests.java | 33 + .../DatastoresGetWithResponseMockTests.java | 45 + .../generated/DatastoresListMockTests.java | 44 + ...GlobalReachConnectionsDeleteMockTests.java | 33 + ...priseSitesDeleteWithResponseMockTests.java | 34 + .../avs/generated/IscsiPathInnerTests.java | 8 +- .../generated/IscsiPathListResultTests.java | 6 +- .../generated/IscsiPathPropertiesTests.java | 8 +- .../IscsiPathsCreateOrUpdateMockTests.java | 40 + .../generated/IscsiPathsDeleteMockTests.java | 33 + .../IscsiPathsGetWithResponseMockTests.java | 38 + ...IscsiPathsListByPrivateCloudMockTests.java | 39 + ...uotaAvailabilityWithResponseMockTests.java | 36 + ...rialAvailabilityWithResponseMockTests.java | 44 + .../generated/OperationsListMockTests.java | 39 + ...cementPoliciesCreateOrUpdateMockTests.java | 45 + .../PlacementPoliciesDeleteMockTests.java | 34 + ...ementPoliciesGetWithResponseMockTests.java | 41 + .../PlacementPoliciesListMockTests.java | 41 + .../generated/PlacementPoliciesListTests.java | 6 +- .../generated/PlacementPolicyInnerTests.java | 12 +- .../PlacementPolicyPropertiesTests.java | 8 +- .../PlacementPolicyUpdatePropertiesTests.java | 26 +- .../generated/PlacementPolicyUpdateTests.java | 20 +- .../PrivateCloudsDeleteMockTests.java | 33 + .../avs/generated/ScriptCmdletInnerTests.java | 2 +- .../ScriptCmdletPropertiesTests.java | 2 +- ...ScriptCmdletsGetWithResponseMockTests.java | 37 + .../generated/ScriptCmdletsListMockTests.java | 37 + .../avs/generated/ScriptCmdletsListTests.java | 4 +- .../generated/ScriptExecutionInnerTests.java | 57 +- .../ScriptExecutionParameterTests.java | 8 +- .../ScriptExecutionPropertiesTests.java | 55 +- ...riptExecutionsCreateOrUpdateMockTests.java | 77 + .../ScriptExecutionsDeleteMockTests.java | 33 + ...GetExecutionLogsWithResponseMockTests.java | 50 + ...iptExecutionsGetWithResponseMockTests.java | 45 + .../ScriptExecutionsListMockTests.java | 45 + .../generated/ScriptExecutionsListTests.java | 16 +- .../generated/ScriptPackageInnerTests.java | 2 +- .../ScriptPackagePropertiesTests.java | 2 +- ...criptPackagesGetWithResponseMockTests.java | 37 + .../ScriptPackagesListMockTests.java | 37 + .../generated/ScriptPackagesListTests.java | 4 +- .../avs/generated/ScriptParameterTests.java | 4 +- ...ptSecureStringExecutionParameterTests.java | 16 +- .../ScriptStringExecutionParameterTests.java | 13 +- .../generated/VirtualMachineInnerTests.java | 2 +- .../VirtualMachinePropertiesTests.java | 2 +- .../VirtualMachineRestrictMovementTests.java | 8 +- ...rtualMachinesGetWithResponseMockTests.java | 37 + .../VirtualMachinesListMockTests.java | 37 + .../generated/VirtualMachinesListTests.java | 4 +- .../VmHostPlacementPolicyPropertiesTests.java | 26 +- .../VmPlacementPolicyPropertiesTests.java | 14 +- .../WorkloadNetworkDhcpEntityTests.java | 12 +- .../WorkloadNetworkDhcpInnerTests.java | 14 +- .../WorkloadNetworkDhcpListTests.java | 8 +- .../WorkloadNetworkDhcpRelayTests.java | 20 +- .../WorkloadNetworkDhcpServerTests.java | 26 +- .../WorkloadNetworkDnsServiceInnerTests.java | 32 +- ...kloadNetworkDnsServicePropertiesTests.java | 39 +- .../WorkloadNetworkDnsServicesListTests.java | 16 +- .../WorkloadNetworkDnsZoneInnerTests.java | 38 +- ...WorkloadNetworkDnsZonePropertiesTests.java | 39 +- .../WorkloadNetworkDnsZonesListTests.java | 16 +- .../WorkloadNetworkGatewayInnerTests.java | 4 +- .../WorkloadNetworkGatewayListTests.java | 6 +- ...WorkloadNetworkGatewayPropertiesTests.java | 8 +- .../generated/WorkloadNetworkInnerTests.java | 2 +- .../generated/WorkloadNetworkListTests.java | 4 +- ...orkloadNetworkPortMirroringInnerTests.java | 32 +- ...WorkloadNetworkPortMirroringListTests.java | 14 +- ...adNetworkPortMirroringPropertiesTests.java | 26 +- .../WorkloadNetworkPublicIPsListTests.java | 8 +- .../WorkloadNetworkPublicIpInnerTests.java | 14 +- ...orkloadNetworkPublicIpPropertiesTests.java | 14 +- .../WorkloadNetworkSegmentInnerTests.java | 33 +- .../WorkloadNetworkSegmentPortVifTests.java | 4 +- ...WorkloadNetworkSegmentPropertiesTests.java | 33 +- .../WorkloadNetworkSegmentSubnetTests.java | 19 +- .../WorkloadNetworkSegmentsListTests.java | 14 +- .../WorkloadNetworkVMGroupInnerTests.java | 20 +- ...WorkloadNetworkVMGroupPropertiesTests.java | 21 +- .../WorkloadNetworkVMGroupsListTests.java | 10 +- ...rkloadNetworkVirtualMachineInnerTests.java | 4 +- ...dNetworkVirtualMachinePropertiesTests.java | 4 +- ...rkloadNetworkVirtualMachinesListTests.java | 6 +- .../WorkloadNetworksCreateDhcpMockTests.java | 12 +- ...loadNetworksCreateDnsServiceMockTests.java | 28 +- ...orkloadNetworksCreateDnsZoneMockTests.java | 30 +- ...dNetworksCreatePortMirroringMockTests.java | 22 +- ...rkloadNetworksCreatePublicIPMockTests.java | 14 +- ...orkloadNetworksCreateSegmentMockTests.java | 26 +- ...orkloadNetworksCreateVMGroupMockTests.java | 18 +- .../WorkloadNetworksDeleteDhcpMockTests.java | 4 +- ...loadNetworksDeleteDnsServiceMockTests.java | 3 +- ...orkloadNetworksDeleteDnsZoneMockTests.java | 2 +- ...dNetworksDeletePortMirroringMockTests.java | 3 +- ...rkloadNetworksDeletePublicIPMockTests.java | 3 +- ...orkloadNetworksDeleteSegmentMockTests.java | 3 +- ...orkloadNetworksDeleteVMGroupMockTests.java | 3 +- ...dNetworksGetDhcpWithResponseMockTests.java | 8 +- ...rksGetDnsServiceWithResponseMockTests.java | 14 +- ...tworksGetDnsZoneWithResponseMockTests.java | 16 +- ...tworksGetGatewayWithResponseMockTests.java | 6 +- ...GetPortMirroringWithResponseMockTests.java | 14 +- ...worksGetPublicIPWithResponseMockTests.java | 9 +- ...tworksGetSegmentWithResponseMockTests.java | 14 +- ...tworksGetVMGroupWithResponseMockTests.java | 11 +- ...etVirtualMachineWithResponseMockTests.java | 6 +- ...kloadNetworksGetWithResponseMockTests.java | 4 +- .../WorkloadNetworksListDhcpMockTests.java | 8 +- ...kloadNetworksListDnsServicesMockTests.java | 16 +- ...WorkloadNetworksListDnsZonesMockTests.java | 18 +- ...WorkloadNetworksListGatewaysMockTests.java | 8 +- .../WorkloadNetworksListMockTests.java | 4 +- ...oadNetworksListPortMirroringMockTests.java | 16 +- ...orkloadNetworksListPublicIPsMockTests.java | 8 +- ...WorkloadNetworksListSegmentsMockTests.java | 14 +- ...WorkloadNetworksListVMGroupsMockTests.java | 12 +- ...dNetworksListVirtualMachinesMockTests.java | 6 +- 285 files changed, 7099 insertions(+), 3633 deletions(-) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java create mode 100644 sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index 929c4aeae732b..de1492c142ba6 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -1,47 +1,1670 @@ # Code snippets and samples +## Addons + +- [CreateOrUpdate](#addons_createorupdate) +- [Delete](#addons_delete) +- [Get](#addons_get) +- [List](#addons_list) + +## Authorizations + +- [CreateOrUpdate](#authorizations_createorupdate) +- [Delete](#authorizations_delete) +- [Get](#authorizations_get) +- [List](#authorizations_list) + +## CloudLinks + +- [CreateOrUpdate](#cloudlinks_createorupdate) +- [Delete](#cloudlinks_delete) +- [Get](#cloudlinks_get) +- [List](#cloudlinks_list) + +## Clusters + +- [CreateOrUpdate](#clusters_createorupdate) +- [Delete](#clusters_delete) +- [Get](#clusters_get) +- [List](#clusters_list) +- [ListZones](#clusters_listzones) +- [Update](#clusters_update) + +## Datastores + +- [CreateOrUpdate](#datastores_createorupdate) +- [Delete](#datastores_delete) +- [Get](#datastores_get) +- [List](#datastores_list) + +## GlobalReachConnections + +- [CreateOrUpdate](#globalreachconnections_createorupdate) +- [Delete](#globalreachconnections_delete) +- [Get](#globalreachconnections_get) +- [List](#globalreachconnections_list) + +## HcxEnterpriseSites + +- [CreateOrUpdate](#hcxenterprisesites_createorupdate) +- [Delete](#hcxenterprisesites_delete) +- [Get](#hcxenterprisesites_get) +- [List](#hcxenterprisesites_list) + +## IscsiPaths + +- [CreateOrUpdate](#iscsipaths_createorupdate) +- [Delete](#iscsipaths_delete) +- [Get](#iscsipaths_get) +- [ListByPrivateCloud](#iscsipaths_listbyprivatecloud) + +## Locations + +- [CheckQuotaAvailability](#locations_checkquotaavailability) +- [CheckTrialAvailability](#locations_checktrialavailability) + +## Operations + +- [List](#operations_list) + +## PlacementPolicies + +- [CreateOrUpdate](#placementpolicies_createorupdate) +- [Delete](#placementpolicies_delete) +- [Get](#placementpolicies_get) +- [List](#placementpolicies_list) +- [Update](#placementpolicies_update) + +## PrivateClouds + +- [CreateOrUpdate](#privateclouds_createorupdate) +- [Delete](#privateclouds_delete) +- [GetByResourceGroup](#privateclouds_getbyresourcegroup) +- [List](#privateclouds_list) +- [ListAdminCredentials](#privateclouds_listadmincredentials) +- [ListByResourceGroup](#privateclouds_listbyresourcegroup) +- [RotateNsxtPassword](#privateclouds_rotatensxtpassword) +- [RotateVcenterPassword](#privateclouds_rotatevcenterpassword) +- [Update](#privateclouds_update) + +## ScriptCmdlets + +- [Get](#scriptcmdlets_get) +- [List](#scriptcmdlets_list) + +## ScriptExecutions + +- [CreateOrUpdate](#scriptexecutions_createorupdate) +- [Delete](#scriptexecutions_delete) +- [Get](#scriptexecutions_get) +- [GetExecutionLogs](#scriptexecutions_getexecutionlogs) +- [List](#scriptexecutions_list) + +## ScriptPackages + +- [Get](#scriptpackages_get) +- [List](#scriptpackages_list) + +## VirtualMachines + +- [Get](#virtualmachines_get) +- [List](#virtualmachines_list) +- [RestrictMovement](#virtualmachines_restrictmovement) + ## WorkloadNetworks -- [CreateDhcp](#workloadnetworks_createdhcp) -- [CreateDnsService](#workloadnetworks_creatednsservice) -- [CreateDnsZone](#workloadnetworks_creatednszone) -- [CreatePortMirroring](#workloadnetworks_createportmirroring) -- [CreatePublicIP](#workloadnetworks_createpublicip) -- [CreateSegment](#workloadnetworks_createsegment) -- [CreateVMGroup](#workloadnetworks_createvmgroup) -- [DeleteDhcp](#workloadnetworks_deletedhcp) -- [DeleteDnsService](#workloadnetworks_deletednsservice) -- [DeleteDnsZone](#workloadnetworks_deletednszone) -- [DeletePortMirroring](#workloadnetworks_deleteportmirroring) -- [DeletePublicIP](#workloadnetworks_deletepublicip) -- [DeleteSegment](#workloadnetworks_deletesegment) -- [DeleteVMGroup](#workloadnetworks_deletevmgroup) -- [Get](#workloadnetworks_get) -- [GetDhcp](#workloadnetworks_getdhcp) -- [GetDnsService](#workloadnetworks_getdnsservice) -- [GetDnsZone](#workloadnetworks_getdnszone) -- [GetGateway](#workloadnetworks_getgateway) -- [GetPortMirroring](#workloadnetworks_getportmirroring) -- [GetPublicIP](#workloadnetworks_getpublicip) -- [GetSegment](#workloadnetworks_getsegment) -- [GetVMGroup](#workloadnetworks_getvmgroup) -- [GetVirtualMachine](#workloadnetworks_getvirtualmachine) -- [List](#workloadnetworks_list) -- [ListDhcp](#workloadnetworks_listdhcp) -- [ListDnsServices](#workloadnetworks_listdnsservices) -- [ListDnsZones](#workloadnetworks_listdnszones) -- [ListGateways](#workloadnetworks_listgateways) -- [ListPortMirroring](#workloadnetworks_listportmirroring) -- [ListPublicIPs](#workloadnetworks_listpublicips) -- [ListSegments](#workloadnetworks_listsegments) -- [ListVMGroups](#workloadnetworks_listvmgroups) -- [ListVirtualMachines](#workloadnetworks_listvirtualmachines) -- [UpdateDnsService](#workloadnetworks_updatednsservice) -- [UpdateDnsZone](#workloadnetworks_updatednszone) -- [UpdatePortMirroring](#workloadnetworks_updateportmirroring) -- [UpdateSegment](#workloadnetworks_updatesegment) -- [UpdateVMGroup](#workloadnetworks_updatevmgroup) +- [CreateDhcp](#workloadnetworks_createdhcp) +- [CreateDnsService](#workloadnetworks_creatednsservice) +- [CreateDnsZone](#workloadnetworks_creatednszone) +- [CreatePortMirroring](#workloadnetworks_createportmirroring) +- [CreatePublicIP](#workloadnetworks_createpublicip) +- [CreateSegment](#workloadnetworks_createsegment) +- [CreateVMGroup](#workloadnetworks_createvmgroup) +- [DeleteDhcp](#workloadnetworks_deletedhcp) +- [DeleteDnsService](#workloadnetworks_deletednsservice) +- [DeleteDnsZone](#workloadnetworks_deletednszone) +- [DeletePortMirroring](#workloadnetworks_deleteportmirroring) +- [DeletePublicIP](#workloadnetworks_deletepublicip) +- [DeleteSegment](#workloadnetworks_deletesegment) +- [DeleteVMGroup](#workloadnetworks_deletevmgroup) +- [Get](#workloadnetworks_get) +- [GetDhcp](#workloadnetworks_getdhcp) +- [GetDnsService](#workloadnetworks_getdnsservice) +- [GetDnsZone](#workloadnetworks_getdnszone) +- [GetGateway](#workloadnetworks_getgateway) +- [GetPortMirroring](#workloadnetworks_getportmirroring) +- [GetPublicIP](#workloadnetworks_getpublicip) +- [GetSegment](#workloadnetworks_getsegment) +- [GetVMGroup](#workloadnetworks_getvmgroup) +- [GetVirtualMachine](#workloadnetworks_getvirtualmachine) +- [List](#workloadnetworks_list) +- [ListDhcp](#workloadnetworks_listdhcp) +- [ListDnsServices](#workloadnetworks_listdnsservices) +- [ListDnsZones](#workloadnetworks_listdnszones) +- [ListGateways](#workloadnetworks_listgateways) +- [ListPortMirroring](#workloadnetworks_listportmirroring) +- [ListPublicIPs](#workloadnetworks_listpublicips) +- [ListSegments](#workloadnetworks_listsegments) +- [ListVMGroups](#workloadnetworks_listvmgroups) +- [ListVirtualMachines](#workloadnetworks_listvirtualmachines) +- [UpdateDnsService](#workloadnetworks_updatednsservice) +- [UpdateDnsZone](#workloadnetworks_updatednszone) +- [UpdatePortMirroring](#workloadnetworks_updateportmirroring) +- [UpdateSegment](#workloadnetworks_updatesegment) +- [UpdateVMGroup](#workloadnetworks_updatevmgroup) +### Addons_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.models.AddonArcProperties; + +/** + * Samples for Addons CreateOrUpdate. + */ +public final class AddonsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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(); + } +} +``` + +### Addons_Delete + +```java +/** + * Samples for Addons Delete. + */ +public final class AddonsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Delete.json + */ + /** + * Sample code: Addons_Delete. + * + * @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); + } +} +``` + +### Addons_Get + +```java +/** + * Samples for Addons Get. + */ +public final class AddonsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Get_ArcReg.json + */ + /** + * Sample code: Addons_Get_ArcReg. + * + * @param manager Entry point to AvsManager. + */ + public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "arc", com.azure.core.util.Context.NONE); + } +} +``` + +### Addons_List + +```java +/** + * Samples for Addons List. + */ +public final class AddonsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_List.json + */ + /** + * Sample code: Addons_List. + * + * @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); + } +} +``` + +### Authorizations_CreateOrUpdate + +```java +/** + * Samples for Authorizations CreateOrUpdate. + */ +public final class AuthorizationsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_CreateOrUpdate.json + */ + /** + * Sample code: Authorizations_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void authorizationsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.authorizations().define("authorization1").withExistingPrivateCloud("group1", "cloud1").create(); + } +} +``` + +### Authorizations_Delete + +```java +/** + * Samples for Authorizations Delete. + */ +public final class AuthorizationsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_Delete.json + */ + /** + * Sample code: Authorizations_Delete. + * + * @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); + } +} +``` + +### Authorizations_Get + +```java +/** + * Samples for Authorizations Get. + */ +public final class AuthorizationsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} +``` + +### Authorizations_List + +```java +/** + * Samples for Authorizations List. + */ +public final class AuthorizationsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_List.json + */ + /** + * Sample code: Authorizations_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); + } +} +``` + +### CloudLinks_CreateOrUpdate + +```java +/** + * Samples for CloudLinks CreateOrUpdate. + */ +public final class CloudLinksCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_CreateOrUpdate.json + */ + /** + * Sample code: CloudLinks_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void cloudLinksCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.cloudLinks() + .define("cloudLink1") + .withExistingPrivateCloud("group1", "cloud1") + .withLinkedCloud( + "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2") + .create(); + } +} +``` + +### CloudLinks_Delete + +```java +/** + * Samples for CloudLinks Delete. + */ +public final class CloudLinksDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Delete.json + */ + /** + * Sample code: CloudLinks_Delete. + * + * @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); + } +} +``` + +### CloudLinks_Get + +```java +/** + * Samples for CloudLinks Get. + */ +public final class CloudLinksGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Get.json + */ + /** + * Sample code: CloudLinks_Get. + * + * @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); + } +} +``` + +### CloudLinks_List + +```java +/** + * Samples for CloudLinks List. + */ +public final class CloudLinksListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} +``` + +### Clusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.models.Sku; + +/** + * Samples for Clusters CreateOrUpdate. + */ +public final class ClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_CreateOrUpdate.json + */ + /** + * Sample code: Clusters_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void clustersCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.clusters() + .define("cluster1") + .withExistingPrivateCloud("group1", "cloud1") + .withSku(new Sku().withName("AV20")) + .withClusterSize(3) + .create(); + } +} +``` + +### Clusters_Delete + +```java +/** + * Samples for Clusters Delete. + */ +public final class ClustersDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Delete.json + */ + /** + * Sample code: Clusters_Delete. + * + * @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); + } +} +``` + +### Clusters_Get + +```java +/** + * Samples for Clusters Get. + */ +public final class ClustersGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Get.json + */ + /** + * Sample code: Clusters_Get. + * + * @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); + } +} +``` + +### Clusters_List + +```java +/** + * Samples for Clusters List. + */ +public final class ClustersListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_List.json + */ + /** + * Sample code: Clusters_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); + } +} +``` + +### Clusters_ListZones + +```java +/** + * Samples for Clusters ListZones. + */ +public final class ClustersListZonesSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_ListZones.json + */ + /** + * Sample code: Clusters_ListZones. + * + * @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); + } +} +``` + +### Clusters_Update + +```java +import com.azure.resourcemanager.avs.models.Cluster; + +/** + * Samples for Clusters Update. + */ +public final class ClustersUpdateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Update.json + */ + /** + * Sample code: Clusters_Update. + * + * @param manager Entry point to AvsManager. + */ + public static void clustersUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + Cluster resource = manager.clusters() + .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withClusterSize(4).apply(); + } +} +``` + +### Datastores_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.models.NetAppVolume; + +/** + * Samples for Datastores CreateOrUpdate. + */ +public final class DatastoresCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_CreateOrUpdate.json + */ + /** + * Sample code: Datastores_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void datastoresCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.datastores() + .define("datastore1") + .withExistingCluster("group1", "cloud1", "cluster1") + .withNetAppVolume(new NetAppVolume().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1")) + .create(); + } +} +``` + +### Datastores_Delete + +```java +/** + * Samples for Datastores Delete. + */ +public final class DatastoresDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Delete.json + */ + /** + * Sample code: Datastores_Delete. + * + * @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); + } +} +``` + +### Datastores_Get + +```java +/** + * Samples for Datastores Get. + */ +public final class DatastoresGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Get.json + */ + /** + * Sample code: Datastores_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void datastoresGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.datastores() + .getWithResponse("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); + } +} +``` + +### Datastores_List + +```java +/** + * Samples for Datastores List. + */ +public final class DatastoresListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_List.json + */ + /** + * Sample code: Datastores_List. + * + * @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); + } +} +``` + +### GlobalReachConnections_CreateOrUpdate + +```java +/** + * Samples for GlobalReachConnections CreateOrUpdate. + */ +public final class GlobalReachConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_CreateOrUpdate.json + */ + /** + * Sample code: GlobalReachConnections_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void globalReachConnectionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.globalReachConnections() + .define("connection1") + .withExistingPrivateCloud("group1", "cloud1") + .withAuthorizationKey("01010101-0101-0101-0101-010101010101") + .withPeerExpressRouteCircuit( + "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer") + .create(); + } +} +``` + +### GlobalReachConnections_Delete + +```java +/** + * Samples for GlobalReachConnections Delete. + */ +public final class GlobalReachConnectionsDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} +``` + +### GlobalReachConnections_Get + +```java +/** + * Samples for GlobalReachConnections Get. + */ +public final class GlobalReachConnectionsGetSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_Get.json + */ + /** + * Sample code: GlobalReachConnections_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void globalReachConnectionsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.globalReachConnections() + .getWithResponse("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); + } +} +``` + +### GlobalReachConnections_List + +```java +/** + * Samples for GlobalReachConnections List. + */ +public final class GlobalReachConnectionsListSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_List.json + */ + /** + * Sample code: GlobalReachConnections_List. + * + * @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); + } +} +``` + +### HcxEnterpriseSites_CreateOrUpdate + +```java +/** + * Samples for HcxEnterpriseSites CreateOrUpdate. + */ +public final class HcxEnterpriseSitesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json + */ + /** + * Sample code: HcxEnterpriseSites_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void hcxEnterpriseSitesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hcxEnterpriseSites().define("site1").withExistingPrivateCloud("group1", "cloud1").create(); + } +} +``` + +### HcxEnterpriseSites_Delete + +```java +/** + * Samples for HcxEnterpriseSites Delete. + */ +public final class HcxEnterpriseSitesDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Delete.json + */ + /** + * Sample code: HcxEnterpriseSites_Delete. + * + * @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); + } +} +``` + +### HcxEnterpriseSites_Get + +```java +/** + * Samples for HcxEnterpriseSites Get. + */ +public final class HcxEnterpriseSitesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Get.json + */ + /** + * Sample code: HcxEnterpriseSites_Get. + * + * @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); + } +} +``` + +### HcxEnterpriseSites_List + +```java +/** + * Samples for HcxEnterpriseSites List. + */ +public final class HcxEnterpriseSitesListSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_List.json + */ + /** + * Sample code: HcxEnterpriseSites_List. + * + * @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); + } +} +``` + +### IscsiPaths_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * Samples for IscsiPaths CreateOrUpdate. + */ +public final class IscsiPathsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_CreateOrUpdate.json + */ + /** + * Sample code: IscsiPaths_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths() + .createOrUpdate("group1", "cloud1", new IscsiPathInner().withNetworkBlock("192.168.0.0/24"), + com.azure.core.util.Context.NONE); + } +} +``` + +### IscsiPaths_Delete + +```java +/** + * Samples for IscsiPaths Delete. + */ +public final class IscsiPathsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Delete.json + */ + /** + * Sample code: IscsiPaths_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().delete("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### IscsiPaths_Get + +```java +/** + * Samples for IscsiPaths Get. + */ +public final class IscsiPathsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Get.json + */ + /** + * Sample code: IscsiPaths_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### IscsiPaths_ListByPrivateCloud + +```java +/** + * Samples for IscsiPaths ListByPrivateCloud. + */ +public final class IscsiPathsListByPrivateCloudSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_List.json + */ + /** + * Sample code: IscsiPaths_ListByPrivateCloud. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsListByPrivateCloud(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### Locations_CheckQuotaAvailability + +```java +/** + * Samples for Locations CheckQuotaAvailability. + */ +public final class LocationsCheckQuotaAvailabilitySamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckQuotaAvailability.json + */ + /** + * Sample code: Locations_CheckQuotaAvailability. + * + * @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); + } +} +``` + +### Locations_CheckTrialAvailability + +```java + +/** + * Samples for Locations CheckTrialAvailability. + */ +public final class LocationsCheckTrialAvailabilitySamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckTrialAvailability.json + */ + /** + * Sample code: Locations_CheckTrialAvailability. + * + * @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); + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} +``` + +### PlacementPolicies_CreateOrUpdate + +```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. + */ +public final class PlacementPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_CreateOrUpdate.json + */ + /** + * Sample code: PlacementPolicies_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void placementPoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.placementPolicies() + .define("policy1") + .withExistingCluster("group1", "cloud1", "cluster1") + .withProperties(new VmHostPlacementPolicyProperties().withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityType(AffinityType.ANTI_AFFINITY) + .withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) + .create(); + } +} +``` + +### PlacementPolicies_Delete + +```java +/** + * Samples for PlacementPolicies Delete. + */ +public final class PlacementPoliciesDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Delete.json + */ + /** + * Sample code: PlacementPolicies_Delete. + * + * @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); + } +} +``` + +### PlacementPolicies_Get + +```java +/** + * Samples for PlacementPolicies Get. + */ +public final class PlacementPoliciesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} +``` + +### PlacementPolicies_List + +```java +/** + * Samples for PlacementPolicies List. + */ +public final class PlacementPoliciesListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_List.json + */ + /** + * Sample code: PlacementPolicies_List. + * + * @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); + } +} +``` + +### PlacementPolicies_Update + +```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; + +/** + * Samples for PlacementPolicies Update. + */ +public final class PlacementPoliciesUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Update.json + */ + /** + * Sample code: PlacementPolicies_Update. + * + * @param manager Entry point to AvsManager. + */ + public static void placementPoliciesUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + PlacementPolicy resource = manager.placementPolicies() + .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withState(PlacementPolicyState.DISABLED) + .withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST) + .apply(); + } +} +``` + +### PrivateClouds_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.models.ManagementCluster; +import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; +import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PrivateClouds CreateOrUpdate. + */ +public final class PrivateCloudsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_CreateOrUpdate.json + */ + /** + * Sample code: PrivateClouds_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds() + .define("cloud1") + .withRegion("eastus2") + .withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")) + .withTags(mapOf()) + .withIdentity(new PrivateCloudIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED)) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .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; + } +} +``` + +### PrivateClouds_Delete + +```java +/** + * Samples for PrivateClouds Delete. + */ +public final class PrivateCloudsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Delete.json + */ + /** + * Sample code: PrivateClouds_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); + } +} +``` + +### PrivateClouds_GetByResourceGroup + +```java +/** + * Samples for PrivateClouds GetByResourceGroup. + */ +public final class PrivateCloudsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Get.json + */ + /** + * Sample code: PrivateClouds_Get. + * + * @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); + } +} +``` + +### PrivateClouds_List + +```java +/** + * Samples for PrivateClouds List. + */ +public final class PrivateCloudsListSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListInSubscription.json + */ + /** + * Sample code: PrivateClouds_ListInSubscription. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateClouds_ListAdminCredentials + +```java +/** + * Samples for PrivateClouds ListAdminCredentials. + */ +public final class PrivateCloudsListAdminCredentialsSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListAdminCredentials.json + */ + /** + * Sample code: PrivateClouds_ListAdminCredentials. + * + * @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); + } +} +``` + +### PrivateClouds_ListByResourceGroup + +```java +/** + * Samples for PrivateClouds ListByResourceGroup. + */ +public final class PrivateCloudsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} +``` + +### PrivateClouds_RotateNsxtPassword + +```java +/** + * Samples for PrivateClouds RotateNsxtPassword. + */ +public final class PrivateCloudsRotateNsxtPasswordSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateNsxtPassword.json + */ + /** + * Sample code: PrivateClouds_RotateNsxtPassword. + * + * @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); + } +} +``` + +### PrivateClouds_RotateVcenterPassword + +```java +/** + * Samples for PrivateClouds RotateVcenterPassword. + */ +public final class PrivateCloudsRotateVcenterPasswordSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateVcenterPassword.json + */ + /** + * Sample code: PrivateClouds_RotateVcenterPassword. + * + * @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); + } +} +``` + +### PrivateClouds_Update + +```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.SystemAssignedServiceIdentityType; + +/** + * Samples for PrivateClouds Update. + */ +public final class PrivateCloudsUpdateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Update.json + */ + /** + * Sample code: PrivateClouds_Update. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + PrivateCloud resource = manager.privateClouds() + .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withIdentity(new PrivateCloudIdentity().withType(SystemAssignedServiceIdentityType.NONE)) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) + .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") + .withKeyVersion("fakeTokenPlaceholder") + .withKeyVaultUrl("fakeTokenPlaceholder"))) + .apply(); + } +} +``` + +### ScriptCmdlets_Get + +```java +/** + * Samples for ScriptCmdlets Get. + */ +public final class ScriptCmdletsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptCmdlets_Get.json + */ + /** + * Sample code: ScriptCmdlets_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void scriptCmdletsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.scriptCmdlets() + .getWithResponse("group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", + com.azure.core.util.Context.NONE); + } +} +``` + +### ScriptCmdlets_List + +```java +/** + * Samples for ScriptCmdlets List. + */ +public final class ScriptCmdletsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} +``` + +### 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/Microsoft.AVS.Management/examples/2023-09-01/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(); + } +} +``` + +### ScriptExecutions_Delete + +```java +/** + * Samples for ScriptExecutions Delete. + */ +public final class ScriptExecutionsDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_Delete.json + */ + /** + * Sample code: ScriptExecutions_Delete. + * + * @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); + } +} +``` + +### ScriptExecutions_Get + +```java +/** + * Samples for ScriptExecutions Get. + */ +public final class ScriptExecutionsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} +``` + +### ScriptExecutions_GetExecutionLogs + +```java +import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; +import java.util.Arrays; + +/** + * Samples for ScriptExecutions GetExecutionLogs. + */ +public final class ScriptExecutionsGetExecutionLogsSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_GetExecutionLogs.json + */ + /** + * Sample code: ScriptExecutions_GetExecutionLogs. + * + * @param manager Entry point to AvsManager. + */ + public static void scriptExecutionsGetExecutionLogs(com.azure.resourcemanager.avs.AvsManager manager) { + manager.scriptExecutions() + .getExecutionLogsWithResponse("group1", "cloud1", "addSsoServer", + Arrays.asList(ScriptOutputStreamType.INFORMATION, ScriptOutputStreamType.fromString("Warnings"), + ScriptOutputStreamType.fromString("Errors"), ScriptOutputStreamType.OUTPUT), + com.azure.core.util.Context.NONE); + } +} +``` + +### ScriptExecutions_List + +```java +/** + * Samples for ScriptExecutions List. + */ +public final class ScriptExecutionsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_List.json + */ + /** + * Sample code: ScriptExecutions_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); + } +} +``` + +### ScriptPackages_Get + +```java +/** + * Samples for ScriptPackages Get. + */ +public final class ScriptPackagesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_Get.json + */ + /** + * Sample code: ScriptPackages_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void scriptPackagesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.scriptPackages() + .getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", com.azure.core.util.Context.NONE); + } +} +``` + +### ScriptPackages_List + +```java +/** + * Samples for ScriptPackages List. + */ +public final class ScriptPackagesListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_List.json + */ + /** + * Sample code: ScriptPackages_List. + * + * @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); + } +} +``` + +### VirtualMachines_Get + +```java +/** + * Samples for VirtualMachines Get. + */ +public final class VirtualMachinesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_Get.json + */ + /** + * Sample code: VirtualMachines_Get. + * + * @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); + } +} +``` + +### VirtualMachines_List + +```java +/** + * Samples for VirtualMachines List. + */ +public final class VirtualMachinesListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_List.json + */ + /** + * Sample code: VirtualMachines_List. + * + * @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); + } +} +``` + +### VirtualMachines_RestrictMovement + +```java +import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; +import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; + +/** + * Samples for VirtualMachines RestrictMovement. + */ +public final class VirtualMachinesRestrictMovementSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_RestrictMovement.json + */ + /** + * Sample code: VirtualMachines_RestrictMovement. + * + * @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); + } +} +``` + ### WorkloadNetworks_CreateDhcp ```java @@ -63,7 +1686,7 @@ public final class WorkloadNetworksCreateDhcpSamples { public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDhcp("dhcp1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") .withRevision(1L) .withServerAddress("40.1.5.1/24") @@ -95,7 +1718,7 @@ public final class WorkloadNetworksCreateDnsServiceSamples { public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDnsService("dnsService1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("dnsService1") .withDnsServiceIp("5.5.5.5") .withDefaultDnsZone("defaultDnsZone1") @@ -128,7 +1751,7 @@ public final class WorkloadNetworksCreateDnsZoneSamples { public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDnsZone("dnsZone1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("dnsZone1") .withDomain(Arrays.asList()) .withDnsServerIps(Arrays.asList("1.1.1.1")) @@ -160,7 +1783,7 @@ public final class WorkloadNetworksCreatePortMirroringSamples { public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .definePortMirroring("portMirroring1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("portMirroring1") .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) .withSource("vmGroup1") @@ -190,7 +1813,7 @@ public final class WorkloadNetworksCreatePublicIPSamples { public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .definePublicIP("publicIP1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("publicIP1") .withNumberOfPublicIPs(32L) .create(); @@ -220,7 +1843,7 @@ public final class WorkloadNetworksCreateSegmentSamples { public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineSegment("segment1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("segment1") .withConnectedGateway("/infra/tier-1s/gateway") .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) @@ -248,10 +1871,7 @@ public final class WorkloadNetworksCreateVMGroupSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks() - .defineVMGroup("vmGroup1") - .withExistingWorkloadNetwork("group1", "cloud1", null) - .create(); + manager.workloadNetworks().defineVMGroup("vmGroup1").withExistingPrivateCloud("group1", "cloud1").create(); } } ``` @@ -273,7 +1893,7 @@ public final class WorkloadNetworksDeleteDhcpSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().deleteDhcp("group1", "cloud1", null, "dhcp1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDhcp("group1", "cloud1", "dhcp1", com.azure.core.util.Context.NONE); } } ``` @@ -385,8 +2005,7 @@ public final class WorkloadNetworksDeleteSegmentSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks() - .deleteSegment("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteSegment("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); } } ``` @@ -429,7 +2048,7 @@ public final class WorkloadNetworksGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().getWithResponse("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -474,7 +2093,7 @@ public final class WorkloadNetworksGetDnsServiceSamples { */ public static void workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE); + .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); } } ``` @@ -497,7 +2116,7 @@ public final class WorkloadNetworksGetDnsZoneSamples { */ public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE); + .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); } } ``` @@ -520,7 +2139,7 @@ public final class WorkloadNetworksGetGatewaySamples { */ public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getGatewayWithResponse("group1", "cloud1", null, "gateway1", com.azure.core.util.Context.NONE); + .getGatewayWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); } } ``` @@ -543,7 +2162,7 @@ public final class WorkloadNetworksGetPortMirroringSamples { */ public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE); + .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); } } ``` @@ -566,7 +2185,7 @@ public final class WorkloadNetworksGetPublicIPSamples { */ public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getPublicIPWithResponse("group1", "cloud1", null, "publicIP1", com.azure.core.util.Context.NONE); + .getPublicIPWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); } } ``` @@ -589,7 +2208,7 @@ public final class WorkloadNetworksGetSegmentSamples { */ public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); + .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); } } ``` @@ -612,7 +2231,7 @@ public final class WorkloadNetworksGetVMGroupSamples { */ public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE); + .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); } } ``` @@ -635,7 +2254,7 @@ public final class WorkloadNetworksGetVirtualMachineSamples { */ public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getVirtualMachineWithResponse("group1", "cloud1", null, "vm1", com.azure.core.util.Context.NONE); + .getVirtualMachineWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); } } ``` @@ -678,7 +2297,7 @@ public final class WorkloadNetworksListDhcpSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDhcp("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listDhcp("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -700,7 +2319,7 @@ public final class WorkloadNetworksListDnsServicesSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDnsServices("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listDnsServices("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -722,7 +2341,7 @@ public final class WorkloadNetworksListDnsZonesSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDnsZones("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listDnsZones("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -744,7 +2363,7 @@ public final class WorkloadNetworksListGatewaysSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listGateways("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listGateways("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -766,7 +2385,7 @@ public final class WorkloadNetworksListPortMirroringSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listPortMirroring("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listPortMirroring("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -788,7 +2407,7 @@ public final class WorkloadNetworksListPublicIPsSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listPublicIPs("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listPublicIPs("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -810,7 +2429,7 @@ public final class WorkloadNetworksListSegmentsSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listSegments("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listSegments("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -832,7 +2451,7 @@ public final class WorkloadNetworksListVMGroupsSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listVMGroups("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listVMGroups("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -854,7 +2473,7 @@ public final class WorkloadNetworksListVirtualMachinesSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listVirtualMachines("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listVirtualMachines("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -881,7 +2500,7 @@ public final class WorkloadNetworksUpdateDnsServiceSamples { */ public static void workloadNetworksUpdateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkDnsService resource = manager.workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE) + .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsService1") @@ -916,7 +2535,7 @@ public final class WorkloadNetworksUpdateDnsZoneSamples { */ public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkDnsZone resource = manager.workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE) + .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsZone1") @@ -950,7 +2569,7 @@ public final class WorkloadNetworksUpdatePortMirroringSamples { */ public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkPortMirroring resource = manager.workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE) + .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) @@ -982,7 +2601,7 @@ public final class WorkloadNetworksUpdateSegmentSamples { */ public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkSegment resource = manager.workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE) + .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } @@ -1010,7 +2629,7 @@ public final class WorkloadNetworksUpdateVMGroupSamples { */ public static void workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkVMGroup resource = manager.workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE) + .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java index 085c3f9c42b63..802d660e62f90 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 @@ -23,10 +23,10 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.avs.fluent.AvsClient; +import com.azure.resourcemanager.avs.fluent.AVSClient; import com.azure.resourcemanager.avs.implementation.AddonsImpl; import com.azure.resourcemanager.avs.implementation.AuthorizationsImpl; -import com.azure.resourcemanager.avs.implementation.AvsClientBuilder; +import com.azure.resourcemanager.avs.implementation.AVSClientBuilder; import com.azure.resourcemanager.avs.implementation.CloudLinksImpl; import com.azure.resourcemanager.avs.implementation.ClustersImpl; import com.azure.resourcemanager.avs.implementation.DatastoresImpl; @@ -87,6 +87,8 @@ public final class AvsManager { private GlobalReachConnections globalReachConnections; + private WorkloadNetworks workloadNetworks; + private CloudLinks cloudLinks; private Addons addons; @@ -103,14 +105,12 @@ public final class AvsManager { private IscsiPaths iscsiPaths; - private WorkloadNetworks workloadNetworks; - - private final AvsClient clientObject; + private final AVSClient clientObject; private AvsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AvsClientBuilder().pipeline(httpPipeline) + this.clientObject = new AVSClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -412,6 +412,20 @@ public GlobalReachConnections globalReachConnections() { return globalReachConnections; } + /** + * Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkSegment, WorkloadNetworkDhcp, + * WorkloadNetworkPortMirroring, WorkloadNetworkVMGroup, WorkloadNetworkDnsService, WorkloadNetworkDnsZone, + * WorkloadNetworkPublicIp. + * + * @return Resource collection API of WorkloadNetworks. + */ + public WorkloadNetworks workloadNetworks() { + if (this.workloadNetworks == null) { + this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this); + } + return workloadNetworks; + } + /** * Gets the resource collection API of CloudLinks. It manages CloudLink. * @@ -497,7 +511,7 @@ public ScriptExecutions scriptExecutions() { } /** - * Gets the resource collection API of IscsiPaths. It manages IscsiPath. + * Gets the resource collection API of IscsiPaths. * * @return Resource collection API of IscsiPaths. */ @@ -509,26 +523,12 @@ public IscsiPaths iscsiPaths() { } /** - * Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkSegment, WorkloadNetworkDhcp, - * WorkloadNetworkPortMirroring, WorkloadNetworkVMGroup, WorkloadNetworkDnsService, WorkloadNetworkDnsZone, - * WorkloadNetworkPublicIp. - * - * @return Resource collection API of WorkloadNetworks. - */ - public WorkloadNetworks workloadNetworks() { - if (this.workloadNetworks == null) { - this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this); - } - return workloadNetworks; - } - - /** - * Gets wrapped service client AvsClient providing direct access to the underlying auto-generated API + * Gets wrapped service client AVSClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. * - * @return Wrapped service client AvsClient. + * @return Wrapped service client AVSClient. */ - public AvsClient serviceClient() { + public AVSClient serviceClient() { return this.clientObject; } } 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 73c423f679dd0..6254043eef2c5 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 @@ -8,9 +8,9 @@ import java.time.Duration; /** - * The interface for AvsClient class. + * The interface for AVSClient class. */ -public interface AvsClient { +public interface AVSClient { /** * Gets Server parameter. * @@ -102,6 +102,13 @@ public interface AvsClient { */ GlobalReachConnectionsClient getGlobalReachConnections(); + /** + * Gets the WorkloadNetworksClient object to access its operations. + * + * @return the WorkloadNetworksClient object. + */ + WorkloadNetworksClient getWorkloadNetworks(); + /** * Gets the CloudLinksClient object to access its operations. * @@ -157,11 +164,4 @@ public interface AvsClient { * @return the IscsiPathsClient object. */ IscsiPathsClient getIscsiPaths(); - - /** - * Gets the WorkloadNetworksClient object to access its operations. - * - * @return the WorkloadNetworksClient object. - */ - WorkloadNetworksClient getWorkloadNetworks(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java index b17dab94dbc97..d0e7c433ad7bb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java @@ -50,7 +50,6 @@ PagedIterable listByPrivateCloud(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -58,29 +57,26 @@ PagedIterable listByPrivateCloud(String resourceGroupName, Strin * @return a IscsiPath along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); /** * Get a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath. */ @ServiceMethod(returns = ReturnType.SINGLE) - IscsiPathInner get(String resourceGroupName, String privateCloudName, String iscsiPathName); + IscsiPathInner get(String resourceGroupName, String privateCloudName); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @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. @@ -89,14 +85,13 @@ Response getWithResponse(String resourceGroupName, String privat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, String iscsiPathName, IscsiPathInner resource); + String privateCloudName, IscsiPathInner resource); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -106,14 +101,13 @@ SyncPoller, IscsiPathInner> beginCreateOrUpdate(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context); + String privateCloudName, IscsiPathInner resource, Context context); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @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. @@ -121,15 +115,13 @@ SyncPoller, IscsiPathInner> beginCreateOrUpdate(Strin * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, - IscsiPathInner resource); + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,30 +130,27 @@ IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, - IscsiPathInner resource, Context context); + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 iscsiPathName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -169,33 +158,30 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, - String iscsiPathName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, Context context); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 iscsiPathName); + void delete(String resourceGroupName, String privateCloudName); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 iscsiPathName, Context context); + void delete(String resourceGroupName, String privateCloudName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java index e8c5bfd10e63d..63068b0084e26 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 @@ -27,83 +27,77 @@ */ public interface WorkloadNetworksClient { /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkInner get(String resourceGroupName, String privateCloudName); /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkInner get(String resourceGroupName, String privateCloudName, String workloadNetworkName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSegments(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listSegments(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,14 +106,13 @@ PagedIterable listSegments(String resourceGroupName */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listSegments(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -129,14 +122,13 @@ PagedIterable listSegments(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, Context context); + String segmentId, Context context); /** * Get a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -144,15 +136,13 @@ Response getSegmentWithResponse(String resourceGrou * @return a WorkloadNetworkSegment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId); + WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId); /** * Create a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -162,7 +152,7 @@ WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment); /** @@ -170,7 +160,6 @@ SyncPoller, WorkloadNetworkSegmentInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -181,7 +170,7 @@ SyncPoller, WorkloadNetworkSegmentInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); /** @@ -189,7 +178,6 @@ SyncPoller, WorkloadNetworkSegmentInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,15 +186,14 @@ SyncPoller, WorkloadNetworkSegmentInner> * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment); + WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment); /** * Create a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -216,16 +203,14 @@ WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String priva * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context); + WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); /** * Update a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -235,15 +220,13 @@ WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, - WorkloadNetworkSegmentInner properties); + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties); /** * Update a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -254,15 +237,14 @@ SyncPoller, WorkloadNetworkSegmentInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, - WorkloadNetworkSegmentInner properties, Context context); + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, + Context context); /** * Update a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,15 +253,14 @@ SyncPoller, WorkloadNetworkSegmentInner> * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties); + WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner properties); /** * Update a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -289,15 +270,14 @@ WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String priva * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, Context context); + WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner properties, Context context); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -306,14 +286,13 @@ WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId); + String segmentId); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -323,28 +302,26 @@ SyncPoller, Void> beginDeleteSegment(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, Context context); + String segmentId, Context context); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId); + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -352,30 +329,26 @@ SyncPoller, Void> beginDeleteSegment(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, - Context context); + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); /** * List WorkloadNetworkDhcp resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkDhcp resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -384,7 +357,7 @@ PagedIterable listDhcp(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkDhcp. @@ -421,7 +394,6 @@ Response getDhcpWithResponse(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -431,15 +403,13 @@ Response getDhcpWithResponse(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp); + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Create a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -450,15 +420,13 @@ SyncPoller, WorkloadNetworkDhcpInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Create a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -467,15 +435,14 @@ SyncPoller, WorkloadNetworkDhcpInner> begin * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Create a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -485,15 +452,14 @@ WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateClou * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Update a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -503,15 +469,13 @@ WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateClou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp); + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Update a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -522,15 +486,13 @@ SyncPoller, WorkloadNetworkDhcpInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Update a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -539,15 +501,14 @@ SyncPoller, WorkloadNetworkDhcpInner> begin * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Update a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -557,15 +518,14 @@ WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateClou * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -574,14 +534,13 @@ WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateClou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId); + String dhcpId); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -590,29 +549,27 @@ SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, Str * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, Context context); + SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + Context context); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId); + void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -620,30 +577,26 @@ SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, Str * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, - Context context); + void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); /** * List WorkloadNetworkGateway resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGateways(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listGateways(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkGateway resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -652,14 +605,13 @@ PagedIterable listGateways(String resourceGroupName */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listGateways(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkGateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -669,14 +621,13 @@ PagedIterable listGateways(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String gatewayId, Context context); + String gatewayId, Context context); /** * Get a WorkloadNetworkGateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -684,15 +635,13 @@ Response getGatewayWithResponse(String resourceGrou * @return a WorkloadNetworkGateway. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String gatewayId); + WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId); /** * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -701,14 +650,13 @@ WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateC */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName, String workloadNetworkName); + String privateCloudName); /** * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -718,14 +666,13 @@ PagedIterable listPortMirroring(String resour */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context); + String privateCloudName, Context context); /** * Get a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -735,14 +682,13 @@ PagedIterable listPortMirroring(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) Response getPortMirroringWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, Context context); + String privateCloudName, String portMirroringId, Context context); /** * Get a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -751,14 +697,13 @@ Response getPortMirroringWithResponse(String */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId); + String portMirroringId); /** * Create a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -768,15 +713,14 @@ WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Create a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -787,15 +731,14 @@ WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Create a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -805,15 +748,13 @@ WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Create a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -824,15 +765,13 @@ WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Update a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -842,15 +781,14 @@ WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Update a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -861,15 +799,14 @@ WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Update a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -879,15 +816,13 @@ WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Update a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -898,8 +833,7 @@ WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Delete a WorkloadNetworkPortMirroring. @@ -965,22 +899,19 @@ void deletePortMirroring(String resourceGroupName, String portMirroringId, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkVMGroup resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -989,14 +920,13 @@ PagedIterable listVMGroups(String resourceGroupName */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1006,14 +936,13 @@ PagedIterable listVMGroups(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, Context context); + String vmGroupId, Context context); /** * Get a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1021,15 +950,13 @@ Response getVMGroupWithResponse(String resourceGrou * @return a WorkloadNetworkVMGroup. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId); + WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); /** * Create a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1039,15 +966,13 @@ WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, - WorkloadNetworkVMGroupInner resource); + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource); /** * Create a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -1058,15 +983,14 @@ SyncPoller, WorkloadNetworkVMGroupInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, - WorkloadNetworkVMGroupInner resource, Context context); + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, + Context context); /** * Create a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1075,15 +999,14 @@ SyncPoller, WorkloadNetworkVMGroupInner> * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource); + WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner resource); /** * Create a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -1093,15 +1016,14 @@ WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String priva * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context); + WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner resource, Context context); /** * Update a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1111,7 +1033,7 @@ WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup); /** @@ -1119,7 +1041,6 @@ SyncPoller, WorkloadNetworkVMGroupInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -1130,7 +1051,7 @@ SyncPoller, WorkloadNetworkVMGroupInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); /** @@ -1138,7 +1059,6 @@ SyncPoller, WorkloadNetworkVMGroupInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1147,15 +1067,14 @@ SyncPoller, WorkloadNetworkVMGroupInner> * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup); + WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup); /** * Update a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -1165,9 +1084,8 @@ WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String priva * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context); + WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); /** * Delete a WorkloadNetworkVMGroup. @@ -1232,7 +1150,6 @@ SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1241,14 +1158,13 @@ SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName, String workloadNetworkName); + String privateCloudName); /** * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1258,14 +1174,13 @@ PagedIterable listVirtualMachines(String res */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context); + String privateCloudName, Context context); /** * Get a WorkloadNetworkVirtualMachine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1275,14 +1190,13 @@ PagedIterable listVirtualMachines(String res */ @ServiceMethod(returns = ReturnType.SINGLE) Response getVirtualMachineWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context); + String privateCloudName, String virtualMachineId, Context context); /** * Get a WorkloadNetworkVirtualMachine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1291,14 +1205,13 @@ Response getVirtualMachineWithResponse(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String virtualMachineId); + String virtualMachineId); /** * List WorkloadNetworkDnsService resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1306,15 +1219,13 @@ WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, S * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkDnsService resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1324,14 +1235,13 @@ PagedIterable listDnsServices(String resourceGro */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1341,14 +1251,13 @@ PagedIterable listDnsServices(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDnsServiceWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context); + String privateCloudName, String dnsServiceId, Context context); /** * Get a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1357,14 +1266,13 @@ Response getDnsServiceWithResponse(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId); + String dnsServiceId); /** * Create a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1374,7 +1282,7 @@ WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String pr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** @@ -1382,7 +1290,6 @@ SyncPoller, WorkloadNetworkDnsService * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -1393,7 +1300,7 @@ SyncPoller, WorkloadNetworkDnsService */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** @@ -1401,7 +1308,6 @@ SyncPoller, WorkloadNetworkDnsService * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1411,14 +1317,13 @@ SyncPoller, WorkloadNetworkDnsService */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** * Create a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -1429,15 +1334,13 @@ WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context); + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** * Update a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1447,7 +1350,7 @@ WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** @@ -1455,7 +1358,6 @@ SyncPoller, WorkloadNetworkDnsService * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -1466,7 +1368,7 @@ SyncPoller, WorkloadNetworkDnsService */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** @@ -1474,7 +1376,6 @@ SyncPoller, WorkloadNetworkDnsService * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1484,14 +1385,13 @@ SyncPoller, WorkloadNetworkDnsService */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** * Update a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -1502,8 +1402,7 @@ WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context); + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** * Delete a WorkloadNetworkDnsService. @@ -1568,22 +1467,19 @@ SyncPoller, Void> beginDeleteDnsService(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkDnsZone resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1592,14 +1488,13 @@ PagedIterable listDnsZones(String resourceGroupName */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1609,14 +1504,13 @@ PagedIterable listDnsZones(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, Context context); + String dnsZoneId, Context context); /** * Get a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1624,15 +1518,13 @@ Response getDnsZoneWithResponse(String resourceGrou * @return a WorkloadNetworkDnsZone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId); + WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); /** * Create a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1642,7 +1534,7 @@ WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** @@ -1650,7 +1542,6 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -1661,7 +1552,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** @@ -1669,7 +1560,6 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1678,15 +1568,14 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** * Create a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -1696,16 +1585,14 @@ WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String priva * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); + WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** * Update a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1715,7 +1602,7 @@ WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** @@ -1723,7 +1610,6 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -1734,7 +1620,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** @@ -1742,7 +1628,6 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1751,15 +1636,14 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** * Update a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -1769,9 +1653,8 @@ WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String priva * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); + WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** * Delete a WorkloadNetworkDnsZone. @@ -1836,7 +1719,6 @@ SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1844,15 +1726,13 @@ SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkPublicIP resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1862,14 +1742,13 @@ PagedIterable listPublicIPs(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1879,14 +1758,13 @@ PagedIterable listPublicIPs(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) Response getPublicIPWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId, Context context); + String publicIPId, Context context); /** * Get a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1894,15 +1772,13 @@ Response getPublicIPWithResponse(String resourceGr * @return a WorkloadNetworkPublicIP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId); + WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String privateCloudName, String publicIPId); /** * Create a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1912,7 +1788,7 @@ WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String privat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + String resourceGroupName, String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP); /** @@ -1920,7 +1796,6 @@ SyncPoller, WorkloadNetworkPublicIpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -1931,7 +1806,7 @@ SyncPoller, WorkloadNetworkPublicIpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + String resourceGroupName, String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); /** @@ -1939,7 +1814,6 @@ SyncPoller, WorkloadNetworkPublicIpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1948,15 +1822,14 @@ SyncPoller, WorkloadNetworkPublicIpInne * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP); + WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP); /** * Create a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -1966,9 +1839,8 @@ WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String pri * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, - Context context); + WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); /** * Delete a WorkloadNetworkPublicIP. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java index d98200df74cdf..50c24fcd62c93 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java @@ -50,24 +50,24 @@ public final class AddonsClientImpl implements AddonsClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of AddonsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AddonsClientImpl(AvsClientImpl client) { + AddonsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(AddonsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientAddons to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientAddons to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientAddons") + @ServiceInterface(name = "AVSClientAddons") public interface AddonsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java index 7259697452fb8..7ac85ce97d9eb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java @@ -50,25 +50,25 @@ public final class AuthorizationsClientImpl implements AuthorizationsClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of AuthorizationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AuthorizationsClientImpl(AvsClientImpl client) { + AuthorizationsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(AuthorizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientAuthorizations to be used by the proxy service to perform + * The interface defining all the services for AVSClientAuthorizations to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientAuthorizati") + @ServiceInterface(name = "AVSClientAuthorizati") public interface AuthorizationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java index 72c78a4af8432..dd90210acdbd7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java @@ -15,10 +15,10 @@ import java.time.Duration; /** - * A builder for creating a new instance of the AvsClientImpl type. + * A builder for creating a new instance of the AVSClientImpl type. */ -@ServiceClientBuilder(serviceClients = { AvsClientImpl.class }) -public final class AvsClientBuilder { +@ServiceClientBuilder(serviceClients = { AVSClientImpl.class }) +public final class AVSClientBuilder { /* * Server parameter */ @@ -28,9 +28,9 @@ public final class AvsClientBuilder { * Sets Server parameter. * * @param endpoint the endpoint value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder endpoint(String endpoint) { + public AVSClientBuilder endpoint(String endpoint) { this.endpoint = endpoint; return this; } @@ -44,9 +44,9 @@ public AvsClientBuilder endpoint(String endpoint) { * Sets The ID of the target subscription. The value must be an UUID. * * @param subscriptionId the subscriptionId value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder subscriptionId(String subscriptionId) { + public AVSClientBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public AvsClientBuilder subscriptionId(String subscriptionId) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder environment(AzureEnvironment environment) { + public AVSClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public AvsClientBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder pipeline(HttpPipeline pipeline) { + public AVSClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public AvsClientBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public AVSClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public AvsClientBuilder defaultPollInterval(Duration defaultPollInterval) { * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AvsClientBuilder. + * @return the AVSClientBuilder. */ - public AvsClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public AVSClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AvsClientImpl with the provided parameters. + * Builds an instance of AVSClientImpl with the provided parameters. * - * @return an instance of AvsClientImpl. + * @return an instance of AVSClientImpl. */ - public AvsClientImpl buildClient() { + public AVSClientImpl buildClient() { AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) ? pipeline @@ -130,7 +130,7 @@ public AvsClientImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - AvsClientImpl client = new AvsClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, + AVSClientImpl client = new AVSClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.endpoint, this.subscriptionId); return client; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index ddbc989cf2536..8faa7ed8428ac 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java @@ -25,7 +25,7 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.avs.fluent.AddonsClient; import com.azure.resourcemanager.avs.fluent.AuthorizationsClient; -import com.azure.resourcemanager.avs.fluent.AvsClient; +import com.azure.resourcemanager.avs.fluent.AVSClient; import com.azure.resourcemanager.avs.fluent.CloudLinksClient; import com.azure.resourcemanager.avs.fluent.ClustersClient; import com.azure.resourcemanager.avs.fluent.DatastoresClient; @@ -51,10 +51,10 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the AvsClientImpl type. + * Initializes a new instance of the AVSClientImpl type. */ -@ServiceClient(builder = AvsClientBuilder.class) -public final class AvsClientImpl implements AvsClient { +@ServiceClient(builder = AVSClientBuilder.class) +public final class AVSClientImpl implements AVSClient { /** * Server parameter. */ @@ -251,6 +251,20 @@ public GlobalReachConnectionsClient getGlobalReachConnections() { return this.globalReachConnections; } + /** + * The WorkloadNetworksClient object to access its operations. + */ + private final WorkloadNetworksClient workloadNetworks; + + /** + * Gets the WorkloadNetworksClient object to access its operations. + * + * @return the WorkloadNetworksClient object. + */ + public WorkloadNetworksClient getWorkloadNetworks() { + return this.workloadNetworks; + } + /** * The CloudLinksClient object to access its operations. */ @@ -364,21 +378,7 @@ public IscsiPathsClient getIscsiPaths() { } /** - * The WorkloadNetworksClient object to access its operations. - */ - private final WorkloadNetworksClient workloadNetworks; - - /** - * Gets the WorkloadNetworksClient object to access its operations. - * - * @return the WorkloadNetworksClient object. - */ - public WorkloadNetworksClient getWorkloadNetworks() { - return this.workloadNetworks; - } - - /** - * Initializes an instance of AvsClient client. + * Initializes an instance of AVSClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. @@ -387,7 +387,7 @@ public WorkloadNetworksClient getWorkloadNetworks() { * @param endpoint Server parameter. * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ - AvsClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AVSClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; @@ -403,6 +403,7 @@ public WorkloadNetworksClient getWorkloadNetworks() { this.hcxEnterpriseSites = new HcxEnterpriseSitesClientImpl(this); this.authorizations = new AuthorizationsClientImpl(this); this.globalReachConnections = new GlobalReachConnectionsClientImpl(this); + this.workloadNetworks = new WorkloadNetworksClientImpl(this); this.cloudLinks = new CloudLinksClientImpl(this); this.addons = new AddonsClientImpl(this); this.virtualMachines = new VirtualMachinesClientImpl(this); @@ -411,7 +412,6 @@ public WorkloadNetworksClient getWorkloadNetworks() { this.scriptCmdlets = new ScriptCmdletsClientImpl(this); this.scriptExecutions = new ScriptExecutionsClientImpl(this); this.iscsiPaths = new IscsiPathsClientImpl(this); - this.workloadNetworks = new WorkloadNetworksClientImpl(this); } /** @@ -540,5 +540,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AvsClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AVSClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java index ac2f1aa325ddc..2b3346d1d5a03 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java @@ -50,25 +50,25 @@ public final class CloudLinksClientImpl implements CloudLinksClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of CloudLinksClientImpl. * * @param client the instance of the service client containing this operation class. */ - CloudLinksClientImpl(AvsClientImpl client) { + CloudLinksClientImpl(AVSClientImpl client) { this.service = RestProxy.create(CloudLinksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientCloudLinks to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientCloudLinks to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientCloudLinks") + @ServiceInterface(name = "AVSClientCloudLinks") public interface CloudLinksService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java index ea0b217f38684..ed04ac2edac22 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java @@ -54,24 +54,24 @@ public final class ClustersClientImpl implements ClustersClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of ClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ClustersClientImpl(AvsClientImpl client) { + ClustersClientImpl(AVSClientImpl client) { this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientClusters to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientClusters to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientClusters") + @ServiceInterface(name = "AVSClientClusters") public interface ClustersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java index 038bf652471ac..b4196f569da6c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java @@ -50,25 +50,25 @@ public final class DatastoresClientImpl implements DatastoresClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of DatastoresClientImpl. * * @param client the instance of the service client containing this operation class. */ - DatastoresClientImpl(AvsClientImpl client) { + DatastoresClientImpl(AVSClientImpl client) { this.service = RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientDatastores to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientDatastores to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientDatastores") + @ServiceInterface(name = "AVSClientDatastores") public interface DatastoresService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java index b2887e4e68ea2..a50f08efcb3d0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java @@ -50,25 +50,25 @@ public final class GlobalReachConnectionsClientImpl implements GlobalReachConnec /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of GlobalReachConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - GlobalReachConnectionsClientImpl(AvsClientImpl client) { + GlobalReachConnectionsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(GlobalReachConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientGlobalReachConnections to be used by the proxy service to + * The interface defining all the services for AVSClientGlobalReachConnections to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientGlobalReach") + @ServiceInterface(name = "AVSClientGlobalReach") public interface GlobalReachConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java index a81c54343cb32..3a7f65078d846 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java @@ -45,25 +45,25 @@ public final class HcxEnterpriseSitesClientImpl implements HcxEnterpriseSitesCli /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of HcxEnterpriseSitesClientImpl. * * @param client the instance of the service client containing this operation class. */ - HcxEnterpriseSitesClientImpl(AvsClientImpl client) { + HcxEnterpriseSitesClientImpl(AVSClientImpl client) { this.service = RestProxy.create(HcxEnterpriseSitesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientHcxEnterpriseSites to be used by the proxy service to + * The interface defining all the services for AVSClientHcxEnterpriseSites to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientHcxEnterpri") + @ServiceInterface(name = "AVSClientHcxEnterpri") public interface HcxEnterpriseSitesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java index 822cf3e4851fb..feb385954029b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java @@ -5,16 +5,20 @@ 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.IscsiPathInner; import com.azure.resourcemanager.avs.models.IscsiPath; import com.azure.resourcemanager.avs.models.IscsiPathProvisioningState; -public final class IscsiPathImpl implements IscsiPath, IscsiPath.Definition, IscsiPath.Update { +public final class IscsiPathImpl implements IscsiPath { private IscsiPathInner innerObject; private final com.azure.resourcemanager.avs.AvsManager serviceManager; + IscsiPathImpl(IscsiPathInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + public String id() { return this.innerModel().id(); } @@ -39,10 +43,6 @@ public String networkBlock() { return this.innerModel().networkBlock(); } - public String resourceGroupName() { - return resourceGroupName; - } - public IscsiPathInner innerModel() { return this.innerObject; } @@ -50,83 +50,4 @@ public IscsiPathInner innerModel() { private com.azure.resourcemanager.avs.AvsManager manager() { return this.serviceManager; } - - private String resourceGroupName; - - private String privateCloudName; - - private String iscsiPathName; - - public IscsiPathImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { - this.resourceGroupName = resourceGroupName; - this.privateCloudName = privateCloudName; - return this; - } - - public IscsiPath create() { - this.innerObject = serviceManager.serviceClient() - .getIscsiPaths() - .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), Context.NONE); - return this; - } - - public IscsiPath create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getIscsiPaths() - .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), context); - return this; - } - - IscsiPathImpl(String name, com.azure.resourcemanager.avs.AvsManager serviceManager) { - this.innerObject = new IscsiPathInner(); - this.serviceManager = serviceManager; - this.iscsiPathName = name; - } - - public IscsiPathImpl update() { - return this; - } - - public IscsiPath apply() { - this.innerObject = serviceManager.serviceClient() - .getIscsiPaths() - .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), Context.NONE); - return this; - } - - public IscsiPath apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getIscsiPaths() - .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), context); - return this; - } - - IscsiPathImpl(IscsiPathInner 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.iscsiPathName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "iscsiPaths"); - } - - public IscsiPath refresh() { - this.innerObject = serviceManager.serviceClient() - .getIscsiPaths() - .getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE) - .getValue(); - return this; - } - - public IscsiPath refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getIscsiPaths() - .getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, context) - .getValue(); - return this; - } - - public IscsiPathImpl withNetworkBlock(String networkBlock) { - this.innerModel().withNetworkBlock(networkBlock); - return this; - } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java index 9ee79639c73fa..9e369d91d0d55 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java @@ -50,25 +50,25 @@ public final class IscsiPathsClientImpl implements IscsiPathsClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of IscsiPathsClientImpl. * * @param client the instance of the service client containing this operation class. */ - IscsiPathsClientImpl(AvsClientImpl client) { + IscsiPathsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(IscsiPathsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientIscsiPaths to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientIscsiPaths to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientIscsiPaths") + @ServiceInterface(name = "AVSClientIscsiPaths") public interface IscsiPathsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths") @@ -81,35 +81,34 @@ Mono> listByPrivateCloud(@HostParam("endpoint") St Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("iscsiPathName") String iscsiPathName, - @HeaderParam("accept") String accept, Context context); + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("iscsiPathName") String iscsiPathName, - @HeaderParam("accept") String accept, @BodyParam("application/json") IscsiPathInner resource, - Context context); + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @BodyParam("application/json") IscsiPathInner resource, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("iscsiPathName") String iscsiPathName, - @HeaderParam("accept") String accept, Context context); + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -270,15 +269,13 @@ public PagedIterable listByPrivateCloud(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, - String iscsiPathName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -295,13 +292,10 @@ private Mono> getWithResponseAsync(String resourceGroup return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (iscsiPathName == null) { - return Mono.error(new IllegalArgumentException("Parameter iscsiPathName 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, iscsiPathName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -310,7 +304,6 @@ private Mono> getWithResponseAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -319,7 +312,7 @@ private Mono> getWithResponseAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, - String iscsiPathName, Context context) { + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -336,13 +329,10 @@ private Mono> getWithResponseAsync(String resourceGroup return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (iscsiPathName == null) { - return Mono.error(new IllegalArgumentException("Parameter iscsiPathName 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, iscsiPathName, accept, context); + resourceGroupName, privateCloudName, accept, context); } /** @@ -350,15 +340,14 @@ private Mono> getWithResponseAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, String iscsiPathName) { - return getWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName) + private Mono getAsync(String resourceGroupName, String privateCloudName) { + return getWithResponseAsync(resourceGroupName, privateCloudName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -367,7 +356,6 @@ private Mono getAsync(String resourceGroupName, String privateCl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -376,8 +364,8 @@ private Mono getAsync(String resourceGroupName, String privateCl */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String privateCloudName, - String iscsiPathName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, context).block(); + Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** @@ -385,15 +373,14 @@ public Response getWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IscsiPathInner get(String resourceGroupName, String privateCloudName, String iscsiPathName) { - return getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE).getValue(); + public IscsiPathInner get(String resourceGroupName, String privateCloudName) { + return getWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } /** @@ -401,7 +388,6 @@ public IscsiPathInner get(String resourceGroupName, String privateCloudName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -410,7 +396,7 @@ public IscsiPathInner get(String resourceGroupName, String privateCloudName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String privateCloudName, String iscsiPathName, IscsiPathInner resource) { + String privateCloudName, IscsiPathInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -427,9 +413,6 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (iscsiPathName == null) { - return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); - } if (resource == null) { return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { @@ -438,8 +421,7 @@ private Mono>> createOrUpdateWithResponseAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, resource, - context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -448,7 +430,6 @@ private Mono>> createOrUpdateWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -458,7 +439,7 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context) { + String privateCloudName, IscsiPathInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -475,9 +456,6 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (iscsiPathName == null) { - return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); - } if (resource == null) { return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { @@ -486,8 +464,7 @@ private Mono>> createOrUpdateWithResponseAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, resource, - context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, resource, context); } /** @@ -495,7 +472,6 @@ private Mono>> createOrUpdateWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -504,9 +480,9 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiPathInner> beginCreateOrUpdateAsync(String resourceGroupName, - String privateCloudName, String iscsiPathName, IscsiPathInner resource) { + String privateCloudName, IscsiPathInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, resource); + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), IscsiPathInner.class, IscsiPathInner.class, this.client.getContext()); } @@ -516,7 +492,6 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -526,10 +501,10 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiPathInner> beginCreateOrUpdateAsync(String resourceGroupName, - String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context) { + String privateCloudName, IscsiPathInner resource, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context); + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, resource, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), IscsiPathInner.class, IscsiPathInner.class, context); } @@ -539,7 +514,6 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -548,9 +522,8 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, String iscsiPathName, IscsiPathInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource) - .getSyncPoller(); + String privateCloudName, IscsiPathInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource).getSyncPoller(); } /** @@ -558,7 +531,6 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -568,9 +540,8 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context) - .getSyncPoller(); + String privateCloudName, IscsiPathInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).getSyncPoller(); } /** @@ -578,7 +549,6 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -587,8 +557,8 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, - String iscsiPathName, IscsiPathInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource).last() + IscsiPathInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -597,7 +567,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -607,8 +576,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, - String iscsiPathName, IscsiPathInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context).last() + IscsiPathInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -617,7 +586,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -625,9 +593,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, - IscsiPathInner resource) { - return createOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource).block(); + public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, resource).block(); } /** @@ -635,7 +602,6 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -644,9 +610,9 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, - IscsiPathInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context).block(); + public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).block(); } /** @@ -654,15 +620,14 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 iscsiPathName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -679,13 +644,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (iscsiPathName == null) { - return Mono.error(new IllegalArgumentException("Parameter iscsiPathName 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, iscsiPathName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -694,7 +656,6 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -703,7 +664,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, - String iscsiPathName, Context context) { + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -720,13 +681,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (iscsiPathName == null) { - return Mono.error(new IllegalArgumentException("Parameter iscsiPathName 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, iscsiPathName, accept, context); + resourceGroupName, privateCloudName, accept, context); } /** @@ -734,17 +692,14 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 iscsiPathName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -754,7 +709,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -763,10 +717,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, - String iscsiPathName, Context context) { + Context context) { context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -776,16 +729,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 iscsiPathName) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName).getSyncPoller(); } /** @@ -793,7 +744,6 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -802,8 +752,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, - String iscsiPathName, Context context) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName, context).getSyncPoller(); + Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); } /** @@ -811,15 +761,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 iscsiPathName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName).last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName) { + return beginDeleteAsync(resourceGroupName, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -828,7 +777,6 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -836,9 +784,8 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateCloudName, String iscsiPathName, - Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName, context).last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -847,14 +794,13 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 iscsiPathName) { - deleteAsync(resourceGroupName, privateCloudName, iscsiPathName).block(); + public void delete(String resourceGroupName, String privateCloudName) { + deleteAsync(resourceGroupName, privateCloudName).block(); } /** @@ -862,15 +808,14 @@ public void delete(String resourceGroupName, String privateCloudName, String isc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 iscsiPathName, Context context) { - deleteAsync(resourceGroupName, privateCloudName, iscsiPathName, context).block(); + public void delete(String resourceGroupName, String privateCloudName, Context context) { + deleteAsync(resourceGroupName, privateCloudName, context).block(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java index 4ea5e6c7b4b61..09bdc6a51539d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java @@ -39,10 +39,9 @@ public PagedIterable listByPrivateCloud(String resourceGroupName, Str return ResourceManagerUtils.mapPage(inner, inner1 -> new IscsiPathImpl(inner1, this.manager())); } - public Response getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName, - Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, Context context) { Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, context); + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new IscsiPathImpl(inner.getValue(), this.manager())); @@ -51,8 +50,8 @@ public Response getWithResponse(String resourceGroupName, String priv } } - public IscsiPath get(String resourceGroupName, String privateCloudName, String iscsiPathName) { - IscsiPathInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, iscsiPathName); + public IscsiPath get(String resourceGroupName, String privateCloudName) { + IscsiPathInner inner = this.serviceClient().get(resourceGroupName, privateCloudName); if (inner != null) { return new IscsiPathImpl(inner, this.manager()); } else { @@ -60,88 +59,32 @@ public IscsiPath get(String resourceGroupName, String privateCloudName, String i } } - public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName) { - this.serviceClient().delete(resourceGroupName, privateCloudName, iscsiPathName); - } - - public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context) { - this.serviceClient().delete(resourceGroupName, privateCloudName, iscsiPathName, context); - } - - public IscsiPath 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); - if (iscsiPathName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + public IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource) { + IscsiPathInner inner = this.serviceClient().createOrUpdate(resourceGroupName, privateCloudName, resource); + if (inner != null) { + return new IscsiPathImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); - if (iscsiPathName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + public IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context) { + IscsiPathInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, privateCloudName, resource, context); + if (inner != null) { + return new IscsiPathImpl(inner, this.manager()); + } else { + return null; } - return this.getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); - if (iscsiPathName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); - } - this.delete(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE); + public void deleteByResourceGroup(String resourceGroupName, String privateCloudName) { + this.serviceClient().delete(resourceGroupName, privateCloudName); } - 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); - if (iscsiPathName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); - } - this.delete(resourceGroupName, privateCloudName, iscsiPathName, context); + public void delete(String resourceGroupName, String privateCloudName, Context context) { + this.serviceClient().delete(resourceGroupName, privateCloudName, context); } private IscsiPathsClient serviceClient() { @@ -151,8 +94,4 @@ private IscsiPathsClient serviceClient() { private com.azure.resourcemanager.avs.AvsManager manager() { return this.serviceManager; } - - public IscsiPathImpl define(String name) { - return new IscsiPathImpl(name, this.manager()); - } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java index 7492fa79aaf55..28f575fd53fde 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java @@ -40,25 +40,25 @@ public final class LocationsClientImpl implements LocationsClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of LocationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LocationsClientImpl(AvsClientImpl client) { + LocationsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientLocations to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientLocations to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientLocations") + @ServiceInterface(name = "AVSClientLocations") public interface LocationsService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java index c48bdb504b5f3..c2f18313f3fea 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java @@ -42,25 +42,25 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AvsClientImpl client) { + OperationsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientOperations to be used by the proxy service to perform REST + * The interface defining all the services for AVSClientOperations to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientOperations") + @ServiceInterface(name = "AVSClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AVS/operations") 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 8518d9a16dc01..df7b4ef14bb39 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 @@ -52,25 +52,25 @@ public final class PlacementPoliciesClientImpl implements PlacementPoliciesClien /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of PlacementPoliciesClientImpl. * * @param client the instance of the service client containing this operation class. */ - PlacementPoliciesClientImpl(AvsClientImpl client) { + PlacementPoliciesClientImpl(AVSClientImpl client) { this.service = RestProxy.create(PlacementPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientPlacementPolicies to be used by the proxy service to perform + * The interface defining all the services for AVSClientPlacementPolicies to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientPlacementPo") + @ServiceInterface(name = "AVSClientPlacementPo") public interface PlacementPoliciesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies") 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 436c9285d38d5..4b4c2e01fd346 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 @@ -54,25 +54,25 @@ public final class PrivateCloudsClientImpl implements PrivateCloudsClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of PrivateCloudsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateCloudsClientImpl(AvsClientImpl client) { + PrivateCloudsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(PrivateCloudsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientPrivateClouds to be used by the proxy service to perform + * The interface defining all the services for AVSClientPrivateClouds to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientPrivateClou") + @ServiceInterface(name = "AVSClientPrivateClou") public interface PrivateCloudsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java index 1b612936bcf0a..e62ed3d40d743 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java @@ -42,25 +42,25 @@ public final class ScriptCmdletsClientImpl implements ScriptCmdletsClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of ScriptCmdletsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ScriptCmdletsClientImpl(AvsClientImpl client) { + ScriptCmdletsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(ScriptCmdletsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientScriptCmdlets to be used by the proxy service to perform + * The interface defining all the services for AVSClientScriptCmdlets to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientScriptCmdle") + @ServiceInterface(name = "AVSClientScriptCmdle") public interface ScriptCmdletsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java index 7ebf69bdc28e3..09dc22e925027 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java @@ -53,25 +53,25 @@ public final class ScriptExecutionsClientImpl implements ScriptExecutionsClient /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of ScriptExecutionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ScriptExecutionsClientImpl(AvsClientImpl client) { + ScriptExecutionsClientImpl(AVSClientImpl client) { this.service = RestProxy.create(ScriptExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientScriptExecutions to be used by the proxy service to perform + * The interface defining all the services for AVSClientScriptExecutions to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientScriptExecu") + @ServiceInterface(name = "AVSClientScriptExecu") public interface ScriptExecutionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java index 6f7196cadc8ee..7c5d8b6bfcf72 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java @@ -42,25 +42,25 @@ public final class ScriptPackagesClientImpl implements ScriptPackagesClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of ScriptPackagesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ScriptPackagesClientImpl(AvsClientImpl client) { + ScriptPackagesClientImpl(AVSClientImpl client) { this.service = RestProxy.create(ScriptPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientScriptPackages to be used by the proxy service to perform + * The interface defining all the services for AVSClientScriptPackages to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientScriptPacka") + @ServiceInterface(name = "AVSClientScriptPacka") public interface ScriptPackagesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages") 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 e66ab15ab59f0..6f6ba090acab2 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 @@ -50,25 +50,25 @@ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of VirtualMachinesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualMachinesClientImpl(AvsClientImpl client) { + VirtualMachinesClientImpl(AVSClientImpl client) { this.service = RestProxy.create(VirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientVirtualMachines to be used by the proxy service to perform + * The interface defining all the services for AVSClientVirtualMachines to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientVirtualMach") + @ServiceInterface(name = "AVSClientVirtualMach") public interface VirtualMachinesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java index bd50b77cd1ce3..2dee211ffa292 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java @@ -52,30 +52,25 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; - private String workloadNetworkName; - private String dhcpId; - public WorkloadNetworkDhcpImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public WorkloadNetworkDhcpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; - this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkDhcp create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), - Context.NONE); + .createDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDhcp create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), context); + .createDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); return this; } @@ -92,15 +87,14 @@ public WorkloadNetworkDhcpImpl update() { public WorkloadNetworkDhcp apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), - Context.NONE); + .updateDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDhcp apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), context); + .updateDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); return this; } @@ -110,7 +104,6 @@ public WorkloadNetworkDhcp apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.dhcpId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dhcpConfigurations"); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java index 0ed5214d08bdb..9bf2e56e5390c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java @@ -89,31 +89,25 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; - private String workloadNetworkName; - private String dnsServiceId; - public WorkloadNetworkDnsServiceImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public WorkloadNetworkDnsServiceImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; - this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkDnsService create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), - Context.NONE); + .createDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsService create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), - context); + .createDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); return this; } @@ -130,16 +124,14 @@ public WorkloadNetworkDnsServiceImpl update() { public WorkloadNetworkDnsService apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), - Context.NONE); + .updateDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsService apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), - context); + .updateDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); return this; } @@ -149,15 +141,13 @@ public WorkloadNetworkDnsService apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.dnsServiceId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsServices"); } public WorkloadNetworkDnsService refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - Context.NONE) + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) .getValue(); return this; } @@ -165,7 +155,7 @@ public WorkloadNetworkDnsService refresh() { public WorkloadNetworkDnsService refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, context) + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java index 68163d3050111..d645a8af6328d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java @@ -88,31 +88,25 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; - private String workloadNetworkName; - private String dnsZoneId; - public WorkloadNetworkDnsZoneImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public WorkloadNetworkDnsZoneImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; - this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkDnsZone create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), - Context.NONE); + .createDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsZone create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), - context); + .createDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); return this; } @@ -129,16 +123,14 @@ public WorkloadNetworkDnsZoneImpl update() { public WorkloadNetworkDnsZone apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), - Context.NONE); + .updateDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsZone apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), - context); + .updateDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); return this; } @@ -148,14 +140,13 @@ public WorkloadNetworkDnsZone apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.dnsZoneId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsZones"); } public WorkloadNetworkDnsZone refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, Context.NONE) + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE) .getValue(); return this; } @@ -163,7 +154,7 @@ public WorkloadNetworkDnsZone refresh() { public WorkloadNetworkDnsZone refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, context) + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java index b4b785887b02a..a3a8b7c97becc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java @@ -78,31 +78,26 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; - private String workloadNetworkName; - private String portMirroringId; - public WorkloadNetworkPortMirroringImpl withExistingWorkloadNetwork(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + public WorkloadNetworkPortMirroringImpl withExistingPrivateCloud(String resourceGroupName, + String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; - this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkPortMirroring create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - this.innerModel(), Context.NONE); + .createPortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPortMirroring create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - this.innerModel(), context); + .createPortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); return this; } @@ -119,16 +114,14 @@ public WorkloadNetworkPortMirroringImpl update() { public WorkloadNetworkPortMirroring apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updatePortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - this.innerModel(), Context.NONE); + .updatePortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPortMirroring apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updatePortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - this.innerModel(), context); + .updatePortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); return this; } @@ -138,15 +131,13 @@ public WorkloadNetworkPortMirroring apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.portMirroringId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "portMirroringProfiles"); } public WorkloadNetworkPortMirroring refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - Context.NONE) + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) .getValue(); return this; } @@ -154,8 +145,7 @@ public WorkloadNetworkPortMirroring refresh() { public WorkloadNetworkPortMirroring refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - context) + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java index 9259e9b739350..fbd68133928ab 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java @@ -65,31 +65,25 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; - private String workloadNetworkName; - private String publicIPId; - public WorkloadNetworkPublicIpImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public WorkloadNetworkPublicIpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; - this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkPublicIp create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createPublicIP(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, this.innerModel(), - Context.NONE); + .createPublicIP(resourceGroupName, privateCloudName, publicIPId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPublicIp create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createPublicIP(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, this.innerModel(), - context); + .createPublicIP(resourceGroupName, privateCloudName, publicIPId, this.innerModel(), context); return this; } @@ -102,7 +96,7 @@ public WorkloadNetworkPublicIp create(Context context) { public WorkloadNetworkPublicIp refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, Context.NONE) + .getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE) .getValue(); return this; } @@ -110,7 +104,7 @@ public WorkloadNetworkPublicIp refresh() { public WorkloadNetworkPublicIp refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, context) + .getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java index bc4b4883f6607..dc7abea2fa511 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java @@ -86,31 +86,25 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; - private String workloadNetworkName; - private String segmentId; - public WorkloadNetworkSegmentImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public WorkloadNetworkSegmentImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; - this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkSegment create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), - Context.NONE); + .createSegment(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkSegment create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), - context); + .createSegment(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); return this; } @@ -127,16 +121,14 @@ public WorkloadNetworkSegmentImpl update() { public WorkloadNetworkSegment apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), - Context.NONE); + .updateSegment(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkSegment apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), - context); + .updateSegment(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); return this; } @@ -146,14 +138,13 @@ public WorkloadNetworkSegment apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.segmentId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "segments"); } public WorkloadNetworkSegment refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE) + .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE) .getValue(); return this; } @@ -161,7 +152,7 @@ public WorkloadNetworkSegment refresh() { public WorkloadNetworkSegment refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) + .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java index ab9f001dd137c..d91f01e0480c4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java @@ -76,31 +76,25 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; - private String workloadNetworkName; - private String vmGroupId; - public WorkloadNetworkVMGroupImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public WorkloadNetworkVMGroupImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; - this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkVMGroup create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), - Context.NONE); + .createVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkVMGroup create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), - context); + .createVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); return this; } @@ -117,16 +111,14 @@ public WorkloadNetworkVMGroupImpl update() { public WorkloadNetworkVMGroup apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), - Context.NONE); + .updateVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkVMGroup apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), - context); + .updateVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); return this; } @@ -136,14 +128,13 @@ public WorkloadNetworkVMGroup apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.vmGroupId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vmGroups"); } public WorkloadNetworkVMGroup refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, Context.NONE) + .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE) .getValue(); return this; } @@ -151,7 +142,7 @@ public WorkloadNetworkVMGroup refresh() { public WorkloadNetworkVMGroup refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, context) + .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context) .getValue(); return this; } 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 d8c3a31730c20..5244dab20d126 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 @@ -69,117 +69,110 @@ public final class WorkloadNetworksClientImpl implements WorkloadNetworksClient /** * The service client containing this operation class. */ - private final AvsClientImpl client; + private final AVSClientImpl client; /** * Initializes an instance of WorkloadNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworksClientImpl(AvsClientImpl client) { + WorkloadNetworksClientImpl(AVSClientImpl client) { this.service = RestProxy.create(WorkloadNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientWorkloadNetworks to be used by the proxy service to perform + * The interface defining all the services for AVSClientWorkloadNetworks to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AvsClientWorkloadNet") + @ServiceInterface(name = "AVSClientWorkloadNet") public interface WorkloadNetworksService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("endpoint") 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}/workloadNetworks/{workloadNetworkName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSegments(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getSegment(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createSegment(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateSegment(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkSegmentInner properties, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteSegment(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDhcp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{dhcpId}/{privateCloudName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDhcp(@HostParam("endpoint") String endpoint, @@ -189,113 +182,104 @@ Mono> getDhcp(@HostParam("endpoint") String e Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createDhcp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dhcpId") String dhcpId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateDhcp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dhcpId") String dhcpId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteDhcp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dhcpId") String dhcpId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/gateways") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listGateways(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/gateways/{gatewayId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getGateway(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("gatewayId") String gatewayId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("gatewayId") String gatewayId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listPortMirroring(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getPortMirroring(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createPortMirroring(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updatePortMirroring(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{portMirroringId}/{privateCloudName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deletePortMirroring(@HostParam("endpoint") String endpoint, @@ -306,53 +290,49 @@ Mono>> deletePortMirroring(@HostParam("endpoint") Stri Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listVMGroups(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getVMGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("vmGroupId") String vmGroupId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createVMGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("vmGroupId") String vmGroupId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkVMGroupInner resource, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateVMGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("vmGroupId") String vmGroupId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{vmGroupId}/{privateCloudName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteVMGroup(@HostParam("endpoint") String endpoint, @@ -362,76 +342,70 @@ Mono>> deleteVMGroup(@HostParam("endpoint") String end Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/virtualMachines") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listVirtualMachines(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/virtualMachines/{virtualMachineId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getVirtualMachine(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("virtualMachineId") String virtualMachineId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDnsServices(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDnsService(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, - @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createDnsService(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, - @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, + @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateDnsService(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, - @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, + @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{dnsServiceId}/{privateCloudName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteDnsService(@HostParam("endpoint") String endpoint, @@ -441,53 +415,49 @@ Mono>> deleteDnsService(@HostParam("endpoint") String Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDnsZones(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDnsZone(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dnsZoneId") String dnsZoneId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createDnsZone(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dnsZoneId") String dnsZoneId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateDnsZone(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dnsZoneId") String dnsZoneId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{dnsZoneId}/{privateCloudName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteDnsZone(@HostParam("endpoint") String endpoint, @@ -497,41 +467,38 @@ Mono>> deleteDnsZone(@HostParam("endpoint") String end Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listPublicIPs(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs/{publicIPId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getPublicIP(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("publicIPId") String publicIPId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIPId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs/{publicIPId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createPublicIP(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("publicIPId") String publicIPId, + @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIPId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{publicIPId}/{privateCloudName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deletePublicIP(@HostParam("endpoint") String endpoint, @@ -621,18 +588,17 @@ Mono> listPublicIPsNext( } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -652,15 +618,13 @@ private Mono> listSinglePageAsync(String res } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.get(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 WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. @@ -668,12 +632,11 @@ private Mono> listSinglePageAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -692,31 +655,28 @@ private Mono> listSinglePageAsync(String res } 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)); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. + * @return a WorkloadNetwork on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName) { + return getWithResponseAsync(resourceGroupName, privateCloudName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. @@ -724,28 +684,27 @@ private PagedFlux listAsync(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. + * @return a WorkloadNetwork along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + return getWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkInner get(String resourceGroupName, String privateCloudName) { + return getWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } /** @@ -753,32 +712,15 @@ public PagedIterable list(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); - } - - /** - * Get a WorkloadNetwork. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -795,31 +737,30 @@ private Mono> getWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, context)) + 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())); } /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -836,66 +777,79 @@ private Mono> getWithResponseAsync(String resourc return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, workloadNetworkName, accept, 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)); } /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkInner get(String resourceGroupName, String privateCloudName, String workloadNetworkName) { - return getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); } /** @@ -903,7 +857,6 @@ public WorkloadNetworkInner get(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 workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -912,7 +865,7 @@ public WorkloadNetworkInner get(String resourceGroupName, String privateCloudNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSegmentsSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -929,15 +882,10 @@ private Mono> listSegmentsSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listSegments(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, - context)) + 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())); @@ -948,7 +896,6 @@ private Mono> listSegmentsSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -958,7 +905,7 @@ private Mono> listSegmentsSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSegmentsSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -975,15 +922,11 @@ private Mono> listSegmentsSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listSegments(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + resourceGroupName, privateCloudName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -993,17 +936,15 @@ private Mono> listSegmentsSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSegmentsAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedFlux<>( - () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + private PagedFlux listSegmentsAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listSegmentsNextSinglePageAsync(nextLink)); } @@ -1012,7 +953,6 @@ private PagedFlux listSegmentsAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1021,9 +961,8 @@ private PagedFlux listSegmentsAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSegmentsAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedFlux<>( - () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + Context context) { + return new PagedFlux<>(() -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listSegmentsNextSinglePageAsync(nextLink, context)); } @@ -1032,16 +971,14 @@ private PagedFlux listSegmentsAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSegments(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName)); } /** @@ -1049,7 +986,6 @@ public PagedIterable listSegments(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1058,9 +994,8 @@ public PagedIterable listSegments(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSegments(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedIterable<>( - listSegmentsAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + Context context) { + return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName, context)); } /** @@ -1068,7 +1003,6 @@ public PagedIterable listSegments(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1077,7 +1011,7 @@ public PagedIterable listSegments(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId) { + String privateCloudName, String segmentId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1094,18 +1028,13 @@ private Mono> getSegmentWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1114,7 +1043,6 @@ private Mono> getSegmentWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1124,7 +1052,7 @@ private Mono> getSegmentWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId, Context context) { + String privateCloudName, String segmentId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1141,18 +1069,13 @@ private Mono> getSegmentWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context); } /** @@ -1160,7 +1083,6 @@ private Mono> getSegmentWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1169,8 +1091,8 @@ private Mono> getSegmentWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getSegmentAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId) { - return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId) + String segmentId) { + return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1179,7 +1101,6 @@ private Mono getSegmentAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1189,9 +1110,8 @@ private Mono getSegmentAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getSegmentWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId, Context context) { - return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) - .block(); + String privateCloudName, String segmentId, Context context) { + return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context).block(); } /** @@ -1199,7 +1119,6 @@ public Response getSegmentWithResponse(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1207,10 +1126,8 @@ public Response getSegmentWithResponse(String resou * @return a WorkloadNetworkSegment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId) { - return getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE) - .getValue(); + public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId) { + return getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); } /** @@ -1218,7 +1135,6 @@ public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1228,8 +1144,7 @@ public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String p */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { + String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1246,10 +1161,6 @@ private Mono>> createSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } @@ -1262,8 +1173,8 @@ private Mono>> createSegmentWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.createSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - accept, workloadNetworkSegment, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, + workloadNetworkSegment, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1272,7 +1183,6 @@ private Mono>> createSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1283,8 +1193,8 @@ private Mono>> createSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1301,10 +1211,6 @@ private Mono>> createSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } @@ -1317,8 +1223,8 @@ private Mono>> createSegmentWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.createSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - accept, workloadNetworkSegment, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, + workloadNetworkSegment, context); } /** @@ -1326,7 +1232,6 @@ private Mono>> createSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1336,10 +1241,10 @@ private Mono>> createSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - Mono>> mono = createSegmentWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, segmentId, workloadNetworkSegment); + Mono>> mono + = createSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, this.client.getContext()); @@ -1350,7 +1255,6 @@ private PollerFlux, WorkloadNetworkSegme * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1361,11 +1265,11 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { context = this.client.mergeContext(context); Mono>> mono = createSegmentWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, segmentId, workloadNetworkSegment, context); + segmentId, workloadNetworkSegment, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, context); @@ -1376,7 +1280,6 @@ private PollerFlux, WorkloadNetworkSegme * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1386,11 +1289,9 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - return this - .beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - workloadNetworkSegment) + return this.beginCreateSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) .getSyncPoller(); } @@ -1399,7 +1300,6 @@ public SyncPoller, WorkloadNetworkSegmen * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1410,11 +1310,10 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { return this - .beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - workloadNetworkSegment, context) + .beginCreateSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) .getSyncPoller(); } @@ -1423,7 +1322,6 @@ public SyncPoller, WorkloadNetworkSegmen * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1433,9 +1331,9 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createSegmentAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - return beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - workloadNetworkSegment).last().flatMap(this.client::getLroFinalResultOrError); + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + return beginCreateSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1443,7 +1341,6 @@ private Mono createSegmentAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1454,10 +1351,10 @@ private Mono createSegmentAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createSegmentAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - workloadNetworkSegment, context).last().flatMap(this.client::getLroFinalResultOrError); + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + return beginCreateSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1465,7 +1362,6 @@ private Mono createSegmentAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1475,9 +1371,8 @@ private Mono createSegmentAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - return createSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - workloadNetworkSegment).block(); + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + return createSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); } /** @@ -1485,7 +1380,6 @@ public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1496,10 +1390,9 @@ public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return createSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - workloadNetworkSegment, context).block(); + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + return createSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + .block(); } /** @@ -1507,7 +1400,6 @@ public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1517,7 +1409,7 @@ public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties) { + String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1534,10 +1426,6 @@ private Mono>> updateSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } @@ -1549,8 +1437,8 @@ private Mono>> updateSegmentWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - accept, properties, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, properties, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1559,7 +1447,6 @@ private Mono>> updateSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1570,8 +1457,7 @@ private Mono>> updateSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, - Context context) { + String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1588,10 +1474,6 @@ private Mono>> updateSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } @@ -1603,8 +1485,8 @@ private Mono>> updateSegmentWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - accept, properties, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, properties, + context); } /** @@ -1612,7 +1494,6 @@ private Mono>> updateSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1622,10 +1503,9 @@ private Mono>> updateSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, - WorkloadNetworkSegmentInner properties) { - Mono>> mono = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, segmentId, properties); + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { + Mono>> mono + = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, this.client.getContext()); @@ -1636,7 +1516,6 @@ private PollerFlux, WorkloadNetworkSegme * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1647,11 +1526,11 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, - WorkloadNetworkSegmentInner properties, Context context) { + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, segmentId, properties, context); + Mono>> mono + = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, properties, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, context); @@ -1662,7 +1541,6 @@ private PollerFlux, WorkloadNetworkSegme * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1672,11 +1550,8 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, - WorkloadNetworkSegmentInner properties) { - return this - .beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties) - .getSyncPoller(); + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { + return this.beginUpdateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties).getSyncPoller(); } /** @@ -1684,7 +1559,6 @@ public SyncPoller, WorkloadNetworkSegmen * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1695,11 +1569,9 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, - WorkloadNetworkSegmentInner properties, Context context) { - return this - .beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties, - context) + String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, + Context context) { + return this.beginUpdateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties, context) .getSyncPoller(); } @@ -1708,7 +1580,6 @@ public SyncPoller, WorkloadNetworkSegmen * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1718,9 +1589,8 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateSegmentAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties) { - return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties) - .last() + String segmentId, WorkloadNetworkSegmentInner properties) { + return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1729,7 +1599,6 @@ private Mono updateSegmentAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1740,9 +1609,9 @@ private Mono updateSegmentAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateSegmentAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { - return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties, - context).last().flatMap(this.client::getLroFinalResultOrError); + String segmentId, WorkloadNetworkSegmentInner properties, Context context) { + return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1750,7 +1619,6 @@ private Mono updateSegmentAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1760,9 +1628,8 @@ private Mono updateSegmentAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties) { - return updateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties) - .block(); + String segmentId, WorkloadNetworkSegmentInner properties) { + return updateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties).block(); } /** @@ -1770,7 +1637,6 @@ public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1781,9 +1647,8 @@ public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { - return updateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties, - context).block(); + String segmentId, WorkloadNetworkSegmentInner properties, Context context) { + return updateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties, context).block(); } /** @@ -1791,7 +1656,6 @@ public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1800,7 +1664,7 @@ public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId) { + String privateCloudName, String segmentId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1817,18 +1681,13 @@ private Mono>> deleteSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1837,7 +1696,6 @@ private Mono>> deleteSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1847,7 +1705,7 @@ private Mono>> deleteSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId, Context context) { + String privateCloudName, String segmentId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1864,18 +1722,13 @@ private Mono>> deleteSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context); } /** @@ -1883,7 +1736,6 @@ private Mono>> deleteSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1892,9 +1744,9 @@ private Mono>> deleteSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId) { + String privateCloudName, String segmentId) { Mono>> mono - = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId); + = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -1904,7 +1756,6 @@ private PollerFlux, Void> beginDeleteSegmentAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1914,10 +1765,10 @@ private PollerFlux, Void> beginDeleteSegmentAsync(String resour */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String segmentId, Context context) { + String privateCloudName, String segmentId, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, segmentId, context); + Mono>> mono + = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -1927,7 +1778,6 @@ private PollerFlux, Void> beginDeleteSegmentAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1936,9 +1786,8 @@ private PollerFlux, Void> beginDeleteSegmentAsync(String resour */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId) { - return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId) - .getSyncPoller(); + String segmentId) { + return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).getSyncPoller(); } /** @@ -1946,7 +1795,6 @@ public SyncPoller, Void> beginDeleteSegment(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1956,10 +1804,8 @@ public SyncPoller, Void> beginDeleteSegment(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, Context context) { - return this - .beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) - .getSyncPoller(); + String segmentId, Context context) { + return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).getSyncPoller(); } /** @@ -1967,7 +1813,6 @@ public SyncPoller, Void> beginDeleteSegment(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1975,9 +1820,8 @@ public SyncPoller, Void> beginDeleteSegment(String resourceGrou * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String segmentId) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId).last() + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1986,7 +1830,6 @@ private Mono deleteSegmentAsync(String resourceGroupName, String privateCl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1995,10 +1838,9 @@ private Mono deleteSegmentAsync(String resourceGroupName, String privateCl * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String segmentId, Context context) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) - .last() + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, + Context context) { + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2007,16 +1849,14 @@ private Mono deleteSegmentAsync(String resourceGroupName, String privateCl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String segmentId) { - deleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId).block(); + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { + deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).block(); } /** @@ -2024,7 +1864,6 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2032,9 +1871,8 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String segmentId, Context context) { - deleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context).block(); + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { + deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).block(); } /** @@ -2042,7 +1880,6 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2051,7 +1888,7 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDhcpSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2068,13 +1905,10 @@ private Mono> listDhcpSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, context)) + return FluxUtil + .withContext(context -> service.listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -2085,7 +1919,6 @@ private Mono> listDhcpSinglePageAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2095,7 +1928,7 @@ private Mono> listDhcpSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDhcpSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2112,15 +1945,11 @@ private Mono> listDhcpSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + resourceGroupName, privateCloudName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2130,16 +1959,14 @@ private Mono> listDhcpSinglePageAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedFlux<>(() -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listDhcpNextSinglePageAsync(nextLink)); } @@ -2148,7 +1975,6 @@ private PagedFlux listDhcpAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2157,9 +1983,8 @@ private PagedFlux listDhcpAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedFlux<>( - () -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + Context context) { + return new PagedFlux<>(() -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listDhcpNextSinglePageAsync(nextLink, context)); } @@ -2168,16 +1993,14 @@ private PagedFlux listDhcpAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName)); } /** @@ -2185,7 +2008,6 @@ public PagedIterable listDhcp(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2194,8 +2016,8 @@ public PagedIterable listDhcp(String resourceGroupName */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + Context context) { + return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, context)); } /** @@ -2335,7 +2157,6 @@ public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2345,8 +2166,7 @@ public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2363,10 +2183,6 @@ private Mono>> createDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } @@ -2379,8 +2195,8 @@ private Mono>> createDhcpWithResponseAsync(String reso final String accept = "application/json"; return FluxUtil .withContext(context -> service.createDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, - accept, workloadNetworkDhcp, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, + workloadNetworkDhcp, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2389,7 +2205,6 @@ private Mono>> createDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2400,8 +2215,7 @@ private Mono>> createDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2418,10 +2232,6 @@ private Mono>> createDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } @@ -2434,8 +2244,8 @@ private Mono>> createDhcpWithResponseAsync(String reso final String accept = "application/json"; context = this.client.mergeContext(context); return service.createDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, accept, - workloadNetworkDhcp, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, workloadNetworkDhcp, + context); } /** @@ -2443,7 +2253,6 @@ private Mono>> createDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2453,10 +2262,10 @@ private Mono>> createDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dhcpId, workloadNetworkDhcp); + Mono>> mono + = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, this.client.getContext()); @@ -2467,7 +2276,6 @@ private PollerFlux, WorkloadNetworkDhcpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2478,11 +2286,11 @@ private PollerFlux, WorkloadNetworkDhcpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dhcpId, workloadNetworkDhcp, context); + Mono>> mono + = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); } @@ -2492,7 +2300,6 @@ private PollerFlux, WorkloadNetworkDhcpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2502,10 +2309,9 @@ private PollerFlux, WorkloadNetworkDhcpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return this - .beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) + return this.beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) .getSyncPoller(); } @@ -2514,7 +2320,6 @@ public SyncPoller, WorkloadNetworkDhcpInner * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2525,11 +2330,9 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return this - .beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, - context) + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, + Context context) { + return this.beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) .getSyncPoller(); } @@ -2538,7 +2341,6 @@ public SyncPoller, WorkloadNetworkDhcpInner * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2548,9 +2350,9 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDhcpAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, - workloadNetworkDhcp).last().flatMap(this.client::getLroFinalResultOrError); + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2558,7 +2360,6 @@ private Mono createDhcpAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2569,9 +2370,9 @@ private Mono createDhcpAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDhcpAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, - workloadNetworkDhcp, context).last().flatMap(this.client::getLroFinalResultOrError); + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2579,7 +2380,6 @@ private Mono createDhcpAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2588,10 +2388,9 @@ private Mono createDhcpAsync(String resourceGroupName, * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return createDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) - .block(); + public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); } /** @@ -2599,7 +2398,6 @@ public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String priv * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2609,10 +2407,9 @@ public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String priv * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return createDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, - context).block(); + public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); } /** @@ -2620,7 +2417,6 @@ public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String priv * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2630,8 +2426,7 @@ public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String priv */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2648,10 +2443,6 @@ private Mono>> updateDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } @@ -2664,8 +2455,8 @@ private Mono>> updateDhcpWithResponseAsync(String reso final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, - accept, workloadNetworkDhcp, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, + workloadNetworkDhcp, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2674,7 +2465,6 @@ private Mono>> updateDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2685,8 +2475,7 @@ private Mono>> updateDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2703,10 +2492,6 @@ private Mono>> updateDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } @@ -2719,8 +2504,8 @@ private Mono>> updateDhcpWithResponseAsync(String reso final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, accept, - workloadNetworkDhcp, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, workloadNetworkDhcp, + context); } /** @@ -2728,7 +2513,6 @@ private Mono>> updateDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2738,10 +2522,10 @@ private Mono>> updateDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dhcpId, workloadNetworkDhcp); + Mono>> mono + = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, this.client.getContext()); @@ -2752,7 +2536,6 @@ private PollerFlux, WorkloadNetworkDhcpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2763,11 +2546,11 @@ private PollerFlux, WorkloadNetworkDhcpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dhcpId, workloadNetworkDhcp, context); + Mono>> mono + = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); } @@ -2777,7 +2560,6 @@ private PollerFlux, WorkloadNetworkDhcpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2787,10 +2569,9 @@ private PollerFlux, WorkloadNetworkDhcpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return this - .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) + return this.beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) .getSyncPoller(); } @@ -2799,7 +2580,6 @@ public SyncPoller, WorkloadNetworkDhcpInner * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2810,11 +2590,9 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return this - .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, - context) + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, + Context context) { + return this.beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) .getSyncPoller(); } @@ -2823,7 +2601,6 @@ public SyncPoller, WorkloadNetworkDhcpInner * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2833,9 +2610,9 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDhcpAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, - workloadNetworkDhcp).last().flatMap(this.client::getLroFinalResultOrError); + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2843,7 +2620,6 @@ private Mono updateDhcpAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2854,9 +2630,9 @@ private Mono updateDhcpAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDhcpAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, - workloadNetworkDhcp, context).last().flatMap(this.client::getLroFinalResultOrError); + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -2864,7 +2640,6 @@ private Mono updateDhcpAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2873,10 +2648,9 @@ private Mono updateDhcpAsync(String resourceGroupName, * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return updateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) - .block(); + public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); } /** @@ -2884,7 +2658,6 @@ public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String priv * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2894,10 +2667,9 @@ public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String priv * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return updateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, - context).block(); + public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); } /** @@ -2905,7 +2677,6 @@ public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String priv * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2914,7 +2685,7 @@ public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String priv */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId) { + String privateCloudName, String dhcpId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2931,18 +2702,13 @@ private Mono>> deleteDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2951,7 +2717,6 @@ private Mono>> deleteDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2961,7 +2726,7 @@ private Mono>> deleteDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dhcpId, Context context) { + String privateCloudName, String dhcpId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2978,18 +2743,13 @@ private Mono>> deleteDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, accept, - context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, context); } /** @@ -2997,7 +2757,6 @@ private Mono>> deleteDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3006,9 +2765,9 @@ private Mono>> deleteDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId) { + String dhcpId) { Mono>> mono - = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId); + = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -3018,7 +2777,6 @@ private PollerFlux, Void> beginDeleteDhcpAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3028,10 +2786,10 @@ private PollerFlux, Void> beginDeleteDhcpAsync(String resourceG */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, Context context) { + String dhcpId, Context context) { context = this.client.mergeContext(context); Mono>> mono - = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context); + = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -3041,7 +2799,6 @@ private PollerFlux, Void> beginDeleteDhcpAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3050,9 +2807,8 @@ private PollerFlux, Void> beginDeleteDhcpAsync(String resourceG */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId) { - return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId) - .getSyncPoller(); + String dhcpId) { + return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).getSyncPoller(); } /** @@ -3060,7 +2816,6 @@ public SyncPoller, Void> beginDeleteDhcp(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3070,9 +2825,8 @@ public SyncPoller, Void> beginDeleteDhcp(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dhcpId, Context context) { - return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context) - .getSyncPoller(); + String dhcpId, Context context) { + return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).getSyncPoller(); } /** @@ -3080,7 +2834,6 @@ public SyncPoller, Void> beginDeleteDhcp(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3088,9 +2841,8 @@ public SyncPoller, Void> beginDeleteDhcp(String resourceGroupNa * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dhcpId) { - return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId).last() + private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId) { + return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -3099,7 +2851,6 @@ private Mono deleteDhcpAsync(String resourceGroupName, String privateCloud * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3108,9 +2859,9 @@ private Mono deleteDhcpAsync(String resourceGroupName, String privateCloud * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dhcpId, Context context) { - return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context).last() + private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, + Context context) { + return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -3119,16 +2870,14 @@ private Mono deleteDhcpAsync(String resourceGroupName, String privateCloud * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dhcpId) { - deleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId).block(); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { + deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).block(); } /** @@ -3136,7 +2885,6 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3144,9 +2892,8 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, - Context context) { - deleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context).block(); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { + deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).block(); } /** @@ -3154,7 +2901,6 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3163,7 +2909,7 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listGatewaysSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3180,15 +2926,10 @@ private Mono> listGatewaysSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listGateways(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, - context)) + 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())); @@ -3199,7 +2940,6 @@ private Mono> listGatewaysSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3209,7 +2949,7 @@ private Mono> listGatewaysSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listGatewaysSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3226,15 +2966,11 @@ private Mono> listGatewaysSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listGateways(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + resourceGroupName, privateCloudName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -3244,17 +2980,15 @@ private Mono> listGatewaysSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGatewaysAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedFlux<>( - () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + private PagedFlux listGatewaysAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listGatewaysNextSinglePageAsync(nextLink)); } @@ -3263,7 +2997,6 @@ private PagedFlux listGatewaysAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3272,9 +3005,8 @@ private PagedFlux listGatewaysAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listGatewaysAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedFlux<>( - () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + Context context) { + return new PagedFlux<>(() -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listGatewaysNextSinglePageAsync(nextLink, context)); } @@ -3283,16 +3015,14 @@ private PagedFlux listGatewaysAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGateways(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName)); } /** @@ -3300,7 +3030,6 @@ public PagedIterable listGateways(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3309,9 +3038,8 @@ public PagedIterable listGateways(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listGateways(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedIterable<>( - listGatewaysAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + Context context) { + return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName, context)); } /** @@ -3319,7 +3047,6 @@ public PagedIterable listGateways(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3328,7 +3055,7 @@ public PagedIterable listGateways(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getGatewayWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String gatewayId) { + String privateCloudName, String gatewayId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3343,11 +3070,7 @@ private Mono> getGatewayWithResponseAsync( } if (privateCloudName == null) { return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } if (gatewayId == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); @@ -3355,8 +3078,7 @@ private Mono> getGatewayWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext(context -> service.getGateway(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, gatewayId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3365,7 +3087,6 @@ private Mono> getGatewayWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3375,7 +3096,7 @@ private Mono> getGatewayWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getGatewayWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String gatewayId, Context context) { + String privateCloudName, String gatewayId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3392,18 +3113,13 @@ private Mono> getGatewayWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (gatewayId == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getGateway(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, gatewayId, accept, context); } /** @@ -3411,7 +3127,6 @@ private Mono> getGatewayWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3420,8 +3135,8 @@ private Mono> getGatewayWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getGatewayAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String gatewayId) { - return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId) + String gatewayId) { + return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -3430,7 +3145,6 @@ private Mono getGatewayAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3440,9 +3154,8 @@ private Mono getGatewayAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getGatewayWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String gatewayId, Context context) { - return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, context) - .block(); + String privateCloudName, String gatewayId, Context context) { + return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId, context).block(); } /** @@ -3450,7 +3163,6 @@ public Response getGatewayWithResponse(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3458,10 +3170,8 @@ public Response getGatewayWithResponse(String resou * @return a WorkloadNetworkGateway. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String gatewayId) { - return getGatewayWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, Context.NONE) - .getValue(); + public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { + return getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, Context.NONE).getValue(); } /** @@ -3469,7 +3179,6 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3477,8 +3186,8 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringSinglePageAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName) { + private Mono> + listPortMirroringSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3495,15 +3204,10 @@ private Mono> listPortMirroring return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, - context)) + 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())); @@ -3514,7 +3218,6 @@ private Mono> listPortMirroring * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3523,8 +3226,8 @@ private Mono> listPortMirroring * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringSinglePageAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, Context context) { + private Mono> + listPortMirroringSinglePageAsync(String resourceGroupName, String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3541,15 +3244,11 @@ private Mono> listPortMirroring return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + resourceGroupName, privateCloudName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -3559,7 +3258,6 @@ private Mono> listPortMirroring * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3568,9 +3266,8 @@ private Mono> listPortMirroring */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPortMirroringAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { - return new PagedFlux<>( - () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + String privateCloudName) { + return new PagedFlux<>(() -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listPortMirroringNextSinglePageAsync(nextLink)); } @@ -3579,7 +3276,6 @@ private PagedFlux listPortMirroringAsync(Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3589,9 +3285,8 @@ private PagedFlux listPortMirroringAsync(Stri */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPortMirroringAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { - return new PagedFlux<>( - () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listPortMirroringNextSinglePageAsync(nextLink, context)); } @@ -3600,7 +3295,6 @@ private PagedFlux listPortMirroringAsync(Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3609,8 +3303,8 @@ private PagedFlux listPortMirroringAsync(Stri */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { - return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + String privateCloudName) { + return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName)); } /** @@ -3618,7 +3312,6 @@ public PagedIterable listPortMirroring(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3628,9 +3321,8 @@ public PagedIterable listPortMirroring(String */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { - return new PagedIterable<>( - listPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + String privateCloudName, Context context) { + return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName, context)); } /** @@ -3638,7 +3330,6 @@ public PagedIterable listPortMirroring(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3646,8 +3337,8 @@ public PagedIterable listPortMirroring(String * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPortMirroringWithResponseAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String portMirroringId) { + private Mono> + getPortMirroringWithResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3664,10 +3355,6 @@ private Mono> getPortMirroringWithRe return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3675,8 +3362,7 @@ private Mono> getPortMirroringWithRe final String accept = "application/json"; return FluxUtil .withContext(context -> service.getPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, - portMirroringId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3685,7 +3371,6 @@ private Mono> getPortMirroringWithRe * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3695,8 +3380,7 @@ private Mono> getPortMirroringWithRe */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getPortMirroringWithResponseAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String portMirroringId, - Context context) { + String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3713,10 +3397,6 @@ private Mono> getPortMirroringWithRe return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3724,8 +3404,7 @@ private Mono> getPortMirroringWithRe final String accept = "application/json"; context = this.client.mergeContext(context); return service.getPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, context); } /** @@ -3733,7 +3412,6 @@ private Mono> getPortMirroringWithRe * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3742,9 +3420,9 @@ private Mono> getPortMirroringWithRe */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getPortMirroringAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId) { - return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, - portMirroringId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + String privateCloudName, String portMirroringId) { + return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3752,7 +3430,6 @@ private Mono getPortMirroringAsync(String res * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3762,9 +3439,8 @@ private Mono getPortMirroringAsync(String res */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getPortMirroringWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, Context context) { - return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, - portMirroringId, context).block(); + String privateCloudName, String portMirroringId, Context context) { + return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, context).block(); } /** @@ -3772,7 +3448,6 @@ public Response getPortMirroringWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3781,9 +3456,9 @@ public Response getPortMirroringWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId) { - return getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - Context.NONE).getValue(); + String portMirroringId) { + return getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) + .getValue(); } /** @@ -3791,7 +3466,6 @@ public WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3801,7 +3475,7 @@ public WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPortMirroringWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3819,10 +3493,6 @@ private Mono>> createPortMirroringWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3836,8 +3506,8 @@ private Mono>> createPortMirroringWithResponseAsync(St final String accept = "application/json"; return FluxUtil .withContext(context -> service.createPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, - portMirroringId, accept, workloadNetworkPortMirroring, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, + workloadNetworkPortMirroring, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3846,7 +3516,6 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -3857,8 +3526,8 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPortMirroringWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3875,10 +3544,6 @@ private Mono>> createPortMirroringWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3892,8 +3557,8 @@ private Mono>> createPortMirroringWithResponseAsync(St final String accept = "application/json"; context = this.client.mergeContext(context); return service.createPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - accept, workloadNetworkPortMirroring, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, + workloadNetworkPortMirroring, context); } /** @@ -3901,7 +3566,6 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3911,10 +3575,10 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { Mono>> mono = createPortMirroringWithResponseAsync(resourceGroupName, - privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring); + privateCloudName, portMirroringId, workloadNetworkPortMirroring); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, this.client.getContext()); @@ -3925,7 +3589,6 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -3936,11 +3599,11 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { context = this.client.mergeContext(context); Mono>> mono = createPortMirroringWithResponseAsync(resourceGroupName, - privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context); + privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, context); @@ -3951,7 +3614,6 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3961,10 +3623,10 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { return this - .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) .getSyncPoller(); } @@ -3974,7 +3636,6 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -3985,10 +3646,10 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { return this - .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) .getSyncPoller(); } @@ -3998,7 +3659,6 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4008,9 +3668,9 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPortMirroringAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).last().flatMap(this.client::getLroFinalResultOrError); } @@ -4019,7 +3679,6 @@ private Mono createPortMirroringAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -4030,9 +3689,9 @@ private Mono createPortMirroringAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPortMirroringAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + Context context) { + return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context).last().flatMap(this.client::getLroFinalResultOrError); } @@ -4041,7 +3700,6 @@ private Mono createPortMirroringAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4051,9 +3709,8 @@ private Mono createPortMirroringAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return createPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return createPortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).block(); } @@ -4062,7 +3719,6 @@ public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -4073,9 +3729,8 @@ public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return createPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return createPortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context).block(); } @@ -4084,7 +3739,6 @@ public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4094,7 +3748,7 @@ public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updatePortMirroringWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -4112,10 +3766,6 @@ private Mono>> updatePortMirroringWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -4129,8 +3779,8 @@ private Mono>> updatePortMirroringWithResponseAsync(St final String accept = "application/json"; return FluxUtil .withContext(context -> service.updatePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, - portMirroringId, accept, workloadNetworkPortMirroring, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, + workloadNetworkPortMirroring, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -4139,7 +3789,6 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -4150,8 +3799,8 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updatePortMirroringWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4168,10 +3817,6 @@ private Mono>> updatePortMirroringWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -4185,8 +3830,8 @@ private Mono>> updatePortMirroringWithResponseAsync(St final String accept = "application/json"; context = this.client.mergeContext(context); return service.updatePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - accept, workloadNetworkPortMirroring, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, + workloadNetworkPortMirroring, context); } /** @@ -4194,7 +3839,6 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4204,10 +3848,10 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { Mono>> mono = updatePortMirroringWithResponseAsync(resourceGroupName, - privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring); + privateCloudName, portMirroringId, workloadNetworkPortMirroring); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, this.client.getContext()); @@ -4218,7 +3862,6 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -4229,11 +3872,11 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { context = this.client.mergeContext(context); Mono>> mono = updatePortMirroringWithResponseAsync(resourceGroupName, - privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context); + privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, context); @@ -4244,7 +3887,6 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4254,10 +3896,10 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { return this - .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) .getSyncPoller(); } @@ -4267,7 +3909,6 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -4278,10 +3919,10 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { return this - .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) .getSyncPoller(); } @@ -4291,7 +3932,6 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4301,9 +3941,9 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updatePortMirroringAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).last().flatMap(this.client::getLroFinalResultOrError); } @@ -4312,7 +3952,6 @@ private Mono updatePortMirroringAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -4323,9 +3962,9 @@ private Mono updatePortMirroringAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updatePortMirroringAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + Context context) { + return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context).last().flatMap(this.client::getLroFinalResultOrError); } @@ -4334,7 +3973,6 @@ private Mono updatePortMirroringAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4344,9 +3982,8 @@ private Mono updatePortMirroringAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return updatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return updatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring).block(); } @@ -4355,7 +3992,6 @@ public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -4366,9 +4002,8 @@ public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return updatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return updatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context).block(); } @@ -4606,7 +4241,6 @@ public void deletePortMirroring(String resourceGroupName, String portMirroringId * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4615,7 +4249,7 @@ public void deletePortMirroring(String resourceGroupName, String portMirroringId */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMGroupsSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4632,15 +4266,10 @@ private Mono> listVMGroupsSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVMGroups(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, - context)) + 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())); @@ -4651,7 +4280,6 @@ private Mono> listVMGroupsSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4661,7 +4289,7 @@ private Mono> listVMGroupsSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMGroupsSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4678,15 +4306,11 @@ private Mono> listVMGroupsSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listVMGroups(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + resourceGroupName, privateCloudName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -4696,17 +4320,15 @@ private Mono> listVMGroupsSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVMGroupsAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedFlux<>( - () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + private PagedFlux listVMGroupsAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listVMGroupsNextSinglePageAsync(nextLink)); } @@ -4715,7 +4337,6 @@ private PagedFlux listVMGroupsAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4724,9 +4345,8 @@ private PagedFlux listVMGroupsAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVMGroupsAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedFlux<>( - () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + Context context) { + return new PagedFlux<>(() -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listVMGroupsNextSinglePageAsync(nextLink, context)); } @@ -4735,16 +4355,14 @@ private PagedFlux listVMGroupsAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName)); } /** @@ -4752,7 +4370,6 @@ public PagedIterable listVMGroups(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4761,9 +4378,8 @@ public PagedIterable listVMGroups(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedIterable<>( - listVMGroupsAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + Context context) { + return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName, context)); } /** @@ -4771,7 +4387,6 @@ public PagedIterable listVMGroups(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4780,7 +4395,7 @@ public PagedIterable listVMGroups(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String vmGroupId) { + String privateCloudName, String vmGroupId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4797,18 +4412,13 @@ private Mono> getVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -4817,7 +4427,6 @@ private Mono> getVMGroupWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4827,7 +4436,7 @@ private Mono> getVMGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String vmGroupId, Context context) { + String privateCloudName, String vmGroupId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4844,18 +4453,13 @@ private Mono> getVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, context); } /** @@ -4863,7 +4467,6 @@ private Mono> getVMGroupWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4872,8 +4475,8 @@ private Mono> getVMGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getVMGroupAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId) { - return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId) + String vmGroupId) { + return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -4882,7 +4485,6 @@ private Mono getVMGroupAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4892,9 +4494,8 @@ private Mono getVMGroupAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getVMGroupWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String vmGroupId, Context context) { - return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, context) - .block(); + String privateCloudName, String vmGroupId, Context context) { + return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, context).block(); } /** @@ -4902,7 +4503,6 @@ public Response getVMGroupWithResponse(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4910,10 +4510,8 @@ public Response getVMGroupWithResponse(String resou * @return a WorkloadNetworkVMGroup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId) { - return getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, Context.NONE) - .getValue(); + public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { + return getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); } /** @@ -4921,7 +4519,6 @@ public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4931,7 +4528,7 @@ public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String p */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4948,10 +4545,6 @@ private Mono>> createVMGroupWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } @@ -4963,8 +4556,8 @@ private Mono>> createVMGroupWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.createVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - accept, resource, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, resource, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -4973,7 +4566,6 @@ private Mono>> createVMGroupWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -4984,8 +4576,7 @@ private Mono>> createVMGroupWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, - Context context) { + String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5002,10 +4593,6 @@ private Mono>> createVMGroupWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } @@ -5017,8 +4604,7 @@ private Mono>> createVMGroupWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.createVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - accept, resource, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, resource, context); } /** @@ -5026,7 +4612,6 @@ private Mono>> createVMGroupWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5036,10 +4621,9 @@ private Mono>> createVMGroupWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, - WorkloadNetworkVMGroupInner resource) { - Mono>> mono = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, vmGroupId, resource); + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + Mono>> mono + = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, this.client.getContext()); @@ -5050,7 +4634,6 @@ private PollerFlux, WorkloadNetworkVMGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -5061,11 +4644,11 @@ private PollerFlux, WorkloadNetworkVMGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, - WorkloadNetworkVMGroupInner resource, Context context) { + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, vmGroupId, resource, context); + Mono>> mono + = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, context); @@ -5076,7 +4659,6 @@ private PollerFlux, WorkloadNetworkVMGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5086,11 +4668,8 @@ private PollerFlux, WorkloadNetworkVMGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, - WorkloadNetworkVMGroupInner resource) { - return this - .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource) - .getSyncPoller(); + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + return this.beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource).getSyncPoller(); } /** @@ -5098,7 +4677,6 @@ public SyncPoller, WorkloadNetworkVMGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -5109,11 +4687,9 @@ public SyncPoller, WorkloadNetworkVMGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, - WorkloadNetworkVMGroupInner resource, Context context) { - return this - .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource, - context) + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, + Context context) { + return this.beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context) .getSyncPoller(); } @@ -5122,7 +4698,6 @@ public SyncPoller, WorkloadNetworkVMGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5132,9 +4707,8 @@ public SyncPoller, WorkloadNetworkVMGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createVMGroupAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { - return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource) - .last() + String vmGroupId, WorkloadNetworkVMGroupInner resource) { + return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -5143,7 +4717,6 @@ private Mono createVMGroupAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -5154,9 +4727,9 @@ private Mono createVMGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createVMGroupAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { - return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource, - context).last().flatMap(this.client::getLroFinalResultOrError); + String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { + return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5164,7 +4737,6 @@ private Mono createVMGroupAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5174,9 +4746,8 @@ private Mono createVMGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { - return createVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource) - .block(); + String vmGroupId, WorkloadNetworkVMGroupInner resource) { + return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource).block(); } /** @@ -5184,7 +4755,6 @@ public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -5195,9 +4765,8 @@ public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { - return createVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource, - context).block(); + String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { + return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).block(); } /** @@ -5205,7 +4774,6 @@ public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5215,8 +4783,7 @@ public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5233,10 +4800,6 @@ private Mono>> updateVMGroupWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } @@ -5249,8 +4812,8 @@ private Mono>> updateVMGroupWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - accept, workloadNetworkVMGroup, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, + workloadNetworkVMGroup, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -5259,7 +4822,6 @@ private Mono>> updateVMGroupWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -5270,8 +4832,8 @@ private Mono>> updateVMGroupWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5288,10 +4850,6 @@ private Mono>> updateVMGroupWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } @@ -5304,8 +4862,8 @@ private Mono>> updateVMGroupWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - accept, workloadNetworkVMGroup, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, + workloadNetworkVMGroup, context); } /** @@ -5313,7 +4871,6 @@ private Mono>> updateVMGroupWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5323,10 +4880,10 @@ private Mono>> updateVMGroupWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - Mono>> mono = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, vmGroupId, workloadNetworkVMGroup); + Mono>> mono + = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, this.client.getContext()); @@ -5337,7 +4894,6 @@ private PollerFlux, WorkloadNetworkVMGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -5348,11 +4904,11 @@ private PollerFlux, WorkloadNetworkVMGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, vmGroupId, workloadNetworkVMGroup, context); + vmGroupId, workloadNetworkVMGroup, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, context); @@ -5363,7 +4919,6 @@ private PollerFlux, WorkloadNetworkVMGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5373,11 +4928,9 @@ private PollerFlux, WorkloadNetworkVMGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return this - .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - workloadNetworkVMGroup) + return this.beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) .getSyncPoller(); } @@ -5386,7 +4939,6 @@ public SyncPoller, WorkloadNetworkVMGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -5397,11 +4949,10 @@ public SyncPoller, WorkloadNetworkVMGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { return this - .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - workloadNetworkVMGroup, context) + .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) .getSyncPoller(); } @@ -5410,7 +4961,6 @@ public SyncPoller, WorkloadNetworkVMGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5420,9 +4970,9 @@ public SyncPoller, WorkloadNetworkVMGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateVMGroupAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - workloadNetworkVMGroup).last().flatMap(this.client::getLroFinalResultOrError); + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5430,7 +4980,6 @@ private Mono updateVMGroupAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -5441,10 +4990,10 @@ private Mono updateVMGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateVMGroupAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - workloadNetworkVMGroup, context).last().flatMap(this.client::getLroFinalResultOrError); + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -5452,7 +5001,6 @@ private Mono updateVMGroupAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5462,9 +5010,8 @@ private Mono updateVMGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return updateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - workloadNetworkVMGroup).block(); + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); } /** @@ -5472,7 +5019,6 @@ public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -5483,10 +5029,9 @@ public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return updateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - workloadNetworkVMGroup, context).block(); + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) + .block(); } /** @@ -5718,7 +5263,6 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5726,8 +5270,8 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesSinglePageAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName) { + private Mono> + listVirtualMachinesSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5744,15 +5288,10 @@ private Mono> listVirtualMachi return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, - context)) + 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())); @@ -5763,7 +5302,6 @@ private Mono> listVirtualMachi * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5772,8 +5310,8 @@ private Mono> listVirtualMachi * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesSinglePageAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, Context context) { + private Mono> + listVirtualMachinesSinglePageAsync(String resourceGroupName, String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5790,14 +5328,11 @@ private Mono> listVirtualMachi return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + return service + .listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -5807,7 +5342,6 @@ private Mono> listVirtualMachi * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5816,9 +5350,8 @@ private Mono> listVirtualMachi */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVirtualMachinesAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { - return new PagedFlux<>( - () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + String privateCloudName) { + return new PagedFlux<>(() -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink)); } @@ -5827,7 +5360,6 @@ private PagedFlux listVirtualMachinesAsync(S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5837,9 +5369,8 @@ private PagedFlux listVirtualMachinesAsync(S */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVirtualMachinesAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { - return new PagedFlux<>( - () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink, context)); } @@ -5848,7 +5379,6 @@ private PagedFlux listVirtualMachinesAsync(S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5857,8 +5387,8 @@ private PagedFlux listVirtualMachinesAsync(S */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { - return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + String privateCloudName) { + return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName)); } /** @@ -5866,7 +5396,6 @@ public PagedIterable listVirtualMachines(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5876,9 +5405,8 @@ public PagedIterable listVirtualMachines(Str */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { - return new PagedIterable<>( - listVirtualMachinesAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + String privateCloudName, Context context) { + return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName, context)); } /** @@ -5886,7 +5414,6 @@ public PagedIterable listVirtualMachines(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5894,8 +5421,8 @@ public PagedIterable listVirtualMachines(Str * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVirtualMachineWithResponseAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String virtualMachineId) { + private Mono> + getVirtualMachineWithResponseAsync(String resourceGroupName, String privateCloudName, String virtualMachineId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5912,10 +5439,6 @@ private Mono> getVirtualMachineWith return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (virtualMachineId == null) { return Mono .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); @@ -5923,8 +5446,8 @@ private Mono> getVirtualMachineWith final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, - virtualMachineId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -5933,7 +5456,6 @@ private Mono> getVirtualMachineWith * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5943,8 +5465,7 @@ private Mono> getVirtualMachineWith */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getVirtualMachineWithResponseAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String virtualMachineId, - Context context) { + String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5961,10 +5482,6 @@ private Mono> getVirtualMachineWith return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (virtualMachineId == null) { return Mono .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); @@ -5972,8 +5489,7 @@ private Mono> getVirtualMachineWith final String accept = "application/json"; context = this.client.mergeContext(context); return service.getVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, accept, context); } /** @@ -5981,7 +5497,6 @@ private Mono> getVirtualMachineWith * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5990,9 +5505,9 @@ private Mono> getVirtualMachineWith */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getVirtualMachineAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String virtualMachineId) { - return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, - virtualMachineId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + String privateCloudName, String virtualMachineId) { + return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -6000,7 +5515,6 @@ private Mono getVirtualMachineAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6010,9 +5524,9 @@ private Mono getVirtualMachineAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getVirtualMachineWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context) { - return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, - virtualMachineId, context).block(); + String privateCloudName, String virtualMachineId, Context context) { + return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId, context) + .block(); } /** @@ -6020,7 +5534,6 @@ public Response getVirtualMachineWithRespons * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6029,9 +5542,9 @@ public Response getVirtualMachineWithRespons */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String virtualMachineId) { - return getVirtualMachineWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId, - Context.NONE).getValue(); + String virtualMachineId) { + return getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, Context.NONE) + .getValue(); } /** @@ -6039,7 +5552,6 @@ public WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -6048,7 +5560,7 @@ public WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsServicesSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6065,15 +5577,10 @@ private Mono> listDnsServicesSingl return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listDnsServices(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, - context)) + 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())); @@ -6084,7 +5591,6 @@ private Mono> listDnsServicesSingl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6094,7 +5600,7 @@ private Mono> listDnsServicesSingl */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsServicesSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6111,15 +5617,11 @@ private Mono> listDnsServicesSingl return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listDnsServices(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + resourceGroupName, privateCloudName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -6129,7 +5631,6 @@ private Mono> listDnsServicesSingl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -6137,9 +5638,8 @@ private Mono> listDnsServicesSingl */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsServicesAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { - return new PagedFlux<>( - () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + String privateCloudName) { + return new PagedFlux<>(() -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listDnsServicesNextSinglePageAsync(nextLink)); } @@ -6148,7 +5648,6 @@ private PagedFlux listDnsServicesAsync(String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6157,9 +5656,8 @@ private PagedFlux listDnsServicesAsync(String re */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsServicesAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { - return new PagedFlux<>( - () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listDnsServicesNextSinglePageAsync(nextLink, context)); } @@ -6168,7 +5666,6 @@ private PagedFlux listDnsServicesAsync(String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -6177,8 +5674,8 @@ private PagedFlux listDnsServicesAsync(String re */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsServices(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { - return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + String privateCloudName) { + return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName)); } /** @@ -6186,7 +5683,6 @@ public PagedIterable listDnsServices(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6196,9 +5692,8 @@ public PagedIterable listDnsServices(String reso */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsServices(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { - return new PagedIterable<>( - listDnsServicesAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + String privateCloudName, Context context) { + return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName, context)); } /** @@ -6206,7 +5701,6 @@ public PagedIterable listDnsServices(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6215,7 +5709,7 @@ public PagedIterable listDnsServices(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId) { + String privateCloudName, String dnsServiceId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6232,18 +5726,13 @@ private Mono> getDnsServiceWithResponse return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -6252,7 +5741,6 @@ private Mono> getDnsServiceWithResponse * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6262,7 +5750,7 @@ private Mono> getDnsServiceWithResponse */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context) { + String privateCloudName, String dnsServiceId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6279,18 +5767,13 @@ private Mono> getDnsServiceWithResponse return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, context); } /** @@ -6298,7 +5781,6 @@ private Mono> getDnsServiceWithResponse * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6307,8 +5789,8 @@ private Mono> getDnsServiceWithResponse */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDnsServiceAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId) { - return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId) + String dnsServiceId) { + return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -6317,7 +5799,6 @@ private Mono getDnsServiceAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6327,9 +5808,8 @@ private Mono getDnsServiceAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDnsServiceWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context) { - return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - context).block(); + String privateCloudName, String dnsServiceId, Context context) { + return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, context).block(); } /** @@ -6337,7 +5817,6 @@ public Response getDnsServiceWithResponse(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6346,9 +5825,8 @@ public Response getDnsServiceWithResponse(String */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId) { - return getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - Context.NONE).getValue(); + String dnsServiceId) { + return getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE).getValue(); } /** @@ -6356,7 +5834,6 @@ public WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6366,8 +5843,7 @@ public WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6384,10 +5860,6 @@ private Mono>> createDnsServiceWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } @@ -6400,8 +5872,8 @@ private Mono>> createDnsServiceWithResponseAsync(Strin final String accept = "application/json"; return FluxUtil .withContext(context -> service.createDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - accept, workloadNetworkDnsService, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, + workloadNetworkDnsService, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -6410,7 +5882,6 @@ private Mono>> createDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -6421,8 +5892,8 @@ private Mono>> createDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6439,10 +5910,6 @@ private Mono>> createDnsServiceWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } @@ -6455,8 +5922,8 @@ private Mono>> createDnsServiceWithResponseAsync(Strin final String accept = "application/json"; context = this.client.mergeContext(context); return service.createDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - accept, workloadNetworkDnsService, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, + workloadNetworkDnsService, context); } /** @@ -6464,7 +5931,6 @@ private Mono>> createDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6474,10 +5940,10 @@ private Mono>> createDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> - beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { Mono>> mono = createDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dnsServiceId, workloadNetworkDnsService); + dnsServiceId, workloadNetworkDnsService); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, this.client.getContext()); @@ -6488,7 +5954,6 @@ private Mono>> createDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -6499,11 +5964,11 @@ private Mono>> createDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> - beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { context = this.client.mergeContext(context); Mono>> mono = createDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dnsServiceId, workloadNetworkDnsService, context); + dnsServiceId, workloadNetworkDnsService, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, context); @@ -6514,7 +5979,6 @@ private Mono>> createDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6524,11 +5988,10 @@ private Mono>> createDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { return this - .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService) + .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) .getSyncPoller(); } @@ -6537,7 +6000,6 @@ public SyncPoller, WorkloadNetworkDns * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -6548,11 +6010,11 @@ public SyncPoller, WorkloadNetworkDns */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { return this - .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService, context) + .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context) .getSyncPoller(); } @@ -6561,7 +6023,6 @@ public SyncPoller, WorkloadNetworkDns * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6571,10 +6032,10 @@ public SyncPoller, WorkloadNetworkDns */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsServiceAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService).last().flatMap(this.client::getLroFinalResultOrError); + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -6582,7 +6043,6 @@ private Mono createDnsServiceAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -6593,10 +6053,10 @@ private Mono createDnsServiceAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsServiceAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService, context).last().flatMap(this.client::getLroFinalResultOrError); + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context) { + return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -6604,7 +6064,6 @@ private Mono createDnsServiceAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6614,9 +6073,9 @@ private Mono createDnsServiceAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return createDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService).block(); + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return createDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .block(); } /** @@ -6624,7 +6083,6 @@ public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -6635,10 +6093,9 @@ public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return createDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService, context).block(); + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return createDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context).block(); } /** @@ -6646,7 +6103,6 @@ public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6656,8 +6112,7 @@ public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6674,10 +6129,6 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } @@ -6690,8 +6141,8 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - accept, workloadNetworkDnsService, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, + workloadNetworkDnsService, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -6700,7 +6151,6 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6711,8 +6161,8 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6729,10 +6179,6 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } @@ -6745,8 +6191,8 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - accept, workloadNetworkDnsService, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, + workloadNetworkDnsService, context); } /** @@ -6754,7 +6200,6 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6764,10 +6209,10 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> - beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { Mono>> mono = updateDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dnsServiceId, workloadNetworkDnsService); + dnsServiceId, workloadNetworkDnsService); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, this.client.getContext()); @@ -6778,7 +6223,6 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6789,11 +6233,11 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> - beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dnsServiceId, workloadNetworkDnsService, context); + dnsServiceId, workloadNetworkDnsService, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, context); @@ -6804,7 +6248,6 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6814,11 +6257,10 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { return this - .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService) + .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) .getSyncPoller(); } @@ -6827,7 +6269,6 @@ public SyncPoller, WorkloadNetworkDns * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6838,11 +6279,11 @@ public SyncPoller, WorkloadNetworkDns */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { return this - .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService, context) + .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context) .getSyncPoller(); } @@ -6851,7 +6292,6 @@ public SyncPoller, WorkloadNetworkDns * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6861,10 +6301,10 @@ public SyncPoller, WorkloadNetworkDns */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsServiceAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService).last().flatMap(this.client::getLroFinalResultOrError); + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -6872,7 +6312,6 @@ private Mono updateDnsServiceAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6883,10 +6322,10 @@ private Mono updateDnsServiceAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsServiceAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService, context).last().flatMap(this.client::getLroFinalResultOrError); + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context) { + return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -6894,7 +6333,6 @@ private Mono updateDnsServiceAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6904,9 +6342,9 @@ private Mono updateDnsServiceAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return updateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService).block(); + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return updateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .block(); } /** @@ -6914,7 +6352,6 @@ public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6925,10 +6362,9 @@ public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return updateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - workloadNetworkDnsService, context).block(); + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return updateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context).block(); } /** @@ -7162,7 +6598,6 @@ public void deleteDnsService(String resourceGroupName, String dnsServiceId, Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7171,7 +6606,7 @@ public void deleteDnsService(String resourceGroupName, String dnsServiceId, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsZonesSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7188,15 +6623,10 @@ private Mono> listDnsZonesSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listDnsZones(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, - context)) + 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())); @@ -7207,7 +6637,6 @@ private Mono> listDnsZonesSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7217,7 +6646,7 @@ private Mono> listDnsZonesSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsZonesSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7234,15 +6663,11 @@ private Mono> listDnsZonesSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listDnsZones(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + resourceGroupName, privateCloudName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -7252,17 +6677,15 @@ private Mono> listDnsZonesSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsZonesAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedFlux<>( - () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + private PagedFlux listDnsZonesAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listDnsZonesNextSinglePageAsync(nextLink)); } @@ -7271,7 +6694,6 @@ private PagedFlux listDnsZonesAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7280,9 +6702,8 @@ private PagedFlux listDnsZonesAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsZonesAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedFlux<>( - () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + Context context) { + return new PagedFlux<>(() -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listDnsZonesNextSinglePageAsync(nextLink, context)); } @@ -7291,16 +6712,14 @@ private PagedFlux listDnsZonesAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName)); } /** @@ -7308,7 +6727,6 @@ public PagedIterable listDnsZones(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7317,9 +6735,8 @@ public PagedIterable listDnsZones(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedIterable<>( - listDnsZonesAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + Context context) { + return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName, context)); } /** @@ -7327,7 +6744,6 @@ public PagedIterable listDnsZones(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7336,7 +6752,7 @@ public PagedIterable listDnsZones(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsZoneId) { + String privateCloudName, String dnsZoneId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7353,18 +6769,13 @@ private Mono> getDnsZoneWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -7373,7 +6784,6 @@ private Mono> getDnsZoneWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7383,7 +6793,7 @@ private Mono> getDnsZoneWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsZoneId, Context context) { + String privateCloudName, String dnsZoneId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7400,18 +6810,13 @@ private Mono> getDnsZoneWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, context); } /** @@ -7419,7 +6824,6 @@ private Mono> getDnsZoneWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7428,8 +6832,8 @@ private Mono> getDnsZoneWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDnsZoneAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId) { - return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId) + String dnsZoneId) { + return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -7438,7 +6842,6 @@ private Mono getDnsZoneAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7448,9 +6851,8 @@ private Mono getDnsZoneAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDnsZoneWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsZoneId, Context context) { - return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, context) - .block(); + String privateCloudName, String dnsZoneId, Context context) { + return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, context).block(); } /** @@ -7458,7 +6860,6 @@ public Response getDnsZoneWithResponse(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7466,10 +6867,8 @@ public Response getDnsZoneWithResponse(String resou * @return a WorkloadNetworkDnsZone. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId) { - return getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, Context.NONE) - .getValue(); + public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { + return getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); } /** @@ -7477,7 +6876,6 @@ public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7487,8 +6885,7 @@ public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String p */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7505,10 +6902,6 @@ private Mono>> createDnsZoneWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } @@ -7521,8 +6914,8 @@ private Mono>> createDnsZoneWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.createDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - accept, workloadNetworkDnsZone, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, + workloadNetworkDnsZone, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -7531,7 +6924,6 @@ private Mono>> createDnsZoneWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -7542,8 +6934,8 @@ private Mono>> createDnsZoneWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7560,10 +6952,6 @@ private Mono>> createDnsZoneWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } @@ -7576,8 +6964,8 @@ private Mono>> createDnsZoneWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.createDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - accept, workloadNetworkDnsZone, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, + workloadNetworkDnsZone, context); } /** @@ -7585,7 +6973,6 @@ private Mono>> createDnsZoneWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7595,10 +6982,10 @@ private Mono>> createDnsZoneWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dnsZoneId, workloadNetworkDnsZone); + Mono>> mono + = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, this.client.getContext()); @@ -7609,7 +6996,6 @@ private PollerFlux, WorkloadNetworkDnsZo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -7620,11 +7006,11 @@ private PollerFlux, WorkloadNetworkDnsZo */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { context = this.client.mergeContext(context); Mono>> mono = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dnsZoneId, workloadNetworkDnsZone, context); + dnsZoneId, workloadNetworkDnsZone, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, context); @@ -7635,7 +7021,6 @@ private PollerFlux, WorkloadNetworkDnsZo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7645,11 +7030,9 @@ private PollerFlux, WorkloadNetworkDnsZo */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this - .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone) + return this.beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) .getSyncPoller(); } @@ -7658,7 +7041,6 @@ public SyncPoller, WorkloadNetworkDnsZon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -7669,11 +7051,10 @@ public SyncPoller, WorkloadNetworkDnsZon */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { return this - .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone, context) + .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) .getSyncPoller(); } @@ -7682,7 +7063,6 @@ public SyncPoller, WorkloadNetworkDnsZon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7692,9 +7072,9 @@ public SyncPoller, WorkloadNetworkDnsZon */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsZoneAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone).last().flatMap(this.client::getLroFinalResultOrError); + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -7702,7 +7082,6 @@ private Mono createDnsZoneAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -7713,10 +7092,10 @@ private Mono createDnsZoneAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsZoneAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone, context).last().flatMap(this.client::getLroFinalResultOrError); + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -7724,7 +7103,6 @@ private Mono createDnsZoneAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7734,9 +7112,8 @@ private Mono createDnsZoneAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return createDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone).block(); + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); } /** @@ -7744,7 +7121,6 @@ public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -7755,10 +7131,9 @@ public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return createDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone, context).block(); + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .block(); } /** @@ -7766,7 +7141,6 @@ public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7776,8 +7150,7 @@ public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7794,10 +7167,6 @@ private Mono>> updateDnsZoneWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } @@ -7810,8 +7179,8 @@ private Mono>> updateDnsZoneWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - accept, workloadNetworkDnsZone, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, + workloadNetworkDnsZone, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -7820,7 +7189,6 @@ private Mono>> updateDnsZoneWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -7831,8 +7199,8 @@ private Mono>> updateDnsZoneWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7849,10 +7217,6 @@ private Mono>> updateDnsZoneWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } @@ -7865,8 +7229,8 @@ private Mono>> updateDnsZoneWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - accept, workloadNetworkDnsZone, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, + workloadNetworkDnsZone, context); } /** @@ -7874,7 +7238,6 @@ private Mono>> updateDnsZoneWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7884,10 +7247,10 @@ private Mono>> updateDnsZoneWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dnsZoneId, workloadNetworkDnsZone); + Mono>> mono + = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, this.client.getContext()); @@ -7898,7 +7261,6 @@ private PollerFlux, WorkloadNetworkDnsZo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -7909,11 +7271,11 @@ private PollerFlux, WorkloadNetworkDnsZo */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, dnsZoneId, workloadNetworkDnsZone, context); + dnsZoneId, workloadNetworkDnsZone, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, context); @@ -7924,7 +7286,6 @@ private PollerFlux, WorkloadNetworkDnsZo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7934,11 +7295,9 @@ private PollerFlux, WorkloadNetworkDnsZo */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this - .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone) + return this.beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) .getSyncPoller(); } @@ -7947,7 +7306,6 @@ public SyncPoller, WorkloadNetworkDnsZon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -7958,11 +7316,10 @@ public SyncPoller, WorkloadNetworkDnsZon */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { return this - .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone, context) + .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) .getSyncPoller(); } @@ -7971,7 +7328,6 @@ public SyncPoller, WorkloadNetworkDnsZon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7981,9 +7337,9 @@ public SyncPoller, WorkloadNetworkDnsZon */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsZoneAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone).last().flatMap(this.client::getLroFinalResultOrError); + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -7991,7 +7347,6 @@ private Mono updateDnsZoneAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -8002,10 +7357,10 @@ private Mono updateDnsZoneAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsZoneAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone, context).last().flatMap(this.client::getLroFinalResultOrError); + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -8013,7 +7368,6 @@ private Mono updateDnsZoneAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8023,9 +7377,8 @@ private Mono updateDnsZoneAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return updateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone).block(); + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); } /** @@ -8033,7 +7386,6 @@ public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -8044,10 +7396,9 @@ public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return updateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - workloadNetworkDnsZone, context).block(); + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .block(); } /** @@ -8279,7 +7630,6 @@ public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String pri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -8288,7 +7638,7 @@ public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String pri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listPublicIPsSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -8305,15 +7655,10 @@ private Mono> listPublicIPsSinglePag return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listPublicIPs(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, - context)) + 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())); @@ -8324,7 +7669,6 @@ private Mono> listPublicIPsSinglePag * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -8334,7 +7678,7 @@ private Mono> listPublicIPsSinglePag */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listPublicIPsSinglePageAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -8351,15 +7695,11 @@ private Mono> listPublicIPsSinglePag return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listPublicIPs(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, workloadNetworkName, accept, context) + resourceGroupName, privateCloudName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -8369,7 +7709,6 @@ private Mono> listPublicIPsSinglePag * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -8377,9 +7716,8 @@ private Mono> listPublicIPsSinglePag */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPublicIPsAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { - return new PagedFlux<>( - () -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + String privateCloudName) { + return new PagedFlux<>(() -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listPublicIPsNextSinglePageAsync(nextLink)); } @@ -8388,7 +7726,6 @@ private PagedFlux listPublicIPsAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -8397,9 +7734,8 @@ private PagedFlux listPublicIPsAsync(String resour */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPublicIPsAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { - return new PagedFlux<>( - () -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listPublicIPsNextSinglePageAsync(nextLink, context)); } @@ -8408,7 +7744,6 @@ private PagedFlux listPublicIPsAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -8416,9 +7751,9 @@ private PagedFlux listPublicIPsAsync(String resour * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { - return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName, workloadNetworkName)); + public PagedIterable listPublicIPs(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName)); } /** @@ -8426,7 +7761,6 @@ public PagedIterable listPublicIPs(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -8436,9 +7770,8 @@ public PagedIterable listPublicIPs(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { - return new PagedIterable<>( - listPublicIPsAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); + Context context) { + return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName, context)); } /** @@ -8446,7 +7779,6 @@ public PagedIterable listPublicIPs(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -8455,7 +7787,7 @@ public PagedIterable listPublicIPs(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getPublicIPWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String publicIPId) { + String privateCloudName, String publicIPId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -8472,18 +7804,13 @@ private Mono> getPublicIPWithResponseAsyn return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (publicIPId == null) { return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -8492,7 +7819,6 @@ private Mono> getPublicIPWithResponseAsyn * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8502,7 +7828,7 @@ private Mono> getPublicIPWithResponseAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getPublicIPWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String publicIPId, Context context) { + String privateCloudName, String publicIPId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -8519,18 +7845,13 @@ private Mono> getPublicIPWithResponseAsyn return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (publicIPId == null) { return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, context); } /** @@ -8538,7 +7859,6 @@ private Mono> getPublicIPWithResponseAsyn * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -8547,8 +7867,8 @@ private Mono> getPublicIPWithResponseAsyn */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getPublicIPAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId) { - return getPublicIPWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId) + String publicIPId) { + return getPublicIPWithResponseAsync(resourceGroupName, privateCloudName, publicIPId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -8557,7 +7877,6 @@ private Mono getPublicIPAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8567,9 +7886,8 @@ private Mono getPublicIPAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getPublicIPWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String publicIPId, Context context) { - return getPublicIPWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - context).block(); + String privateCloudName, String publicIPId, Context context) { + return getPublicIPWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, context).block(); } /** @@ -8577,7 +7895,6 @@ public Response getPublicIPWithResponse(String res * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -8586,9 +7903,8 @@ public Response getPublicIPWithResponse(String res */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId) { - return getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - Context.NONE).getValue(); + String publicIPId) { + return getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE).getValue(); } /** @@ -8596,7 +7912,6 @@ public WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8606,8 +7921,7 @@ public WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPublicIPWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -8624,10 +7938,6 @@ private Mono>> createPublicIPWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (publicIPId == null) { return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); } @@ -8640,8 +7950,8 @@ private Mono>> createPublicIPWithResponseAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.createPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - accept, workloadNetworkPublicIP, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, + workloadNetworkPublicIP, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -8650,7 +7960,6 @@ private Mono>> createPublicIPWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -8661,8 +7970,8 @@ private Mono>> createPublicIPWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPublicIPWithResponseAsync(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -8679,10 +7988,6 @@ private Mono>> createPublicIPWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } if (publicIPId == null) { return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); } @@ -8695,8 +8000,8 @@ private Mono>> createPublicIPWithResponseAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service.createPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - accept, workloadNetworkPublicIP, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, + workloadNetworkPublicIP, context); } /** @@ -8704,7 +8009,6 @@ private Mono>> createPublicIPWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8714,10 +8018,10 @@ private Mono>> createPublicIPWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIPAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + String resourceGroupName, String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - Mono>> mono = createPublicIPWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, publicIPId, workloadNetworkPublicIP); + Mono>> mono + = createPublicIPWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, this.client.getContext()); @@ -8728,7 +8032,6 @@ private PollerFlux, WorkloadNetworkPubl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -8739,11 +8042,11 @@ private PollerFlux, WorkloadNetworkPubl */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIPAsync( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + String resourceGroupName, String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { context = this.client.mergeContext(context); Mono>> mono = createPublicIPWithResponseAsync(resourceGroupName, privateCloudName, - workloadNetworkName, publicIPId, workloadNetworkPublicIP, context); + publicIPId, workloadNetworkPublicIP, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, context); @@ -8754,7 +8057,6 @@ private PollerFlux, WorkloadNetworkPubl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8764,11 +8066,9 @@ private PollerFlux, WorkloadNetworkPubl */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + String resourceGroupName, String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - return this - .beginCreatePublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - workloadNetworkPublicIP) + return this.beginCreatePublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP) .getSyncPoller(); } @@ -8777,7 +8077,6 @@ public SyncPoller, WorkloadNetworkPubli * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -8788,11 +8087,10 @@ public SyncPoller, WorkloadNetworkPubli */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( - String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, + String resourceGroupName, String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { return this - .beginCreatePublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - workloadNetworkPublicIP, context) + .beginCreatePublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context) .getSyncPoller(); } @@ -8801,7 +8099,6 @@ public SyncPoller, WorkloadNetworkPubli * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8811,9 +8108,9 @@ public SyncPoller, WorkloadNetworkPubli */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPublicIPAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - return beginCreatePublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - workloadNetworkPublicIP).last().flatMap(this.client::getLroFinalResultOrError); + String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return beginCreatePublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -8821,7 +8118,6 @@ private Mono createPublicIPAsync(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -8832,10 +8128,9 @@ private Mono createPublicIPAsync(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPublicIPAsync(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, - Context context) { - return beginCreatePublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - workloadNetworkPublicIP, context).last().flatMap(this.client::getLroFinalResultOrError); + String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + return beginCreatePublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -8843,7 +8138,6 @@ private Mono createPublicIPAsync(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8853,9 +8147,8 @@ private Mono createPublicIPAsync(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - return createPublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - workloadNetworkPublicIP).block(); + String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return createPublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP).block(); } /** @@ -8863,7 +8156,6 @@ public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -8874,10 +8166,9 @@ public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, - Context context) { - return createPublicIPAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - workloadNetworkPublicIP, context).block(); + String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { + return createPublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context) + .block(); } /** 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 624cd7e3541d5..d1831dd67b18a 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 @@ -45,21 +45,10 @@ public WorkloadNetworksImpl(WorkloadNetworksClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String privateCloudName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, privateCloudName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { + Context context) { Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, context); + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkImpl(inner.getValue(), this.manager())); @@ -68,8 +57,8 @@ public Response getWithResponse(String resourceGroupName, Strin } } - public WorkloadNetwork get(String resourceGroupName, String privateCloudName, String workloadNetworkName) { - WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, workloadNetworkName); + public WorkloadNetwork get(String resourceGroupName, String privateCloudName) { + WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName); if (inner != null) { return new WorkloadNetworkImpl(inner, this.manager()); } else { @@ -77,24 +66,34 @@ public WorkloadNetwork get(String resourceGroupName, String privateCloudName, St } } - public PagedIterable listSegments(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public PagedIterable list(String resourceGroupName, String privateCloudName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + } + + public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { PagedIterable inner - = this.serviceClient().listSegments(resourceGroupName, privateCloudName, workloadNetworkName); + = this.serviceClient().listSegments(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); } public PagedIterable listSegments(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { + Context context) { PagedIterable inner - = this.serviceClient().listSegments(resourceGroupName, privateCloudName, workloadNetworkName, context); + = this.serviceClient().listSegments(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); } public Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, Context context) { - Response inner = this.serviceClient() - .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context); + String segmentId, Context context) { + Response inner + = this.serviceClient().getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkSegmentImpl(inner.getValue(), this.manager())); @@ -103,10 +102,9 @@ public Response getSegmentWithResponse(String resourceGr } } - public WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId) { + public WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId) { WorkloadNetworkSegmentInner inner - = this.serviceClient().getSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId); + = this.serviceClient().getSegment(resourceGroupName, privateCloudName, segmentId); if (inner != null) { return new WorkloadNetworkSegmentImpl(inner, this.manager()); } else { @@ -114,28 +112,24 @@ public WorkloadNetworkSegment getSegment(String resourceGroupName, String privat } } - public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String segmentId) { - this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId); + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { + this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId); } - public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String segmentId, Context context) { - this.serviceClient() - .deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context); + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { + this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId, context); } - public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { PagedIterable inner - = this.serviceClient().listDhcp(resourceGroupName, privateCloudName, workloadNetworkName); + = this.serviceClient().listDhcp(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); } public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { + Context context) { PagedIterable inner - = this.serviceClient().listDhcp(resourceGroupName, privateCloudName, workloadNetworkName, context); + = this.serviceClient().listDhcp(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); } @@ -160,34 +154,31 @@ public WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, Stri } } - public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dhcpId) { - this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { + this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, dhcpId); } - public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, - Context context) { - this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { + this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, dhcpId, context); } - public PagedIterable listGateways(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { PagedIterable inner - = this.serviceClient().listGateways(resourceGroupName, privateCloudName, workloadNetworkName); + = this.serviceClient().listGateways(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); } public PagedIterable listGateways(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { + Context context) { PagedIterable inner - = this.serviceClient().listGateways(resourceGroupName, privateCloudName, workloadNetworkName, context); + = this.serviceClient().listGateways(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); } public Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String gatewayId, Context context) { - Response inner = this.serviceClient() - .getGatewayWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, context); + String gatewayId, Context context) { + Response inner + = this.serviceClient().getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkGatewayImpl(inner.getValue(), this.manager())); @@ -196,10 +187,9 @@ public Response getGatewayWithResponse(String resourceGr } } - public WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String gatewayId) { + public WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { WorkloadNetworkGatewayInner inner - = this.serviceClient().getGateway(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId); + = this.serviceClient().getGateway(resourceGroupName, privateCloudName, gatewayId); if (inner != null) { return new WorkloadNetworkGatewayImpl(inner, this.manager()); } else { @@ -208,26 +198,25 @@ public WorkloadNetworkGateway getGateway(String resourceGroupName, String privat } public PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + String privateCloudName) { PagedIterable inner - = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName); + = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); } public PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { + String privateCloudName, Context context) { PagedIterable inner - = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, context); + = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); } public Response getPortMirroringWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, Context context) { + String privateCloudName, String portMirroringId, Context context) { Response inner = this.serviceClient() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - context); + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkPortMirroringImpl(inner.getValue(), this.manager())); @@ -237,9 +226,9 @@ public Response getPortMirroringWithResponse(Strin } public WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId) { - WorkloadNetworkPortMirroringInner inner = this.serviceClient() - .getPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId); + String portMirroringId) { + WorkloadNetworkPortMirroringInner inner + = this.serviceClient().getPortMirroring(resourceGroupName, privateCloudName, portMirroringId); if (inner != null) { return new WorkloadNetworkPortMirroringImpl(inner, this.manager()); } else { @@ -256,24 +245,23 @@ public void deletePortMirroring(String resourceGroupName, String portMirroringId this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); } - public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { PagedIterable inner - = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, workloadNetworkName); + = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); } public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { + Context context) { PagedIterable inner - = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, workloadNetworkName, context); + = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); } public Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, Context context) { - Response inner = this.serviceClient() - .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, context); + String vmGroupId, Context context) { + Response inner + = this.serviceClient().getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkVMGroupImpl(inner.getValue(), this.manager())); @@ -282,10 +270,9 @@ public Response getVMGroupWithResponse(String resourceGr } } - public WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId) { + public WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { WorkloadNetworkVMGroupInner inner - = this.serviceClient().getVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId); + = this.serviceClient().getVMGroup(resourceGroupName, privateCloudName, vmGroupId); if (inner != null) { return new WorkloadNetworkVMGroupImpl(inner, this.manager()); } else { @@ -302,26 +289,25 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri } public PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName, String workloadNetworkName) { + String privateCloudName) { PagedIterable inner - = this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName, workloadNetworkName); + = this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); } public PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName, String workloadNetworkName, Context context) { - PagedIterable inner = this.serviceClient() - .listVirtualMachines(resourceGroupName, privateCloudName, workloadNetworkName, context); + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); } public Response getVirtualMachineWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context) { + String privateCloudName, String virtualMachineId, Context context) { Response inner = this.serviceClient() - .getVirtualMachineWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId, - context); + .getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkVirtualMachineImpl(inner.getValue(), this.manager())); @@ -331,9 +317,9 @@ public Response getVirtualMachineWithResponse(Str } public WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String virtualMachineId) { - WorkloadNetworkVirtualMachineInner inner = this.serviceClient() - .getVirtualMachine(resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId); + String virtualMachineId) { + WorkloadNetworkVirtualMachineInner inner + = this.serviceClient().getVirtualMachine(resourceGroupName, privateCloudName, virtualMachineId); if (inner != null) { return new WorkloadNetworkVirtualMachineImpl(inner, this.manager()); } else { @@ -341,24 +327,23 @@ public WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, } } - public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName) { PagedIterable inner - = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, workloadNetworkName); + = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); } public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { + Context context) { PagedIterable inner - = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, workloadNetworkName, context); + = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); } public Response getDnsServiceWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context) { + String privateCloudName, String dnsServiceId, Context context) { Response inner = this.serviceClient() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, context); + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkDnsServiceImpl(inner.getValue(), this.manager())); @@ -368,9 +353,9 @@ public Response getDnsServiceWithResponse(String reso } public WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId) { - WorkloadNetworkDnsServiceInner inner = this.serviceClient() - .getDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId); + String dnsServiceId) { + WorkloadNetworkDnsServiceInner inner + = this.serviceClient().getDnsService(resourceGroupName, privateCloudName, dnsServiceId); if (inner != null) { return new WorkloadNetworkDnsServiceImpl(inner, this.manager()); } else { @@ -387,24 +372,23 @@ public void deleteDnsService(String resourceGroupName, String dnsServiceId, Stri this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); } - public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { PagedIterable inner - = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, workloadNetworkName); + = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); } public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { + Context context) { PagedIterable inner - = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, workloadNetworkName, context); + = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); } public Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, Context context) { - Response inner = this.serviceClient() - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, context); + String dnsZoneId, Context context) { + Response inner + = this.serviceClient().getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkDnsZoneImpl(inner.getValue(), this.manager())); @@ -413,10 +397,9 @@ public Response getDnsZoneWithResponse(String resourceGr } } - public WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId) { + public WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { WorkloadNetworkDnsZoneInner inner - = this.serviceClient().getDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId); + = this.serviceClient().getDnsZone(resourceGroupName, privateCloudName, dnsZoneId); if (inner != null) { return new WorkloadNetworkDnsZoneImpl(inner, this.manager()); } else { @@ -432,24 +415,23 @@ public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String pri this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); } - public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - String workloadNetworkName) { + public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName) { PagedIterable inner - = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName, workloadNetworkName); + = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); } public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context) { + Context context) { PagedIterable inner - = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName, workloadNetworkName, context); + = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); } public Response getPublicIPWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId, Context context) { - Response inner = this.serviceClient() - .getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, context); + String publicIPId, Context context) { + Response inner + = this.serviceClient().getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkPublicIpImpl(inner.getValue(), this.manager())); @@ -458,10 +440,9 @@ public Response getPublicIPWithResponse(String resource } } - public WorkloadNetworkPublicIp getPublicIP(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId) { + public WorkloadNetworkPublicIp getPublicIP(String resourceGroupName, String privateCloudName, String publicIPId) { WorkloadNetworkPublicIpInner inner - = this.serviceClient().getPublicIP(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId); + = this.serviceClient().getPublicIP(resourceGroupName, privateCloudName, publicIPId); if (inner != null) { return new WorkloadNetworkPublicIpImpl(inner, this.manager()); } else { @@ -488,19 +469,12 @@ public WorkloadNetworkSegment getSegmentById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); if (segmentId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - return this - .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE) - .getValue(); + return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); } public Response getSegmentByIdWithResponse(String id, Context context) { @@ -514,18 +488,12 @@ public Response getSegmentByIdWithResponse(String id, Co throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); if (segmentId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - return this.getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, - context); + return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); } public WorkloadNetworkPortMirroring getPortMirroringById(String id) { @@ -539,19 +507,12 @@ public WorkloadNetworkPortMirroring getPortMirroringById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); if (portMirroringId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); } - return this - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, - Context.NONE) + return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) .getValue(); } @@ -566,18 +527,12 @@ public Response getPortMirroringByIdWithResponse(S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); if (portMirroringId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); } - return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, - portMirroringId, context); + return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); } public WorkloadNetworkVMGroup getVMGroupById(String id) { @@ -591,19 +546,12 @@ public WorkloadNetworkVMGroup getVMGroupById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); if (vmGroupId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); } - return this - .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, Context.NONE) - .getValue(); + return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); } public Response getVMGroupByIdWithResponse(String id, Context context) { @@ -617,18 +565,12 @@ public Response getVMGroupByIdWithResponse(String id, Co throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); if (vmGroupId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); } - return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, - context); + return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); } public WorkloadNetworkDnsService getDnsServiceById(String id) { @@ -642,19 +584,12 @@ public WorkloadNetworkDnsService getDnsServiceById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); if (dnsServiceId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); } - return this - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - Context.NONE) + return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) .getValue(); } @@ -669,18 +604,12 @@ public Response getDnsServiceByIdWithResponse(String throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); if (dnsServiceId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); } - return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, - context); + return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); } public WorkloadNetworkDnsZone getDnsZoneById(String id) { @@ -694,19 +623,12 @@ public WorkloadNetworkDnsZone getDnsZoneById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); if (dnsZoneId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); } - return this - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, Context.NONE) - .getValue(); + return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); } public Response getDnsZoneByIdWithResponse(String id, Context context) { @@ -720,18 +642,12 @@ public Response getDnsZoneByIdWithResponse(String id, Co throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); if (dnsZoneId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); } - return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, - context); + return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); } public WorkloadNetworkPublicIp getPublicIPById(String id) { @@ -745,19 +661,12 @@ public WorkloadNetworkPublicIp getPublicIPById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); if (publicIPId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); } - return this - .getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, Context.NONE) - .getValue(); + return this.getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE).getValue(); } public Response getPublicIPByIdWithResponse(String id, Context context) { @@ -771,18 +680,12 @@ public Response getPublicIPByIdWithResponse(String id, throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); if (publicIPId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); } - return this.getPublicIPWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, - context); + return this.getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, context); } public void deleteSegmentById(String id) { @@ -796,17 +699,12 @@ public void deleteSegmentById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); if (segmentId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - this.deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE); + this.deleteSegment(resourceGroupName, privateCloudName, segmentId, Context.NONE); } public void deleteSegmentByIdWithResponse(String id, Context context) { @@ -820,17 +718,12 @@ public void deleteSegmentByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); if (segmentId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - this.deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context); + this.deleteSegment(resourceGroupName, privateCloudName, segmentId, context); } public void deleteDhcpById(String id) { @@ -844,17 +737,12 @@ public void deleteDhcpById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); if (dhcpId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); } - this.deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, Context.NONE); + this.deleteDhcp(resourceGroupName, privateCloudName, dhcpId, Context.NONE); } public void deleteDhcpByIdWithResponse(String id, Context context) { @@ -868,17 +756,12 @@ public void deleteDhcpByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); - if (workloadNetworkName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); - } String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); if (dhcpId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); } - this.deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context); + this.deleteDhcp(resourceGroupName, privateCloudName, dhcpId, context); } private WorkloadNetworksClient serviceClient() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java index dcf8ca9ba2050..5f993e09c4f10 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java @@ -5,7 +5,6 @@ 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.IscsiPathInner; /** @@ -54,131 +53,10 @@ public interface IscsiPath { */ String networkBlock(); - /** - * 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.IscsiPathInner object. * * @return the inner object. */ IscsiPathInner innerModel(); - - /** - * The entirety of the IscsiPath definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The IscsiPath definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the IscsiPath definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the IscsiPath 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 IscsiPath 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.WithNetworkBlock { - /** - * Executes the create request. - * - * @return the created resource. - */ - IscsiPath create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - IscsiPath create(Context context); - } - - /** - * The stage of the IscsiPath definition allowing to specify networkBlock. - */ - interface WithNetworkBlock { - /** - * Specifies the networkBlock property: CIDR Block for iSCSI path.. - * - * @param networkBlock CIDR Block for iSCSI path. - * @return the next definition stage. - */ - WithCreate withNetworkBlock(String networkBlock); - } - } - - /** - * Begins update for the IscsiPath resource. - * - * @return the stage of resource update. - */ - IscsiPath.Update update(); - - /** - * The template for IscsiPath update. - */ - interface Update { - /** - * Executes the update request. - * - * @return the updated resource. - */ - IscsiPath apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - IscsiPath apply(Context context); - } - - /** - * The IscsiPath update stages. - */ - interface UpdateStages { - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - IscsiPath refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - IscsiPath refresh(Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java index 99731a7191ff1..f73c348581079 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; /** * Resource collection API of IscsiPaths. @@ -42,103 +43,74 @@ public interface IscsiPaths { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); /** * Get a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath. */ - IscsiPath get(String resourceGroupName, String privateCloudName, String iscsiPathName); + IscsiPath get(String resourceGroupName, String privateCloudName); /** - * Delete a IscsiPath. + * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an iSCSI path resource. */ - void delete(String resourceGroupName, String privateCloudName, String iscsiPathName); + IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); /** - * Delete a IscsiPath. + * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param iscsiPathName Name of the iSCSI path resource. + * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an iSCSI path resource. */ - void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context); - - /** - * Get a IscsiPath. - * - * @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 IscsiPath along with {@link Response}. - */ - IscsiPath getById(String id); - - /** - * Get a IscsiPath. - * - * @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 IscsiPath along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); + IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context); /** * Delete a IscsiPath. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteById(String id); + void deleteByResourceGroup(String resourceGroupName, String privateCloudName); /** * Delete a IscsiPath. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new IscsiPath resource. - * - * @param name resource name. - * @return the first stage of the new IscsiPath definition. - */ - IscsiPath.DefinitionStages.Blank define(String name); + void delete(String resourceGroupName, String privateCloudName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java index c3b35ecd53f8f..da444e46241cd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java @@ -83,15 +83,13 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName, workloadNetworkName. + * Specifies resourceGroupName, privateCloudName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java index ba1164bea099f..02b5b76dac316 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java @@ -133,15 +133,13 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName, workloadNetworkName. + * Specifies resourceGroupName, privateCloudName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java index e10c06df311e2..7fc1a1f4f7960 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java @@ -126,15 +126,13 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName, workloadNetworkName. + * Specifies resourceGroupName, privateCloudName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java index d6e9cbc05a437..e9fe2eadd5cd2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java @@ -125,15 +125,13 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName, workloadNetworkName. + * Specifies resourceGroupName, privateCloudName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java index e78c192d71988..13b6a50c67f19 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java @@ -97,15 +97,13 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName, workloadNetworkName. + * Specifies resourceGroupName, privateCloudName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java index 03d139ad909df..5d92d9259dd11 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java @@ -126,15 +126,13 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName, workloadNetworkName. + * Specifies resourceGroupName, privateCloudName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java index f1e4a4345df5e..5da5fa4d3d880 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java @@ -112,15 +112,13 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName, workloadNetworkName. + * Specifies resourceGroupName, privateCloudName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java index cd309058ad6cd..3bc6d42bd4dde 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java @@ -13,78 +13,72 @@ */ public interface WorkloadNetworks { /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String privateCloudName); + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork. */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + WorkloadNetwork get(String resourceGroupName, String privateCloudName); /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName); /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - WorkloadNetwork get(String resourceGroupName, String privateCloudName, String workloadNetworkName); + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listSegments(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listSegments(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -92,14 +86,13 @@ PagedIterable listSegments(String resourceGroupName, Str * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ PagedIterable listSegments(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -108,79 +101,70 @@ PagedIterable listSegments(String resourceGroupName, Str * @return a WorkloadNetworkSegment along with {@link Response}. */ Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String segmentId, Context context); + String segmentId, Context context); /** * Get a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkSegment. */ - WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String segmentId); + WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId); + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, - Context context); + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); /** * List WorkloadNetworkDhcp resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkDhcp resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, Context context); /** * Get a WorkloadNetworkDhcp. @@ -215,49 +199,43 @@ Response getDhcpWithResponse(String resourceGroupName, Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId); + void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, - Context context); + void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); /** * List WorkloadNetworkGateway resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listGateways(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listGateways(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkGateway resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -265,14 +243,13 @@ PagedIterable listGateways(String resourceGroupName, Str * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ PagedIterable listGateways(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkGateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -281,44 +258,39 @@ PagedIterable listGateways(String resourceGroupName, Str * @return a WorkloadNetworkGateway along with {@link Response}. */ Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String gatewayId, Context context); + String gatewayId, Context context); /** * Get a WorkloadNetworkGateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkGateway. */ - WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String gatewayId); + WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId); /** * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -327,14 +299,13 @@ PagedIterable listPortMirroring(String resourceGro * {@link PagedIterable}. */ PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -343,14 +314,13 @@ PagedIterable listPortMirroring(String resourceGro * @return a WorkloadNetworkPortMirroring along with {@link Response}. */ Response getPortMirroringWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String portMirroringId, Context context); + String privateCloudName, String portMirroringId, Context context); /** * Get a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -358,7 +328,7 @@ Response getPortMirroringWithResponse(String resou * @return a WorkloadNetworkPortMirroring. */ WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String portMirroringId); + String portMirroringId); /** * Delete a WorkloadNetworkPortMirroring. @@ -391,21 +361,18 @@ void deletePortMirroring(String resourceGroupName, String portMirroringId, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkVMGroup resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -413,14 +380,13 @@ PagedIterable listVMGroups(String resourceGroupName, Str * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -429,22 +395,20 @@ PagedIterable listVMGroups(String resourceGroupName, Str * @return a WorkloadNetworkVMGroup along with {@link Response}. */ Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String vmGroupId, Context context); + String vmGroupId, Context context); /** * Get a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkVMGroup. */ - WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String vmGroupId); + WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); /** * Delete a WorkloadNetworkVMGroup. @@ -476,22 +440,19 @@ WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -500,14 +461,13 @@ PagedIterable listVirtualMachines(String resource * {@link PagedIterable}. */ PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkVirtualMachine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -516,14 +476,13 @@ PagedIterable listVirtualMachines(String resource * @return a WorkloadNetworkVirtualMachine along with {@link Response}. */ Response getVirtualMachineWithResponse(String resourceGroupName, - String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context); + String privateCloudName, String virtualMachineId, Context context); /** * Get a WorkloadNetworkVirtualMachine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -531,29 +490,26 @@ Response getVirtualMachineWithResponse(String res * @return a WorkloadNetworkVirtualMachine. */ WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String virtualMachineId); + String virtualMachineId); /** * List WorkloadNetworkDnsService resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsService list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkDnsService resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -562,14 +518,13 @@ PagedIterable listDnsServices(String resourceGroupNam * {@link PagedIterable}. */ PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -578,22 +533,20 @@ PagedIterable listDnsServices(String resourceGroupNam * @return a WorkloadNetworkDnsService along with {@link Response}. */ Response getDnsServiceWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId, Context context); + String dnsServiceId, Context context); /** * Get a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkDnsService. */ - WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsServiceId); + WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, String dnsServiceId); /** * Delete a WorkloadNetworkDnsService. @@ -625,21 +578,18 @@ WorkloadNetworkDnsService getDnsService(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 workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkDnsZone resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -647,14 +597,13 @@ PagedIterable listDnsZones(String resourceGroupName, Str * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -663,22 +612,20 @@ PagedIterable listDnsZones(String resourceGroupName, Str * @return a WorkloadNetworkDnsZone along with {@link Response}. */ Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String dnsZoneId, Context context); + String dnsZoneId, Context context); /** * Get a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkDnsZone. */ - WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String dnsZoneId); + WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); /** * Delete a WorkloadNetworkDnsZone. @@ -710,22 +657,19 @@ WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - String workloadNetworkName); + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); /** * List WorkloadNetworkPublicIP resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -734,14 +678,13 @@ PagedIterable listPublicIPs(String resourceGroupName, S * {@link PagedIterable}. */ PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - String workloadNetworkName, Context context); + Context context); /** * Get a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -750,22 +693,20 @@ PagedIterable listPublicIPs(String resourceGroupName, S * @return a WorkloadNetworkPublicIP along with {@link Response}. */ Response getPublicIPWithResponse(String resourceGroupName, String privateCloudName, - String workloadNetworkName, String publicIPId, Context context); + String publicIPId, Context context); /** * Get a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkPublicIP. */ - WorkloadNetworkPublicIp getPublicIP(String resourceGroupName, String privateCloudName, String workloadNetworkName, - String publicIPId); + WorkloadNetworkPublicIp getPublicIP(String resourceGroupName, String privateCloudName, String publicIPId); /** * Delete a WorkloadNetworkPublicIP. 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 new file mode 100644 index 0000000000000..c859a728e850c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.AddonArcProperties; + +/** + * Samples for Addons CreateOrUpdate. + */ +public final class AddonsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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(); + } +} 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 new file mode 100644 index 0000000000000..b63c1d7f322ca --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Addons Delete. + */ +public final class AddonsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Delete.json + */ + /** + * Sample code: Addons_Delete. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..d3b46acc022c6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Addons Get. + */ +public final class AddonsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Get_ArcReg.json + */ + /** + * Sample code: Addons_Get_ArcReg. + * + * @param manager Entry point to AvsManager. + */ + public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "arc", com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..a553d0a24d38e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Addons List. + */ +public final class AddonsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_List.json + */ + /** + * Sample code: Addons_List. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..47cc84eb230cb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Authorizations CreateOrUpdate. + */ +public final class AuthorizationsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_CreateOrUpdate.json + */ + /** + * Sample code: Authorizations_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void authorizationsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.authorizations().define("authorization1").withExistingPrivateCloud("group1", "cloud1").create(); + } +} 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 new file mode 100644 index 0000000000000..9ef256db374c2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Authorizations Delete. + */ +public final class AuthorizationsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_Delete.json + */ + /** + * Sample code: Authorizations_Delete. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..1df19a8b67764 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Authorizations Get. + */ +public final class AuthorizationsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} 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 new file mode 100644 index 0000000000000..5f784198d6c02 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Authorizations List. + */ +public final class AuthorizationsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_List.json + */ + /** + * Sample code: Authorizations_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); + } +} 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 new file mode 100644 index 0000000000000..0b863b3e831bf --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for CloudLinks CreateOrUpdate. + */ +public final class CloudLinksCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_CreateOrUpdate.json + */ + /** + * Sample code: CloudLinks_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void cloudLinksCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.cloudLinks() + .define("cloudLink1") + .withExistingPrivateCloud("group1", "cloud1") + .withLinkedCloud( + "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2") + .create(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java new file mode 100644 index 0000000000000..b7bb30199007d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for CloudLinks Delete. + */ +public final class CloudLinksDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Delete.json + */ + /** + * Sample code: CloudLinks_Delete. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..9034f188e6a45 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for CloudLinks Get. + */ +public final class CloudLinksGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Get.json + */ + /** + * Sample code: CloudLinks_Get. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..386347cbbb0af --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for CloudLinks List. + */ +public final class CloudLinksListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} 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 new file mode 100644 index 0000000000000..9fc41ed6e5219 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.Sku; + +/** + * Samples for Clusters CreateOrUpdate. + */ +public final class ClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_CreateOrUpdate.json + */ + /** + * Sample code: Clusters_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void clustersCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.clusters() + .define("cluster1") + .withExistingPrivateCloud("group1", "cloud1") + .withSku(new Sku().withName("AV20")) + .withClusterSize(3) + .create(); + } +} 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 new file mode 100644 index 0000000000000..78e982a65841e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Clusters Delete. + */ +public final class ClustersDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Delete.json + */ + /** + * Sample code: Clusters_Delete. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..0e20645b0e5c4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Clusters Get. + */ +public final class ClustersGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Get.json + */ + /** + * Sample code: Clusters_Get. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..12dd55afb08c0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Clusters List. + */ +public final class ClustersListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_List.json + */ + /** + * Sample code: Clusters_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); + } +} 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 new file mode 100644 index 0000000000000..4d23f537a684a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Clusters ListZones. + */ +public final class ClustersListZonesSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_ListZones.json + */ + /** + * Sample code: Clusters_ListZones. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..ab51b287c3a9c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.Cluster; + +/** + * Samples for Clusters Update. + */ +public final class ClustersUpdateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Update.json + */ + /** + * Sample code: Clusters_Update. + * + * @param manager Entry point to AvsManager. + */ + public static void clustersUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + Cluster resource = manager.clusters() + .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withClusterSize(4).apply(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..ef1a2be5e9247 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.NetAppVolume; + +/** + * Samples for Datastores CreateOrUpdate. + */ +public final class DatastoresCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_CreateOrUpdate.json + */ + /** + * Sample code: Datastores_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void datastoresCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.datastores() + .define("datastore1") + .withExistingCluster("group1", "cloud1", "cluster1") + .withNetAppVolume(new NetAppVolume().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1")) + .create(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java new file mode 100644 index 0000000000000..b45dad3ae403a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Datastores Delete. + */ +public final class DatastoresDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Delete.json + */ + /** + * Sample code: Datastores_Delete. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..2c5247f2f96c3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Datastores Get. + */ +public final class DatastoresGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Get.json + */ + /** + * Sample code: Datastores_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void datastoresGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.datastores() + .getWithResponse("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..58045a6f322fd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Datastores List. + */ +public final class DatastoresListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_List.json + */ + /** + * Sample code: Datastores_List. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..5aecbd81a48c4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for GlobalReachConnections CreateOrUpdate. + */ +public final class GlobalReachConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_CreateOrUpdate.json + */ + /** + * Sample code: GlobalReachConnections_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void globalReachConnectionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.globalReachConnections() + .define("connection1") + .withExistingPrivateCloud("group1", "cloud1") + .withAuthorizationKey("01010101-0101-0101-0101-010101010101") + .withPeerExpressRouteCircuit( + "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer") + .create(); + } +} 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 new file mode 100644 index 0000000000000..06f1615a7ee29 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for GlobalReachConnections Delete. + */ +public final class GlobalReachConnectionsDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} 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 new file mode 100644 index 0000000000000..b1f7b81354758 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for GlobalReachConnections Get. + */ +public final class GlobalReachConnectionsGetSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_Get.json + */ + /** + * Sample code: GlobalReachConnections_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void globalReachConnectionsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.globalReachConnections() + .getWithResponse("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..5f0e4f082a6df --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for GlobalReachConnections List. + */ +public final class GlobalReachConnectionsListSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_List.json + */ + /** + * Sample code: GlobalReachConnections_List. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..a849f8bcecd47 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for HcxEnterpriseSites CreateOrUpdate. + */ +public final class HcxEnterpriseSitesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json + */ + /** + * Sample code: HcxEnterpriseSites_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void hcxEnterpriseSitesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hcxEnterpriseSites().define("site1").withExistingPrivateCloud("group1", "cloud1").create(); + } +} 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 new file mode 100644 index 0000000000000..2b06e2096f613 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for HcxEnterpriseSites Delete. + */ +public final class HcxEnterpriseSitesDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Delete.json + */ + /** + * Sample code: HcxEnterpriseSites_Delete. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..1eddf2c336155 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for HcxEnterpriseSites Get. + */ +public final class HcxEnterpriseSitesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Get.json + */ + /** + * Sample code: HcxEnterpriseSites_Get. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..05ca3e74c74c1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for HcxEnterpriseSites List. + */ +public final class HcxEnterpriseSitesListSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_List.json + */ + /** + * Sample code: HcxEnterpriseSites_List. + * + * @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); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..1d9cc088d027e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * Samples for IscsiPaths CreateOrUpdate. + */ +public final class IscsiPathsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_CreateOrUpdate.json + */ + /** + * Sample code: IscsiPaths_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths() + .createOrUpdate("group1", "cloud1", new IscsiPathInner().withNetworkBlock("192.168.0.0/24"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java new file mode 100644 index 0000000000000..f708583471a04 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for IscsiPaths Delete. + */ +public final class IscsiPathsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Delete.json + */ + /** + * Sample code: IscsiPaths_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().delete("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java new file mode 100644 index 0000000000000..f9cd3dd1ace64 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for IscsiPaths Get. + */ +public final class IscsiPathsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Get.json + */ + /** + * Sample code: IscsiPaths_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java new file mode 100644 index 0000000000000..b899da4906bad --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for IscsiPaths ListByPrivateCloud. + */ +public final class IscsiPathsListByPrivateCloudSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_List.json + */ + /** + * Sample code: IscsiPaths_ListByPrivateCloud. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsListByPrivateCloud(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java new file mode 100644 index 0000000000000..299af5e659fbf --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Locations CheckQuotaAvailability. + */ +public final class LocationsCheckQuotaAvailabilitySamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckQuotaAvailability.json + */ + /** + * Sample code: Locations_CheckQuotaAvailability. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..e1a9a86f9cfd3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Locations CheckTrialAvailability. + */ +public final class LocationsCheckTrialAvailabilitySamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckTrialAvailability.json + */ + /** + * Sample code: Locations_CheckTrialAvailability. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..b845b9ddbba5f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} 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 new file mode 100644 index 0000000000000..9938adc789f6f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +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. + */ +public final class PlacementPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_CreateOrUpdate.json + */ + /** + * Sample code: PlacementPolicies_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void placementPoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.placementPolicies() + .define("policy1") + .withExistingCluster("group1", "cloud1", "cluster1") + .withProperties(new VmHostPlacementPolicyProperties().withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityType(AffinityType.ANTI_AFFINITY) + .withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) + .create(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java new file mode 100644 index 0000000000000..0db89e1afb8de --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PlacementPolicies Delete. + */ +public final class PlacementPoliciesDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Delete.json + */ + /** + * Sample code: PlacementPolicies_Delete. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..85f3661839764 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PlacementPolicies Get. + */ +public final class PlacementPoliciesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} 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 new file mode 100644 index 0000000000000..ccb6906c45cfa --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PlacementPolicies List. + */ +public final class PlacementPoliciesListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_List.json + */ + /** + * Sample code: PlacementPolicies_List. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..2aa70ada3c2e2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +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 PlacementPolicies Update. + */ +public final class PlacementPoliciesUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Update.json + */ + /** + * Sample code: PlacementPolicies_Update. + * + * @param manager Entry point to AvsManager. + */ + public static void placementPoliciesUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + PlacementPolicy resource = manager.placementPolicies() + .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withState(PlacementPolicyState.DISABLED) + .withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST) + .apply(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..735c044008b30 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.ManagementCluster; +import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; +import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentityType; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for PrivateClouds CreateOrUpdate. + */ +public final class PrivateCloudsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_CreateOrUpdate.json + */ + /** + * Sample code: PrivateClouds_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds() + .define("cloud1") + .withRegion("eastus2") + .withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")) + .withTags(mapOf()) + .withIdentity(new PrivateCloudIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED)) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .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; + } +} 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 new file mode 100644 index 0000000000000..e8298c35a8001 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PrivateClouds Delete. + */ +public final class PrivateCloudsDeleteSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Delete.json + */ + /** + * Sample code: PrivateClouds_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); + } +} 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 new file mode 100644 index 0000000000000..711c342163e6c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PrivateClouds GetByResourceGroup. + */ +public final class PrivateCloudsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Get.json + */ + /** + * Sample code: PrivateClouds_Get. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..ce4ac12400ab2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PrivateClouds ListAdminCredentials. + */ +public final class PrivateCloudsListAdminCredentialsSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListAdminCredentials.json + */ + /** + * Sample code: PrivateClouds_ListAdminCredentials. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..79301dacaabe2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PrivateClouds ListByResourceGroup. + */ +public final class PrivateCloudsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} 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 new file mode 100644 index 0000000000000..ce4eeaeff954e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PrivateClouds List. + */ +public final class PrivateCloudsListSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListInSubscription.json + */ + /** + * Sample code: PrivateClouds_ListInSubscription. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().list(com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..516dd157deb4e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PrivateClouds RotateNsxtPassword. + */ +public final class PrivateCloudsRotateNsxtPasswordSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateNsxtPassword.json + */ + /** + * Sample code: PrivateClouds_RotateNsxtPassword. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..37e9f2c2e2c49 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PrivateClouds RotateVcenterPassword. + */ +public final class PrivateCloudsRotateVcenterPasswordSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateVcenterPassword.json + */ + /** + * Sample code: PrivateClouds_RotateVcenterPassword. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..d9855b0745b5e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +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.SystemAssignedServiceIdentityType; + +/** + * Samples for PrivateClouds Update. + */ +public final class PrivateCloudsUpdateSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Update.json + */ + /** + * Sample code: PrivateClouds_Update. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + PrivateCloud resource = manager.privateClouds() + .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withIdentity(new PrivateCloudIdentity().withType(SystemAssignedServiceIdentityType.NONE)) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) + .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") + .withKeyVersion("fakeTokenPlaceholder") + .withKeyVaultUrl("fakeTokenPlaceholder"))) + .apply(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java new file mode 100644 index 0000000000000..aa56cd829f728 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for ScriptCmdlets Get. + */ +public final class ScriptCmdletsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptCmdlets_Get.json + */ + /** + * Sample code: ScriptCmdlets_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void scriptCmdletsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.scriptCmdlets() + .getWithResponse("group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", + com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..e1766cd9f2fe0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for ScriptCmdlets List. + */ +public final class ScriptCmdletsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} 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 new file mode 100644 index 0000000000000..5c50d779a52fb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +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/Microsoft.AVS.Management/examples/2023-09-01/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(); + } +} 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 new file mode 100644 index 0000000000000..c590bfe9df601 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for ScriptExecutions Delete. + */ +public final class ScriptExecutionsDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_Delete.json + */ + /** + * Sample code: ScriptExecutions_Delete. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..603de6272b4a0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; +import java.util.Arrays; + +/** + * Samples for ScriptExecutions GetExecutionLogs. + */ +public final class ScriptExecutionsGetExecutionLogsSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_GetExecutionLogs.json + */ + /** + * Sample code: ScriptExecutions_GetExecutionLogs. + * + * @param manager Entry point to AvsManager. + */ + public static void scriptExecutionsGetExecutionLogs(com.azure.resourcemanager.avs.AvsManager manager) { + manager.scriptExecutions() + .getExecutionLogsWithResponse("group1", "cloud1", "addSsoServer", + Arrays.asList(ScriptOutputStreamType.INFORMATION, ScriptOutputStreamType.fromString("Warnings"), + ScriptOutputStreamType.fromString("Errors"), ScriptOutputStreamType.OUTPUT), + com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..bf38624b65e48 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for ScriptExecutions Get. + */ +public final class ScriptExecutionsGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/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); + } +} 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 new file mode 100644 index 0000000000000..5a1d7a66607cd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for ScriptExecutions List. + */ +public final class ScriptExecutionsListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_List.json + */ + /** + * Sample code: ScriptExecutions_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); + } +} 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 new file mode 100644 index 0000000000000..98629fafecf0e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for ScriptPackages Get. + */ +public final class ScriptPackagesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_Get.json + */ + /** + * Sample code: ScriptPackages_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void scriptPackagesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.scriptPackages() + .getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..d49cb339e8f2a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for ScriptPackages List. + */ +public final class ScriptPackagesListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_List.json + */ + /** + * Sample code: ScriptPackages_List. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..784edb01eafcc --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for VirtualMachines Get. + */ +public final class VirtualMachinesGetSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_Get.json + */ + /** + * Sample code: VirtualMachines_Get. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..0a83950edafc7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for VirtualMachines List. + */ +public final class VirtualMachinesListSamples { + /* + * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_List.json + */ + /** + * Sample code: VirtualMachines_List. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..60447a8fe5dfd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; +import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; + +/** + * Samples for VirtualMachines RestrictMovement. + */ +public final class VirtualMachinesRestrictMovementSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_RestrictMovement.json + */ + /** + * Sample code: VirtualMachines_RestrictMovement. + * + * @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); + } +} 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 2af63145f1c56..7942d907a1a65 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDhcpSamples { public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDhcp("dhcp1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") .withRevision(1L) .withServerAddress("40.1.5.1/24") 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 039e3bf951726..db65e3183bfeb 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateDnsServiceSamples { public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDnsService("dnsService1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("dnsService1") .withDnsServiceIp("5.5.5.5") .withDefaultDnsZone("defaultDnsZone1") 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 61c8eec0e76c7..2ce9039aa855c 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDnsZoneSamples { public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDnsZone("dnsZone1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("dnsZone1") .withDomain(Arrays.asList()) .withDnsServerIps(Arrays.asList("1.1.1.1")) 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 6713e2bb7b07d..254f01f339d8f 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreatePortMirroringSamples { public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .definePortMirroring("portMirroring1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("portMirroring1") .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) .withSource("vmGroup1") 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 da74d012f6b37..614b73f06cdda 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 @@ -20,7 +20,7 @@ public final class WorkloadNetworksCreatePublicIPSamples { public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .definePublicIP("publicIP1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("publicIP1") .withNumberOfPublicIPs(32L) .create(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java index 5f3c5f1544e6f..ee83f47100613 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateSegmentSamples { public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineSegment("segment1") - .withExistingWorkloadNetwork("group1", "cloud1", null) + .withExistingPrivateCloud("group1", "cloud1") .withDisplayName("segment1") .withConnectedGateway("/infra/tier-1s/gateway") .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) 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 fb88b1d1afe59..76ee167004457 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 @@ -18,9 +18,6 @@ public final class WorkloadNetworksCreateVMGroupSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks() - .defineVMGroup("vmGroup1") - .withExistingWorkloadNetwork("group1", "cloud1", null) - .create(); + manager.workloadNetworks().defineVMGroup("vmGroup1").withExistingPrivateCloud("group1", "cloud1").create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java index 5553da7d7fd1e..a0136f0a77906 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksDeleteDhcpSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().deleteDhcp("group1", "cloud1", null, "dhcp1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDhcp("group1", "cloud1", "dhcp1", com.azure.core.util.Context.NONE); } } 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 7106a8fddc881..a881d250b2612 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 @@ -18,7 +18,6 @@ public final class WorkloadNetworksDeleteSegmentSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks() - .deleteSegment("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteSegment("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java index 7282bd96a4288..a3c3bd7bcb5f4 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 @@ -19,6 +19,6 @@ public final class WorkloadNetworksGetDnsServiceSamples { */ public static void workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE); + .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java index 3c28c0ed357b3..7468c4b6d09c2 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 @@ -19,6 +19,6 @@ public final class WorkloadNetworksGetDnsZoneSamples { */ public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE); + .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java index 0e288411efcd8..9764bbf374593 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 @@ -19,6 +19,6 @@ public final class WorkloadNetworksGetGatewaySamples { */ public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getGatewayWithResponse("group1", "cloud1", null, "gateway1", com.azure.core.util.Context.NONE); + .getGatewayWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java index 970ff00057f66..7bbfab2540c2e 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 @@ -19,6 +19,6 @@ public final class WorkloadNetworksGetPortMirroringSamples { */ public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE); + .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPSamples.java index d4fc24c1ebd15..4f8c1c88ede1c 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 @@ -19,6 +19,6 @@ public final class WorkloadNetworksGetPublicIPSamples { */ public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getPublicIPWithResponse("group1", "cloud1", null, "publicIP1", com.azure.core.util.Context.NONE); + .getPublicIPWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java index 106116b58401c..330f7c14d3f16 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 @@ -17,6 +17,6 @@ public final class WorkloadNetworksGetSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().getWithResponse("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java index 3f183d9726930..b869e28121648 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 @@ -19,6 +19,6 @@ public final class WorkloadNetworksGetSegmentSamples { */ public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); + .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java index 54d05bb8027a8..c5fe6c5436e11 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 @@ -19,6 +19,6 @@ public final class WorkloadNetworksGetVMGroupSamples { */ public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE); + .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java index c9c34d31974b1..1ffc781982ded 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 @@ -19,6 +19,6 @@ public final class WorkloadNetworksGetVirtualMachineSamples { */ public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getVirtualMachineWithResponse("group1", "cloud1", null, "vm1", com.azure.core.util.Context.NONE); + .getVirtualMachineWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java index 0f98aabb32a3f..d6aa6028e7b61 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksListDhcpSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDhcp("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listDhcp("group1", "cloud1", com.azure.core.util.Context.NONE); } } 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 eb274f9b77e5d..ccc7aba5d323c 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksListDnsServicesSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDnsServices("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listDnsServices("group1", "cloud1", com.azure.core.util.Context.NONE); } } 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 4bfbf1d8ed0e5..ae4a063c9f614 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksListDnsZonesSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDnsZones("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listDnsZones("group1", "cloud1", com.azure.core.util.Context.NONE); } } 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 1c30ef32e2a78..0a44150ae976b 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksListGatewaysSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listGateways("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listGateways("group1", "cloud1", com.azure.core.util.Context.NONE); } } 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 5d5f43cfa013f..a8ff0a1586959 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksListPortMirroringSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listPortMirroring("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listPortMirroring("group1", "cloud1", com.azure.core.util.Context.NONE); } } 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 aecad5d090f57..167687973fdb1 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksListPublicIPsSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listPublicIPs("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listPublicIPs("group1", "cloud1", com.azure.core.util.Context.NONE); } } 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 b8e1b29a15e33..0e8c5a2c73704 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksListSegmentsSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listSegments("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listSegments("group1", "cloud1", com.azure.core.util.Context.NONE); } } 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 9a0084b4e8cdd..8344435748828 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksListVMGroupsSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listVMGroups("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listVMGroups("group1", "cloud1", com.azure.core.util.Context.NONE); } } 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 06d0467a2808b..ec6af352fa6e7 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 @@ -18,6 +18,6 @@ public final class WorkloadNetworksListVirtualMachinesSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listVirtualMachines("group1", "cloud1", null, com.azure.core.util.Context.NONE); + manager.workloadNetworks().listVirtualMachines("group1", "cloud1", com.azure.core.util.Context.NONE); } } 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 c2ebc87183805..dee30a4fc79d8 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksUpdateDnsServiceSamples { */ public static void workloadNetworksUpdateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkDnsService resource = manager.workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE) + .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsService1") 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 1b55db56dcb41..58d7a4f11ca07 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksUpdateDnsZoneSamples { */ public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkDnsZone resource = manager.workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE) + .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsZone1") 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 fb4b28bdcfaab..a104f86d757af 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksUpdatePortMirroringSamples { */ public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkPortMirroring resource = manager.workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE) + .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java index a0c9ac73d64d8..f6e23c523516a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java @@ -21,7 +21,7 @@ public final class WorkloadNetworksUpdateSegmentSamples { */ public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkSegment resource = manager.workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE) + .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java index 1c41d67c723f8..6bf6950349e74 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksUpdateVMGroupSamples { */ public static void workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkVMGroup resource = manager.workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE) + .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java index 6f83330019136..fc9ad39c0d99a 100644 --- 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 @@ -12,15 +12,15 @@ public final class AddonArcPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonArcProperties model - = BinaryData.fromString("{\"addonType\":\"Arc\",\"vCenter\":\"hxw\",\"provisioningState\":\"Succeeded\"}") + = BinaryData.fromString("{\"addonType\":\"Arc\",\"vCenter\":\"sz\",\"provisioningState\":\"Succeeded\"}") .toObject(AddonArcProperties.class); - Assertions.assertEquals("hxw", model.vCenter()); + Assertions.assertEquals("sz", model.vCenter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonArcProperties model = new AddonArcProperties().withVCenter("hxw"); + AddonArcProperties model = new AddonArcProperties().withVCenter("sz"); model = BinaryData.fromObject(model).toObject(AddonArcProperties.class); - Assertions.assertEquals("hxw", model.vCenter()); + Assertions.assertEquals("sz", 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 index b5ec19a965364..9dab1f86e4f5c 100644 --- 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 @@ -12,15 +12,15 @@ public final class AddonHcxPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonHcxProperties model - = BinaryData.fromString("{\"addonType\":\"HCX\",\"offer\":\"bzpfzab\",\"provisioningState\":\"Failed\"}") + = BinaryData.fromString("{\"addonType\":\"HCX\",\"offer\":\"jervtia\",\"provisioningState\":\"Failed\"}") .toObject(AddonHcxProperties.class); - Assertions.assertEquals("bzpfzab", model.offer()); + Assertions.assertEquals("jervtia", model.offer()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonHcxProperties model = new AddonHcxProperties().withOffer("bzpfzab"); + AddonHcxProperties model = new AddonHcxProperties().withOffer("jervtia"); model = BinaryData.fromObject(model).toObject(AddonHcxProperties.class); - Assertions.assertEquals("bzpfzab", model.offer()); + Assertions.assertEquals("jervtia", 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 index e2eecf1a228ef..e01043bc81917 100644 --- 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 @@ -12,7 +12,7 @@ public final class AddonInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonInner model = BinaryData.fromString( - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"jancu\",\"name\":\"rhdwbavxbniw\",\"type\":\"jswztsdbpg\"}") + "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"rodtjinfwjlfl\",\"name\":\"kacjvefkdlfo\",\"type\":\"kggkfpa\"}") .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 index fc8929eac5850..532901e961325 100644 --- 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 @@ -12,8 +12,8 @@ public final class AddonListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"ankxmyskpbhenb\",\"name\":\"kcxywnyt\",\"type\":\"rsyn\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"by\",\"name\":\"czfc\",\"type\":\"haaxdbabphl\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Cancelled\"},\"id\":\"ktsthsucocmny\",\"name\":\"azt\",\"type\":\"bt\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"uedck\",\"name\":\"ywbiexzfeyueax\",\"type\":\"bxu\"}],\"nextLink\":\"bhqwalmuzyoxa\"}") + "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Cancelled\"},\"id\":\"kqb\",\"name\":\"qu\",\"type\":\"paxh\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"ivpdtiir\",\"name\":\"tdqoaxoruzfgsq\",\"type\":\"yfxrx\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"ramxjezwlwnw\",\"name\":\"uqlcvydy\",\"type\":\"atdooaojkniod\"}],\"nextLink\":\"oebwnujhemms\"}") .toObject(AddonList.class); - Assertions.assertEquals("bhqwalmuzyoxa", model.nextLink()); + Assertions.assertEquals("oebwnujhemms", 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 index b74cc70828d46..984df8afb9dad 100644 --- 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 @@ -11,7 +11,7 @@ public final class AddonPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonProperties model - = BinaryData.fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Building\"}") + = BinaryData.fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"}") .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 index 6029f4e9f425a..a83ae07bf20bf 100644 --- 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 @@ -11,16 +11,16 @@ public final class AddonVrPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AddonVrProperties model = BinaryData - .fromString("{\"addonType\":\"VR\",\"vrsCount\":1275335894,\"provisioningState\":\"Succeeded\"}") - .toObject(AddonVrProperties.class); - Assertions.assertEquals(1275335894, model.vrsCount()); + AddonVrProperties model + = BinaryData.fromString("{\"addonType\":\"VR\",\"vrsCount\":1554130145,\"provisioningState\":\"Deleting\"}") + .toObject(AddonVrProperties.class); + Assertions.assertEquals(1554130145, model.vrsCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonVrProperties model = new AddonVrProperties().withVrsCount(1275335894); + AddonVrProperties model = new AddonVrProperties().withVrsCount(1554130145); model = BinaryData.fromObject(model).toObject(AddonVrProperties.class); - Assertions.assertEquals(1275335894, model.vrsCount()); + Assertions.assertEquals(1554130145, 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 new file mode 100644 index 0000000000000..3ba074494e4af --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"fifhxwrsnew\",\"name\":\"ozqvbubqmam\",\"type\":\"sycxhxzgaz\"}"; + + 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("ogphuartvtiu") + .withExistingPrivateCloud("foiyjwpfilk", "kkholvdndvia") + .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 new file mode 100644 index 0000000000000..04c57c6263fb4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("xoe", "qinjipnwjf", "jqlafcbahhpzp", 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 new file mode 100644 index 0000000000000..40c81c46b64b6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Updating\"},\"id\":\"wjedmurrxxgew\",\"name\":\"ktvqylkmqpzoy\",\"type\":\"lfbcgwgcl\"}"; + + 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("dkvgfabuiyjibuzp", "dugneiknp", "oxgjiuqhibt", 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 new file mode 100644 index 0000000000000..04e1a79b9d16b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Cancelled\"},\"id\":\"swvxwlmzqwmv\",\"name\":\"xnjmxm\",\"type\":\"uqudtcvclxyn\"}]}"; + + 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("vmribiat", "gplucfotangcfhny", 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 new file mode 100644 index 0000000000000..b87cca7611437 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("jrajcivm", "ghfcfiwrxgkneuvy", "nzqodfvpg", com.azure.core.util.Context.NONE); + + } +} 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 index 07b525e0f8c0d..db8cd6890a4e4 100644 --- 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 @@ -12,15 +12,15 @@ public final class CloudLinkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Deleting\",\"linkedCloud\":\"rgvtqag\"},\"id\":\"uynhijg\",\"name\":\"mebf\",\"type\":\"iarbutrcvpna\"}") + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Deleting\",\"linkedCloud\":\"vayffimrzrt\"},\"id\":\"qogsexnevfd\",\"name\":\"wnwmewzs\",\"type\":\"yceuzsoib\"}") .toObject(CloudLinkInner.class); - Assertions.assertEquals("rgvtqag", model.linkedCloud()); + Assertions.assertEquals("vayffimrzrt", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkInner model = new CloudLinkInner().withLinkedCloud("rgvtqag"); + CloudLinkInner model = new CloudLinkInner().withLinkedCloud("vayffimrzrt"); model = BinaryData.fromObject(model).toObject(CloudLinkInner.class); - Assertions.assertEquals("rgvtqag", model.linkedCloud()); + Assertions.assertEquals("vayffimrzrt", 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 index 55d540f1fdff7..959612d1c009c 100644 --- 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 @@ -12,9 +12,9 @@ public final class CloudLinkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Active\",\"linkedCloud\":\"mpvecxgodebfqk\"},\"id\":\"bmpukgriwflz\",\"name\":\"fbxzpuzycisp\",\"type\":\"qzahmgkbrp\"}],\"nextLink\":\"dhibnuq\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Failed\",\"linkedCloud\":\"tcs\"},\"id\":\"cktqumiekkezzi\",\"name\":\"hlyfjhdgqgg\",\"type\":\"bdunygaeqid\"},{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Disconnected\",\"linkedCloud\":\"llrxcyjmoad\"},\"id\":\"varmywdmj\",\"name\":\"jqbjhhy\",\"type\":\"xrwlyc\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Disconnected\",\"linkedCloud\":\"kgymareqnajxqug\"},\"id\":\"ky\",\"name\":\"ubeddg\",\"type\":\"sofwqmzqalkrmnji\"}],\"nextLink\":\"xacqqudfnbyx\"}") .toObject(CloudLinkList.class); - Assertions.assertEquals("mpvecxgodebfqk", model.value().get(0).linkedCloud()); - Assertions.assertEquals("dhibnuq", model.nextLink()); + Assertions.assertEquals("tcs", model.value().get(0).linkedCloud()); + Assertions.assertEquals("xacqqudfnbyx", 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 index 85e2b65b0da1c..b4f81c7d08f86 100644 --- 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 @@ -12,15 +12,15 @@ public final class CloudLinkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkProperties model = BinaryData - .fromString("{\"provisioningState\":\"Failed\",\"status\":\"Deleting\",\"linkedCloud\":\"unmpxttd\"}") + .fromString("{\"provisioningState\":\"Succeeded\",\"status\":\"Disconnected\",\"linkedCloud\":\"xtrthz\"}") .toObject(CloudLinkProperties.class); - Assertions.assertEquals("unmpxttd", model.linkedCloud()); + Assertions.assertEquals("xtrthz", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("unmpxttd"); + CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("xtrthz"); model = BinaryData.fromObject(model).toObject(CloudLinkProperties.class); - Assertions.assertEquals("unmpxttd", model.linkedCloud()); + Assertions.assertEquals("xtrthz", 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 new file mode 100644 index 0000000000000..e0632a8852e97 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Deleting\",\"linkedCloud\":\"iibakcl\"},\"id\":\"jfrnxousxauzlwv\",\"name\":\"gmwohqfzizvu\",\"type\":\"mmkjsvthnwpztek\"}"; + + 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("vkhlggdhbemz") + .withExistingPrivateCloud("kfvxcnq", "xqpswok") + .withLinkedCloud("iwtglxxhljfpg") + .create(); + + Assertions.assertEquals("iibakcl", 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 new file mode 100644 index 0000000000000..1ec44341e0ed5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("hgovfgp", "kqmhhaowjr", "zvuporqzdfuydz", 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 new file mode 100644 index 0000000000000..e20fa18dc661f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Building\",\"linkedCloud\":\"ubcpzgpxti\"},\"id\":\"j\",\"name\":\"nidibgqjxg\",\"type\":\"n\"}"; + + 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("nkvxlxpaglqi", "bgkc", "khpzvuqdflv", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("ubcpzgpxti", 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 new file mode 100644 index 0000000000000..de9ce779b9d2d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Failed\",\"status\":\"Building\",\"linkedCloud\":\"hckfkyjpmspbps\"},\"id\":\"fppyogtieyujtvcz\",\"name\":\"cnyxrxmunjd\",\"type\":\"vg\"}]}"; + + 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("xqszdtmaajquh", "xylrjvmtygjbmz", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hckfkyjpmspbps", response.iterator().next().linkedCloud()); + } +} 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 new file mode 100644 index 0000000000000..4adc81db767ca --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":687861741,\"provisioningState\":\"Succeeded\",\"clusterId\":1053518025,\"hosts\":[\"vluwmncsttij\",\"y\",\"vpo\"],\"vsanDatastoreName\":\"rsg\"},\"sku\":{\"name\":\"gbdhuzqgnjdg\",\"tier\":\"Premium\",\"size\":\"cli\",\"family\":\"zvhxnk\",\"capacity\":144563900},\"id\":\"u\",\"name\":\"otppnv\",\"type\":\"xz\"}"; + + 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("mlqtmldgxob") + .withExistingPrivateCloud("gzuriglaecxndt", "cokpv") + .withSku(new Sku().withName("fvjlboxqvkjlmx") + .withTier(SkuTier.FREE) + .withSize("ynhdwdigum") + .withFamily("raauzzpt") + .withCapacity(1518095696)) + .withClusterSize(1763053171) + .withHosts(Arrays.asList("ayzri")) + .withVsanDatastoreName("hya") + .create(); + + Assertions.assertEquals("gbdhuzqgnjdg", response.sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); + Assertions.assertEquals("cli", response.sku().size()); + Assertions.assertEquals("zvhxnk", response.sku().family()); + Assertions.assertEquals(144563900, response.sku().capacity()); + Assertions.assertEquals(687861741, response.clusterSize()); + Assertions.assertEquals("vluwmncsttij", response.hosts().get(0)); + Assertions.assertEquals("rsg", 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 new file mode 100644 index 0000000000000..b53342f54c418 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("ril", "zapeewchpx", "ktwkuziyc", 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 new file mode 100644 index 0000000000000..cc8f6a8a6854b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":1933240221,\"provisioningState\":\"Failed\",\"clusterId\":1386214001,\"hosts\":[\"ulapzwyrp\",\"ogtqxepnylbf\",\"ajlyjtlvofqzhv\",\"cib\"],\"vsanDatastoreName\":\"mowuxrk\"},\"sku\":{\"name\":\"pvdwxf\",\"tier\":\"Premium\",\"size\":\"vwzjbhyz\",\"family\":\"jrkambtrnegvmnv\",\"capacity\":531370640},\"id\":\"vldspa\",\"name\":\"tjb\",\"type\":\"kdmflvestmjlx\"}"; + + 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("xkzb", "msgeivsiykzk", "ncj", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("pvdwxf", response.sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); + Assertions.assertEquals("vwzjbhyz", response.sku().size()); + Assertions.assertEquals("jrkambtrnegvmnv", response.sku().family()); + Assertions.assertEquals(531370640, response.sku().capacity()); + Assertions.assertEquals(1933240221, response.clusterSize()); + Assertions.assertEquals("ulapzwyrp", response.hosts().get(0)); + Assertions.assertEquals("mowuxrk", 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 new file mode 100644 index 0000000000000..2569bc7d8aacb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":1426712657,\"provisioningState\":\"Cancelled\",\"clusterId\":128886656,\"hosts\":[\"l\",\"chp\",\"db\"],\"vsanDatastoreName\":\"vwrdnhfukuvsj\"},\"sku\":{\"name\":\"swsmys\",\"tier\":\"Premium\",\"size\":\"qypfcv\",\"family\":\"rchpqbmfpjbabwid\",\"capacity\":1095864620},\"id\":\"spuunnoxyhkxgq\",\"name\":\"drihpfhoqcaaewda\",\"type\":\"mdjvlpj\"}]}"; + + 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("n", "ntfpmvmemfnc", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("swsmys", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); + Assertions.assertEquals("qypfcv", response.iterator().next().sku().size()); + Assertions.assertEquals("rchpqbmfpjbabwid", response.iterator().next().sku().family()); + Assertions.assertEquals(1095864620, response.iterator().next().sku().capacity()); + Assertions.assertEquals(1426712657, response.iterator().next().clusterSize()); + Assertions.assertEquals("l", response.iterator().next().hosts().get(0)); + Assertions.assertEquals("vwrdnhfukuvsj", 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 new file mode 100644 index 0000000000000..3578bd3d3dea5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":[\"gl\",\"dzgkr\"],\"zone\":\"eevt\"},{\"hosts\":[\"r\"],\"zone\":\"t\"},{\"hosts\":[\"tpzdmovzvfvaawzq\"],\"zone\":\"f\"}]}"; + + 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("levufuztcktyhj", "qedcgzulwm", "rqzz", com.azure.core.util.Context.NONE) + .getValue(); + + } +} 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 new file mode 100644 index 0000000000000..143833b2880da --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"t\"},\"diskPoolVolume\":{\"targetId\":\"dslqxihhrmooizqs\",\"lunName\":\"ypxiutcxap\",\"mountOption\":\"MOUNT\",\"path\":\"petogebjox\"},\"elasticSanVolume\":{\"targetId\":\"hvnh\"},\"status\":\"Unknown\"},\"id\":\"q\",\"name\":\"kkzjcjbtrga\",\"type\":\"hvv\"}"; + + 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("teyowclu") + .withExistingCluster("cuplcplcwkhih", "hlhzdsqtzbsrgno", "cjhfgmvecactxmw") + .withNetAppVolume(new NetAppVolume().withId("qvgqouw")) + .withDiskPoolVolume(new DiskPoolVolume().withTargetId("zmpjwyiv") + .withLunName("ikf") + .withMountOption(MountOptionEnum.ATTACH)) + .withElasticSanVolume(new ElasticSanVolume().withTargetId("kteusqczk")) + .create(); + + Assertions.assertEquals("t", response.netAppVolume().id()); + Assertions.assertEquals("dslqxihhrmooizqs", response.diskPoolVolume().targetId()); + Assertions.assertEquals("ypxiutcxap", response.diskPoolVolume().lunName()); + Assertions.assertEquals(MountOptionEnum.MOUNT, response.diskPoolVolume().mountOption()); + Assertions.assertEquals("hvnh", 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 new file mode 100644 index 0000000000000..3be3a4c511f63 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("nbtgkbugrjqctoj", "mi", "of", "eypefojyqd", 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 new file mode 100644 index 0000000000000..cd551340a1ee0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"hycav\"},\"diskPoolVolume\":{\"targetId\":\"ggxdb\",\"lunName\":\"esmi\",\"mountOption\":\"ATTACH\",\"path\":\"ra\"},\"elasticSanVolume\":{\"targetId\":\"aawiuagydwqfb\"},\"status\":\"Detached\"},\"id\":\"fgiagtcojocqwo\",\"name\":\"fnzjvusfzldm\",\"type\":\"zuxylfsbtkadpyso\"}"; + + 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("fcjnaeoisrvhmgor", "fukiscvwmzhw", "lefaxvxilcbtgn", "nzeyqxtjj", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("hycav", response.netAppVolume().id()); + Assertions.assertEquals("ggxdb", response.diskPoolVolume().targetId()); + Assertions.assertEquals("esmi", response.diskPoolVolume().lunName()); + Assertions.assertEquals(MountOptionEnum.ATTACH, response.diskPoolVolume().mountOption()); + Assertions.assertEquals("aawiuagydwqfb", 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 new file mode 100644 index 0000000000000..aedf1e64269c0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Failed\",\"netAppVolume\":{\"id\":\"nysuxmprafwgckh\"},\"diskPoolVolume\":{\"targetId\":\"xvd\",\"lunName\":\"ffwafq\",\"mountOption\":\"ATTACH\",\"path\":\"aspavehhr\"},\"elasticSanVolume\":{\"targetId\":\"bunzozudh\"},\"status\":\"DeadOrError\"},\"id\":\"moy\",\"name\":\"cdyuibhmfdnbzyd\",\"type\":\"f\"}]}"; + + 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("hihfrbbcevqagtlt", "hlfkqojpy", "vgtrdcnifmzzs", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("nysuxmprafwgckh", response.iterator().next().netAppVolume().id()); + Assertions.assertEquals("xvd", response.iterator().next().diskPoolVolume().targetId()); + Assertions.assertEquals("ffwafq", response.iterator().next().diskPoolVolume().lunName()); + Assertions.assertEquals(MountOptionEnum.ATTACH, response.iterator().next().diskPoolVolume().mountOption()); + Assertions.assertEquals("bunzozudh", response.iterator().next().elasticSanVolume().targetId()); + } +} 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 new file mode 100644 index 0000000000000..47232aba946a1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("hyuemslyn", "qyrp", "oobrlttyms", 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 new file mode 100644 index 0000000000000..e6d7606867a65 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("j", "uktalhsnvkcdmxz", "poaimlnwiaaomyl", 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 index 5582cd1018cfd..563c4efc19b22 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"ufoxc\"},\"id\":\"opidoamciodh\",\"name\":\"haz\",\"type\":\"khnzbonlw\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"networkBlock\":\"kjprvk\"},\"id\":\"fz\",\"name\":\"ljyxgtczhe\",\"type\":\"dbsdshm\"}") .toObject(IscsiPathInner.class); - Assertions.assertEquals("ufoxc", model.networkBlock()); + Assertions.assertEquals("kjprvk", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathInner model = new IscsiPathInner().withNetworkBlock("ufoxc"); + IscsiPathInner model = new IscsiPathInner().withNetworkBlock("kjprvk"); model = BinaryData.fromObject(model).toObject(IscsiPathInner.class); - Assertions.assertEquals("ufoxc", model.networkBlock()); + Assertions.assertEquals("kjprvk", 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 index 1a84e128943f9..489c2c71d2501 100644 --- 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 @@ -12,9 +12,9 @@ public final class IscsiPathListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Pending\",\"networkBlock\":\"n\"},\"id\":\"rudsg\",\"name\":\"a\",\"type\":\"mkycgra\"},{\"properties\":{\"provisioningState\":\"Building\",\"networkBlock\":\"etaebu\"},\"id\":\"vdmovsmzlxwabm\",\"name\":\"oefki\",\"type\":\"rvtp\"},{\"properties\":{\"provisioningState\":\"Building\",\"networkBlock\":\"mqlgk\"},\"id\":\"tndoaongbjc\",\"name\":\"tujitcjedft\",\"type\":\"waezkojvd\"}],\"nextLink\":\"zfoqouicybxar\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"mvikl\"},\"id\":\"dvk\",\"name\":\"bejdznxcv\",\"type\":\"srhnjivo\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"ovqfzge\"},\"id\":\"dftuljltduce\",\"name\":\"mtmczuome\",\"type\":\"wcw\"}],\"nextLink\":\"ioknssxmoj\"}") .toObject(IscsiPathListResult.class); - Assertions.assertEquals("n", model.value().get(0).networkBlock()); - Assertions.assertEquals("zfoqouicybxar", model.nextLink()); + Assertions.assertEquals("mvikl", model.value().get(0).networkBlock()); + Assertions.assertEquals("ioknssxmoj", 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 index 7872b097ba5ba..db8a538a1cd77 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathProperties model - = BinaryData.fromString("{\"provisioningState\":\"Canceled\",\"networkBlock\":\"egokdwbwhkszzcmr\"}") + = BinaryData.fromString("{\"provisioningState\":\"Building\",\"networkBlock\":\"aehvbbxuri\"}") .toObject(IscsiPathProperties.class); - Assertions.assertEquals("egokdwbwhkszzcmr", model.networkBlock()); + Assertions.assertEquals("aehvbbxuri", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("egokdwbwhkszzcmr"); + IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("aehvbbxuri"); model = BinaryData.fromObject(model).toObject(IscsiPathProperties.class); - Assertions.assertEquals("egokdwbwhkszzcmr", model.networkBlock()); + Assertions.assertEquals("aehvbbxuri", 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 new file mode 100644 index 0000000000000..b7c94847759b1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"qyzqedikdfrdb\"},\"id\":\"mrjgeihfqlggwfi\",\"name\":\"zcxmjpbyep\",\"type\":\"mgtvlj\"}"; + + 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("sbbjpmcu", "kmifoxxkub", new IscsiPathInner().withNetworkBlock("v"), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qyzqedikdfrdb", 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 new file mode 100644 index 0000000000000..9f64e3eed2b27 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("rc", "yfqi", 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 new file mode 100644 index 0000000000000..3267bd12311ab --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"qlkccuzgygqwaho\"},\"id\":\"lwgniiprglvawu\",\"name\":\"z\",\"type\":\"ufypiv\"}"; + + 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("e", "dptjgwdtgukranb", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals("qlkccuzgygqwaho", 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 new file mode 100644 index 0000000000000..a1e25d8971756 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Canceled\",\"networkBlock\":\"lrmymyincqlhri\"},\"id\":\"sl\",\"name\":\"iiiovgqcgxuugq\",\"type\":\"ctotiowlx\"}]}"; + + 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("j", "emmucfxh", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("lrmymyincqlhri", 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 new file mode 100644 index 0000000000000..f617dc3425cf2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":{\"vyvnqqyb\":382394727},\"quotaEnabled\":\"Enabled\"}"; + + 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("orfmluiqt", 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 new file mode 100644 index 0000000000000..313c8a65432be --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"TrialUsed\",\"availableHosts\":1122494487}"; + + 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("dlwwqfbumlkxt", + new Sku().withName("qjfsmlmbtxhw") + .withTier(SkuTier.FREE) + .withSize("rtawcoezb") + .withFamily("ubskhudygoookkq") + .withCapacity(280222728), + com.azure.core.util.Context.NONE) + .getValue(); + + } +} 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 new file mode 100644 index 0000000000000..0df2cf6cdc7a5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ActionType; +import com.azure.resourcemanager.avs.models.Operation; +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 OperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"name\":\"tfnhtbaxkgxywr\",\"isDataAction\":true,\"display\":{\"provider\":\"lyhpluodpvruud\",\"resource\":\"zibt\",\"operation\":\"stgktst\",\"description\":\"xeclzedqbcvhzlhp\"},\"origin\":\"system\",\"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); + + Assertions.assertEquals(ActionType.INTERNAL, response.iterator().next().actionType()); + } +} 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 new file mode 100644 index 0000000000000..a144f64201283 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Disabled\",\"displayName\":\"fdjktsysidfvclgl\",\"provisioningState\":\"Succeeded\"},\"id\":\"ijtk\",\"name\":\"usqogsfikayia\",\"type\":\"sharujtj\"}"; + + 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("dirazf") + .withExistingCluster("tdtpdelqacslmo", "oebn", "xofvcjk") + .withProperties( + new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("ab")) + .create(); + + Assertions.assertEquals(PlacementPolicyState.DISABLED, response.properties().state()); + Assertions.assertEquals("fdjktsysidfvclgl", 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 new file mode 100644 index 0000000000000..1028e52b134db --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("eqacjjvpilguooq", "agmdit", "ueio", "kjbsah", 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 new file mode 100644 index 0000000000000..92947d11d8512 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"lqbctqhamzjrw\",\"provisioningState\":\"Canceled\"},\"id\":\"eqyj\",\"name\":\"eziunjxdfzant\",\"type\":\"wcegyamlbn\"}"; + + 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("jqatucoigebxn", "nwfepbnwg", "m", "jgcgbjbgdlfgtdys", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); + Assertions.assertEquals("lqbctqhamzjrw", 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 new file mode 100644 index 0000000000000..2683a265525af --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"uhxu\",\"provisioningState\":\"Canceled\"},\"id\":\"ewmrswnjlxu\",\"name\":\"rhwpus\",\"type\":\"jbaqehgpdoh\"}]}"; + + 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("vidttgepuslvyjt", "vuwkasiziesfuugh", "uqfecj", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PlacementPolicyState.DISABLED, response.iterator().next().properties().state()); + Assertions.assertEquals("uhxu", 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 index 3c64dba063b69..812ec7103817d 100644 --- 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 @@ -13,10 +13,10 @@ public final class PlacementPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"kdeemaofmxagkvtm\",\"provisioningState\":\"Failed\"},\"id\":\"krh\",\"name\":\"hvljuahaquh\",\"type\":\"dhmdua\"}],\"nextLink\":\"exq\"}") + "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"wyznkbyku\",\"provisioningState\":\"Deleting\"},\"id\":\"hpagm\",\"name\":\"r\",\"type\":\"kdsnfdsdoakgtdl\"}],\"nextLink\":\"kzevdlhewpusds\"}") .toObject(PlacementPoliciesList.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.value().get(0).properties().state()); - Assertions.assertEquals("kdeemaofmxagkvtm", model.value().get(0).properties().displayName()); - Assertions.assertEquals("exq", model.nextLink()); + Assertions.assertEquals("wyznkbyku", model.value().get(0).properties().displayName()); + Assertions.assertEquals("kzevdlhewpusds", 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 index a73cdd2edb51e..b2f59ceaa089b 100644 --- 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 @@ -14,18 +14,18 @@ public final class PlacementPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"mwsrcrgvxpvgo\",\"provisioningState\":\"Updating\"},\"id\":\"misgwbnb\",\"name\":\"e\",\"type\":\"dawkzbali\"}") + "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"gvbbejdcng\",\"provisioningState\":\"Deleting\"},\"id\":\"akufgmjz\",\"name\":\"wr\",\"type\":\"grtwae\"}") .toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); - Assertions.assertEquals("mwsrcrgvxpvgo", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); + Assertions.assertEquals("gvbbejdcng", model.properties().displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyInner model = new PlacementPolicyInner().withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("mwsrcrgvxpvgo")); + new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("gvbbejdcng")); model = BinaryData.fromObject(model).toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); - Assertions.assertEquals("mwsrcrgvxpvgo", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); + Assertions.assertEquals("gvbbejdcng", 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 index b1d6ade40407f..2649024e7c2cb 100644 --- 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 @@ -13,18 +13,18 @@ public final class PlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"hakauhashsf\",\"provisioningState\":\"Building\"}") + "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"kopbminrf\",\"provisioningState\":\"Canceled\"}") .toObject(PlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("hakauhashsf", model.displayName()); + Assertions.assertEquals("kopbminrf", model.displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyProperties model - = new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("hakauhashsf"); + = new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("kopbminrf"); model = BinaryData.fromObject(model).toObject(PlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("hakauhashsf", model.displayName()); + Assertions.assertEquals("kopbminrf", 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 index 25b7682321511..89896d66e5826 100644 --- 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 @@ -16,28 +16,28 @@ public final class PlacementPolicyUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdateProperties model = BinaryData.fromString( - "{\"state\":\"Disabled\",\"vmMembers\":[\"lrbpbewtghfgbl\",\"gw\",\"zvlvqhjkbegib\"],\"hostMembers\":[\"xiebwwaloayqcg\",\"rtzju\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}") + "{\"state\":\"Enabled\",\"vmMembers\":[\"lfeadcygq\"],\"hostMembers\":[\"hejhzisx\",\"fpel\",\"lppvksrpq\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"None\"}") .toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("lrbpbewtghfgbl", model.vmMembers().get(0)); - Assertions.assertEquals("xiebwwaloayqcg", model.hostMembers().get(0)); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("lfeadcygq", model.vmMembers().get(0)); + Assertions.assertEquals("hejhzisx", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); + Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyUpdateProperties model - = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.DISABLED) - .withVmMembers(Arrays.asList("lrbpbewtghfgbl", "gw", "zvlvqhjkbegib")) - .withHostMembers(Arrays.asList("xiebwwaloayqcg", "rtzju")) + = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.ENABLED) + .withVmMembers(Arrays.asList("lfeadcygq")) + .withHostMembers(Arrays.asList("hejhzisx", "fpel", "lppvksrpq")) .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); + .withAzureHybridBenefitType(AzureHybridBenefitType.NONE); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("lrbpbewtghfgbl", model.vmMembers().get(0)); - Assertions.assertEquals("xiebwwaloayqcg", model.hostMembers().get(0)); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); + Assertions.assertEquals("lfeadcygq", model.vmMembers().get(0)); + Assertions.assertEquals("hejhzisx", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); + Assertions.assertEquals(AzureHybridBenefitType.NONE, 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 index 600d871dc3cc9..f5dfd57f44288 100644 --- 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 @@ -16,27 +16,27 @@ public final class PlacementPolicyUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdate model = BinaryData.fromString( - "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"klwndnhjdauwhv\",\"l\"],\"hostMembers\":[\"tdhxujznbmpowuwp\",\"zqlveualupjmkhf\",\"obbc\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\"}}") + "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"msweypqwdxggicc\",\"n\",\"qhuexm\"],\"hostMembers\":[\"lstvlzywe\",\"hz\",\"ncsdtclusiyp\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}}") .toObject(PlacementPolicyUpdate.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("klwndnhjdauwhv", model.vmMembers().get(0)); - Assertions.assertEquals("tdhxujznbmpowuwp", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); + Assertions.assertEquals("msweypqwdxggicc", model.vmMembers().get(0)); + Assertions.assertEquals("lstvlzywe", 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 { PlacementPolicyUpdate model = new PlacementPolicyUpdate().withState(PlacementPolicyState.ENABLED) - .withVmMembers(Arrays.asList("klwndnhjdauwhv", "l")) - .withHostMembers(Arrays.asList("tdhxujznbmpowuwp", "zqlveualupjmkhf", "obbc")) - .withAffinityStrength(AffinityStrength.SHOULD) + .withVmMembers(Arrays.asList("msweypqwdxggicc", "n", "qhuexm")) + .withHostMembers(Arrays.asList("lstvlzywe", "hz", "ncsdtclusiyp")) + .withAffinityStrength(AffinityStrength.MUST) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdate.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("klwndnhjdauwhv", model.vmMembers().get(0)); - Assertions.assertEquals("tdhxujznbmpowuwp", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); + Assertions.assertEquals("msweypqwdxggicc", model.vmMembers().get(0)); + Assertions.assertEquals("lstvlzywe", 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/PrivateCloudsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java new file mode 100644 index 0000000000000..145be9812bdc5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("owzfttsttkt", "ahbqactxtgzuk", com.azure.core.util.Context.NONE); + + } +} 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 index f70d02327ead1..607e7710d1c35 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptCmdletInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"tdbhhxsrzdzu\",\"timeout\":\"rsc\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"wjmy\",\"description\":\"dsslswt\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Bool\",\"name\":\"pyqs\",\"description\":\"wab\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"h\",\"description\":\"plvwiwubmwmbes\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"tppjflcx\",\"name\":\"gaokonzmnsikv\",\"type\":\"kqze\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"ujxukndxd\",\"timeout\":\"rjguufzdmsyqtf\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"String\",\"name\":\"ingamvp\",\"description\":\"o\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"qamvdkfwynwcvtbv\",\"description\":\"yhmtnvyqiat\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"zcjaesgvvsccy\",\"description\":\"g\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Bool\",\"name\":\"lvdnkfx\",\"description\":\"emdwzrmuhapfc\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"qvpsvuoymg\",\"name\":\"celve\",\"type\":\"rypqlmfeo\"}") .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 index c92df1128224d..dd91bd4e542b0 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptCmdletPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"description\":\"l\",\"timeout\":\"zxmhhvhgu\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"dagxtibqd\",\"description\":\"xwak\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"kzgxhurip\",\"description\":\"podxunkb\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"ntwlrbqtkoie\",\"description\":\"eotg\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]}") + "{\"provisioningState\":\"Failed\",\"description\":\"wkyhkobopgxe\",\"timeout\":\"owepbqpcrfkb\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"dw\",\"description\":\"p\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]}") .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 new file mode 100644 index 0000000000000..0ce8b4364f000 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"vudb\",\"timeout\":\"aqdtvqecrqctmxxd\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"ytxzvtznapxbanno\",\"description\":\"oxczytp\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"vytlyokrrrouuxvn\",\"description\":\"sbcrymodizrxklo\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"kml\",\"description\":\"evfxzopjhbzxlioh\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"gxqbawpcb\",\"name\":\"nzqcy\",\"type\":\"napqo\"}"; + + 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("lcqxypokk", "minqcym", "zng", "bdxxe", 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 new file mode 100644 index 0000000000000..7e3093b95e1e7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"arfdlpukhpyrnei\",\"timeout\":\"cpeogkhnmgbrou\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"fpazjzoywjxhpd\",\"description\":\"ontacnpq\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"String\",\"name\":\"rhrljyoogwxhn\",\"description\":\"uug\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"rfqkfuar\",\"name\":\"nlvhhtklnvnafvv\",\"type\":\"yfedevjbo\"}]}"; + + 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("kzmkwklsnoxaxmqe", "alhhjnhgwydyynfs", "khgb", 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 index 4208c68360a8c..a924ce6c52659 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptCmdletsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"t\",\"timeout\":\"aqtdoqmcbx\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"String\",\"name\":\"bhsfxob\",\"description\":\"tkblmpewww\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"vshqjohxcr\",\"description\":\"fovasr\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"fsubcgjbirxbpy\",\"description\":\"rfbjf\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"t\",\"name\":\"tpvjzbexilzznfqq\",\"type\":\"vwpm\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"oujmkcjhwqytj\",\"timeout\":\"bnw\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"rvnaenqpeh\",\"description\":\"doy\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"d\",\"description\":\"sl\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"String\",\"name\":\"nduhavhqlkthum\",\"description\":\"olbgycduiertgccy\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"lqlfm\",\"description\":\"n\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"swiydmcwyhzdx\",\"name\":\"sadbz\",\"type\":\"nvdfznuda\"}],\"nextLink\":\"vxzbncb\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"bbqwrvtldg\",\"timeout\":\"pgvmpipaslthaqfx\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"dsrezpdrhneuyow\",\"description\":\"d\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"bi\",\"name\":\"cgpik\",\"type\":\"zimejzanlfzx\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"bzonok\",\"timeout\":\"rjqc\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"azszrnwoiindfpw\",\"description\":\"ylwbtlhflsjcdhsz\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"eljag\",\"description\":\"mqhldvrii\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"ghfkvtvsexs\",\"name\":\"wueluqhhahhxv\",\"type\":\"hmzk\"}],\"nextLink\":\"jgwwspughftq\"}") .toObject(ScriptCmdletsList.class); - Assertions.assertEquals("vxzbncb", model.nextLink()); + Assertions.assertEquals("jgwwspughftq", 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 index c6a8f9831f392..3546c3688a252 100644 --- 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 @@ -17,41 +17,40 @@ public final class ScriptExecutionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionInner model = BinaryData.fromString( - "{\"properties\":{\"scriptCmdletId\":\"itc\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"cktqumiekkezzi\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hlyfjhdgqgg\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"bdunygaeqid\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"atpxl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rxcyjmoad\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"uvarmywdmjsjq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"jhhyxxrwlycoduhp\"}],\"failureReason\":\"kgymareqnajxqug\",\"timeout\":\"hky\",\"retention\":\"beddgssofw\",\"submittedAt\":\"2021-08-12T00:48:32Z\",\"startedAt\":\"2021-09-09T11:18:40Z\",\"finishedAt\":\"2021-02-22T22:05:21Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"i\",\"pxacqqudfn\"],\"namedOutputs\":{\"baaa\":{},\"jyvayffimrzrtuz\":{},\"ogs\":{}},\"information\":[\"evfdnwnwm\",\"wzsyyceuzs\"],\"warnings\":[\"judpfrxt\",\"thzvaytdwkqbrqu\",\"paxh\",\"xiilivpdtiirqt\"],\"errors\":[\"axoruzfgsquy\",\"xrxxlep\",\"ramxjezwlwnw\"]},\"id\":\"qlcvydy\",\"name\":\"atdooaojkniod\",\"type\":\"oo\"}") + "{\"properties\":{\"scriptCmdletId\":\"wct\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"zj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"uu\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"lwg\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ytsbwtovv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gseinq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"iufxqknpir\"}],\"failureReason\":\"epttwqmsniff\",\"timeout\":\"dmqnrojlpij\",\"retention\":\"rxfrddhc\",\"submittedAt\":\"2021-06-05T19:19:34Z\",\"startedAt\":\"2021-09-16T04:19:40Z\",\"finishedAt\":\"2021-03-09T16:30:01Z\",\"provisioningState\":\"Failed\",\"output\":[\"xi\",\"tozqyzhftwesgo\"],\"namedOutputs\":{\"honnxkrlgnyhmos\":{},\"xkk\":{},\"thrrgh\":{},\"jbdhqxvc\":{}},\"information\":[\"rpdsof\",\"shrnsvbuswdvz\",\"ybycnunvj\",\"rtkfawnopq\"],\"warnings\":[\"yzirtxdyuxzejn\",\"psew\",\"ioilqukrydxtq\"],\"errors\":[\"ox\",\"rgguf\",\"yaomtb\",\"hhavgrvkffovjz\"]},\"id\":\"jbibg\",\"name\":\"mfxumvfcluyovw\",\"type\":\"nbkfezzxscy\"}") .toObject(ScriptExecutionInner.class); - Assertions.assertEquals("itc", model.scriptCmdletId()); - Assertions.assertEquals("cktqumiekkezzi", model.parameters().get(0).name()); - Assertions.assertEquals("atpxl", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("kgymareqnajxqug", model.failureReason()); - Assertions.assertEquals("hky", model.timeout()); - Assertions.assertEquals("beddgssofw", model.retention()); - Assertions.assertEquals("i", model.output().get(0)); + Assertions.assertEquals("wct", model.scriptCmdletId()); + Assertions.assertEquals("zj", model.parameters().get(0).name()); + Assertions.assertEquals("lwg", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("epttwqmsniff", model.failureReason()); + Assertions.assertEquals("dmqnrojlpij", model.timeout()); + Assertions.assertEquals("rxfrddhc", model.retention()); + Assertions.assertEquals("xi", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("itc") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("cktqumiekkezzi"), - new ScriptExecutionParameter().withName("hlyfjhdgqgg"), - new ScriptExecutionParameter().withName("bdunygaeqid"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("atpxl"), - new ScriptExecutionParameter().withName("rxcyjmoad"), - new ScriptExecutionParameter().withName("uvarmywdmjsjq"), - new ScriptExecutionParameter().withName("jhhyxxrwlycoduhp"))) - .withFailureReason("kgymareqnajxqug") - .withTimeout("hky") - .withRetention("beddgssofw") - .withOutput(Arrays.asList("i", "pxacqqudfn")) - .withNamedOutputs(mapOf("baaa", new ScriptExecutionPropertiesNamedOutput(), "jyvayffimrzrtuz", - new ScriptExecutionPropertiesNamedOutput(), "ogs", new ScriptExecutionPropertiesNamedOutput())); + ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("wct") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("zj"), + new ScriptExecutionParameter().withName("uu"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("lwg"), + new ScriptExecutionParameter().withName("ytsbwtovv"), new ScriptExecutionParameter().withName("gseinq"), + new ScriptExecutionParameter().withName("iufxqknpir"))) + .withFailureReason("epttwqmsniff") + .withTimeout("dmqnrojlpij") + .withRetention("rxfrddhc") + .withOutput(Arrays.asList("xi", "tozqyzhftwesgo")) + .withNamedOutputs(mapOf("honnxkrlgnyhmos", new ScriptExecutionPropertiesNamedOutput(), "xkk", + new ScriptExecutionPropertiesNamedOutput(), "thrrgh", new ScriptExecutionPropertiesNamedOutput(), + "jbdhqxvc", new ScriptExecutionPropertiesNamedOutput())); model = BinaryData.fromObject(model).toObject(ScriptExecutionInner.class); - Assertions.assertEquals("itc", model.scriptCmdletId()); - Assertions.assertEquals("cktqumiekkezzi", model.parameters().get(0).name()); - Assertions.assertEquals("atpxl", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("kgymareqnajxqug", model.failureReason()); - Assertions.assertEquals("hky", model.timeout()); - Assertions.assertEquals("beddgssofw", model.retention()); - Assertions.assertEquals("i", model.output().get(0)); + Assertions.assertEquals("wct", model.scriptCmdletId()); + Assertions.assertEquals("zj", model.parameters().get(0).name()); + Assertions.assertEquals("lwg", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("epttwqmsniff", model.failureReason()); + Assertions.assertEquals("dmqnrojlpij", model.timeout()); + Assertions.assertEquals("rxfrddhc", model.retention()); + Assertions.assertEquals("xi", model.output().get(0)); } // Use "Map.of" if available 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 index 19bb6f0a086f0..40fa91549dd47 100644 --- 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 @@ -12,15 +12,15 @@ public final class ScriptExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionParameter model - = BinaryData.fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"sdbnwdcfhucqdpf\"}") + = BinaryData.fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"zjxvydfcea\"}") .toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("sdbnwdcfhucqdpf", model.name()); + Assertions.assertEquals("zjxvydfcea", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionParameter model = new ScriptExecutionParameter().withName("sdbnwdcfhucqdpf"); + ScriptExecutionParameter model = new ScriptExecutionParameter().withName("zjxvydfcea"); model = BinaryData.fromObject(model).toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("sdbnwdcfhucqdpf", model.name()); + Assertions.assertEquals("zjxvydfcea", 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 index 376ded2ac3994..50ea1c22d39e7 100644 --- 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 @@ -17,40 +17,39 @@ public final class ScriptExecutionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionProperties model = BinaryData.fromString( - "{\"scriptCmdletId\":\"wnujhemmsbvdk\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dtjinfw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lfltka\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"efkdlf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"akggkfpag\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"owpulpq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lyls\"}],\"failureReason\":\"k\",\"timeout\":\"jnsjervtiagxsd\",\"retention\":\"uem\",\"submittedAt\":\"2021-06-09T02:50:50Z\",\"startedAt\":\"2021-10-12T12:33:37Z\",\"finishedAt\":\"2021-02-15T03:12:09Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"pnqi\"],\"namedOutputs\":{\"nvkjjxdxrbuukzcl\":{},\"wyhmlw\":{},\"aztz\":{},\"ofncckwyfzqwhxxb\":{}},\"information\":[\"a\"],\"warnings\":[\"eqz\",\"ppriol\",\"or\"],\"errors\":[\"tolmncwsobqw\"]}") + "{\"scriptCmdletId\":\"zdgiruj\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"omvzzbtd\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qvpn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"yujviylwdshfssn\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ye\"}],\"failureReason\":\"ymsgaojfmwnc\",\"timeout\":\"tmr\",\"retention\":\"irctymoxoftpipiw\",\"submittedAt\":\"2021-04-10T00:16:32Z\",\"startedAt\":\"2021-03-13T17:37:26Z\",\"finishedAt\":\"2021-05-14T09:28:57Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"lihhyuspskasdvlm\",\"wdgzxulucv\"],\"namedOutputs\":{\"rsre\":{},\"zvxurisjnhny\":{},\"xifqjzgxm\":{},\"hu\":{}},\"information\":[\"pcesutrg\"],\"warnings\":[\"auutpwoqhihe\",\"qg\"],\"errors\":[\"nfqn\",\"cypsxjv\",\"oimwkslirc\"]}") .toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("wnujhemmsbvdk", model.scriptCmdletId()); - Assertions.assertEquals("dtjinfw", model.parameters().get(0).name()); - Assertions.assertEquals("efkdlf", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("k", model.failureReason()); - Assertions.assertEquals("jnsjervtiagxsd", model.timeout()); - Assertions.assertEquals("uem", model.retention()); - Assertions.assertEquals("pnqi", model.output().get(0)); + Assertions.assertEquals("zdgiruj", model.scriptCmdletId()); + Assertions.assertEquals("omvzzbtd", model.parameters().get(0).name()); + Assertions.assertEquals("ye", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("ymsgaojfmwnc", model.failureReason()); + Assertions.assertEquals("tmr", model.timeout()); + Assertions.assertEquals("irctymoxoftpipiw", model.retention()); + Assertions.assertEquals("lihhyuspskasdvlm", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("wnujhemmsbvdk") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("dtjinfw"), - new ScriptExecutionParameter().withName("lfltka"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("efkdlf"), - new ScriptExecutionParameter().withName("akggkfpag"), - new ScriptExecutionParameter().withName("owpulpq"), new ScriptExecutionParameter().withName("lyls"))) - .withFailureReason("k") - .withTimeout("jnsjervtiagxsd") - .withRetention("uem") - .withOutput(Arrays.asList("pnqi")) - .withNamedOutputs(mapOf("nvkjjxdxrbuukzcl", new ScriptExecutionPropertiesNamedOutput(), "wyhmlw", - new ScriptExecutionPropertiesNamedOutput(), "aztz", new ScriptExecutionPropertiesNamedOutput(), - "ofncckwyfzqwhxxb", new ScriptExecutionPropertiesNamedOutput())); + ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("zdgiruj") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("omvzzbtd"), + new ScriptExecutionParameter().withName("qvpn"), + new ScriptExecutionParameter().withName("yujviylwdshfssn"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("ye"))) + .withFailureReason("ymsgaojfmwnc") + .withTimeout("tmr") + .withRetention("irctymoxoftpipiw") + .withOutput(Arrays.asList("lihhyuspskasdvlm", "wdgzxulucv")) + .withNamedOutputs(mapOf("rsre", new ScriptExecutionPropertiesNamedOutput(), "zvxurisjnhny", + new ScriptExecutionPropertiesNamedOutput(), "xifqjzgxm", new ScriptExecutionPropertiesNamedOutput(), + "hu", new ScriptExecutionPropertiesNamedOutput())); model = BinaryData.fromObject(model).toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("wnujhemmsbvdk", model.scriptCmdletId()); - Assertions.assertEquals("dtjinfw", model.parameters().get(0).name()); - Assertions.assertEquals("efkdlf", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("k", model.failureReason()); - Assertions.assertEquals("jnsjervtiagxsd", model.timeout()); - Assertions.assertEquals("uem", model.retention()); - Assertions.assertEquals("pnqi", model.output().get(0)); + Assertions.assertEquals("zdgiruj", model.scriptCmdletId()); + Assertions.assertEquals("omvzzbtd", model.parameters().get(0).name()); + Assertions.assertEquals("ye", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("ymsgaojfmwnc", model.failureReason()); + Assertions.assertEquals("tmr", model.timeout()); + Assertions.assertEquals("irctymoxoftpipiw", model.retention()); + Assertions.assertEquals("lihhyuspskasdvlm", model.output().get(0)); } // Use "Map.of" if available 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 new file mode 100644 index 0000000000000..92794a7b7f888 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 com.azure.resourcemanager.avs.models.ScriptExecutionPropertiesNamedOutput; +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\":\"owxwcomli\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"wvczcswkacve\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dvlvhbwrnfxtgdd\"}],\"failureReason\":\"th\",\"timeout\":\"hn\",\"retention\":\"aoyankcoeqswa\",\"submittedAt\":\"2021-01-30T05:03:50Z\",\"startedAt\":\"2021-08-12T07:23:05Z\",\"finishedAt\":\"2021-02-02T11:22:23Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"znnhd\",\"lktgjc\",\"gguxhemlwyw\"],\"namedOutputs\":{\"czg\":{},\"bukklels\":{}},\"information\":[\"lycsxz\",\"jks\",\"lsmdesqplpvmjc\"],\"warnings\":[\"wb\",\"dyvt\",\"owx\",\"gpiudeug\"],\"errors\":[\"zec\",\"axwk\",\"fykhvuhxepmru\",\"znabaobns\"]},\"id\":\"jdjltymkmvgui\",\"name\":\"ywart\",\"type\":\"pphkixkykxds\"}"; + + 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("b") + .withExistingPrivateCloud("hzdtxetlgydlh", "vlnnpx") + .withScriptCmdletId("q") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("arbgjekgl"), + new ScriptExecutionParameter().withName("lbyulidwcwvmze"), + new ScriptExecutionParameter().withName("jonfhjirwgdnqzbr"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("pzhz"), + new ScriptExecutionParameter().withName("tk"), + new ScriptExecutionParameter().withName("jcitdigsxcdglj"))) + .withFailureReason("keuachtomf") + .withTimeout("rytswfpf") + .withRetention("gycxnmskwhqjjys") + .withOutput(Arrays.asList("edwqslsrh", "pq")) + .withNamedOutputs(mapOf("skondcbrwimu", new ScriptExecutionPropertiesNamedOutput(), "qejo", + new ScriptExecutionPropertiesNamedOutput(), "ovyrrleaesinu", new ScriptExecutionPropertiesNamedOutput(), + "tljqobbpih", new ScriptExecutionPropertiesNamedOutput())) + .create(); + + Assertions.assertEquals("owxwcomli", response.scriptCmdletId()); + Assertions.assertEquals("wvczcswkacve", response.parameters().get(0).name()); + Assertions.assertEquals("dvlvhbwrnfxtgdd", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("th", response.failureReason()); + Assertions.assertEquals("hn", response.timeout()); + Assertions.assertEquals("aoyankcoeqswa", response.retention()); + Assertions.assertEquals("znnhd", 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 new file mode 100644 index 0000000000000..7627288242c9c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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("sfuztlvtmv", "gbwidqlvh", "koveof", 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 new file mode 100644 index 0000000000000..bf3a5e6d77a08 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"ikzoeovvtzejetj\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"tikyj\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dbqzolxrzvhqjw\"}],\"failureReason\":\"htgv\",\"timeout\":\"zpcrrkolawj\",\"retention\":\"smwr\",\"submittedAt\":\"2021-09-09T22:55:06Z\",\"startedAt\":\"2021-04-12T00:09:13Z\",\"finishedAt\":\"2021-04-09T17:42:23Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"jafi\"],\"namedOutputs\":{\"guyn\":{},\"chl\":{},\"mltx\":{},\"whmozusgzvlnsnnj\":{}},\"information\":[\"afolpymwamxqzrag\",\"gdphtvdula\"],\"warnings\":[\"ejchcsrlz\",\"nmzlanru\"],\"errors\":[\"vnphc\",\"zqtpjhmq\"]},\"id\":\"v\",\"name\":\"hlaiwd\",\"type\":\"xsmlz\"}"; + + 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("zrvjfnmjmvlwyzgi", "lkujrllfojui", "jpu", + Arrays.asList(ScriptOutputStreamType.ERROR, ScriptOutputStreamType.ERROR, + ScriptOutputStreamType.INFORMATION), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("ikzoeovvtzejetj", response.scriptCmdletId()); + Assertions.assertEquals("tikyj", response.parameters().get(0).name()); + Assertions.assertEquals("dbqzolxrzvhqjw", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("htgv", response.failureReason()); + Assertions.assertEquals("zpcrrkolawj", response.timeout()); + Assertions.assertEquals("smwr", response.retention()); + Assertions.assertEquals("jafi", 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 new file mode 100644 index 0000000000000..0499b94a81183 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"mzgwe\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"sxwef\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hecbvopwndyq\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"llklmtk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lowkxxpvb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"dfjmzsyzfhotlh\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"k\"}],\"failureReason\":\"ychunsjlpjrtwszh\",\"timeout\":\"vuicp\",\"retention\":\"trrmhwrb\",\"submittedAt\":\"2021-03-14T13:08:25Z\",\"startedAt\":\"2021-02-16T07:42:20Z\",\"finishedAt\":\"2021-04-11T17:40:45Z\",\"provisioningState\":\"Failed\",\"output\":[\"glrocuy\"],\"namedOutputs\":{\"hhmemhooclutnp\":{},\"memczjkmmyk\":{},\"ujxsglhsr\":{}},\"information\":[\"ejylmbkzu\",\"nigrfihotjewl\",\"xuzzjgnrefq\",\"hqo\"],\"warnings\":[\"hiqakydiwfbrk\",\"pzdqtvhcspod\",\"qaxsipietgbebjf\"],\"errors\":[\"moichdlpnfpubntn\",\"atzviqsowsaael\"]},\"id\":\"ttcjuhplrvkmjc\",\"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)); + + ScriptExecution response = manager.scriptExecutions() + .getWithResponse("kizmdksaoafclu", "v", "xmycjimryvwgcw", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("mzgwe", response.scriptCmdletId()); + Assertions.assertEquals("sxwef", response.parameters().get(0).name()); + Assertions.assertEquals("llklmtk", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("ychunsjlpjrtwszh", response.failureReason()); + Assertions.assertEquals("vuicp", response.timeout()); + Assertions.assertEquals("trrmhwrb", response.retention()); + Assertions.assertEquals("glrocuy", 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 new file mode 100644 index 0000000000000..0df6c29a203ef --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"dmhm\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"plfmuvapckccrrvw\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"xoy\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ukphaimmoiroq\"}],\"failureReason\":\"shbraga\",\"timeout\":\"yyrmfsvbp\",\"retention\":\"bopfppdbwnup\",\"submittedAt\":\"2021-06-30T02:41:40Z\",\"startedAt\":\"2021-01-01T09:29:45Z\",\"finishedAt\":\"2021-06-18T09:33:58Z\",\"provisioningState\":\"Deleting\",\"output\":[\"aacfdmmc\"],\"namedOutputs\":{\"mehqepvufh\":{}},\"information\":[\"h\",\"whoqhnlbqnbldxe\"],\"warnings\":[\"gschorimkrsrr\"],\"errors\":[\"cso\",\"ldpuviy\",\"caab\",\"olhbhlvb\"]},\"id\":\"uqibsxtkcu\",\"name\":\"fbsfarfsiow\",\"type\":\"kjxnqpvwgfstmhq\"}]}"; + + 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("yuicdhzbdy", "wwgbdv", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("dmhm", response.iterator().next().scriptCmdletId()); + Assertions.assertEquals("plfmuvapckccrrvw", response.iterator().next().parameters().get(0).name()); + Assertions.assertEquals("xoy", response.iterator().next().hiddenParameters().get(0).name()); + Assertions.assertEquals("shbraga", response.iterator().next().failureReason()); + Assertions.assertEquals("yyrmfsvbp", response.iterator().next().timeout()); + Assertions.assertEquals("bopfppdbwnup", response.iterator().next().retention()); + Assertions.assertEquals("aacfdmmc", 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 index 648ed438566f5..ea46c5a7a1f64 100644 --- 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 @@ -12,15 +12,15 @@ public final class ScriptExecutionsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"p\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"bmnzbtbhjpgl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fgohdneuelfphs\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"yhtozfikdowwqu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"v\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"clvit\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hqzonosggbhcoh\"}],\"failureReason\":\"dsjnka\",\"timeout\":\"jutiiswacff\",\"retention\":\"k\",\"submittedAt\":\"2021-07-11T14:50:31Z\",\"startedAt\":\"2021-04-30T08:45:02Z\",\"finishedAt\":\"2021-09-11T04:06:27Z\",\"provisioningState\":\"Deleting\",\"output\":[\"a\",\"lvpnpp\",\"uflrwd\"],\"namedOutputs\":{\"lxyjr\":{},\"sag\":{}},\"information\":[\"nihgwqapnedg\",\"bcvkcvqvpkeq\",\"cvdrhvoodsot\",\"obzdopcjwvnhdl\"],\"warnings\":[\"gx\",\"xrslpm\",\"twuoegrpkhjwni\"],\"errors\":[\"luicpdggkzzlvmbm\",\"axmodfvuef\",\"wsbpfvm\"]},\"id\":\"hrfou\",\"name\":\"ft\",\"type\":\"akcp\"},{\"properties\":{\"scriptCmdletId\":\"zvqtmnubexkp\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"mond\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mquxvypo\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"opkwhojv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ajqgxy\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mocmbqfqvmk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xozap\"}],\"failureReason\":\"elxprglyatddck\",\"timeout\":\"bcuejrjxgci\",\"retention\":\"brh\",\"submittedAt\":\"2021-06-17T17:34:16Z\",\"startedAt\":\"2021-06-01T12:21:20Z\",\"finishedAt\":\"2021-02-04T15:03:28Z\",\"provisioningState\":\"Deleting\",\"output\":[\"m\"],\"namedOutputs\":{\"rq\":{}},\"information\":[\"ahwfluszdtmhrk\",\"ofyyvoqacpi\"],\"warnings\":[\"btgiwbwoenwas\"],\"errors\":[\"dtkcnqxwbpokulp\",\"ujw\"]},\"id\":\"sipqii\",\"name\":\"byuqerpqlp\",\"type\":\"wcciuqgbdbu\"},{\"properties\":{\"scriptCmdletId\":\"vfbtkuwh\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ykojoxafnndlpic\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"koymkcd\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"h\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"pkkpw\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"q\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ovvqfovljxywsu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"syrsndsytgadgvra\"}],\"failureReason\":\"en\",\"timeout\":\"qnzarrwl\",\"retention\":\"uijfqk\",\"submittedAt\":\"2021-06-20T18:32:46Z\",\"startedAt\":\"2021-05-07T16:01:38Z\",\"finishedAt\":\"2021-07-18T18:26:22Z\",\"provisioningState\":\"Pending\",\"output\":[\"ji\",\"wwiftohqkvpuv\",\"sgplsakn\"],\"namedOutputs\":{\"synljphuopxodl\":{},\"iyntorzihle\":{},\"sjswsrms\":{}},\"information\":[\"rpzbchckqqzqi\",\"xiy\"],\"warnings\":[\"i\",\"ynkedyatrwyhqmib\",\"yhwitsmypyynpcdp\",\"mnzgmwznmabi\"],\"errors\":[\"orgjhxbldt\",\"wwrlkdmtncv\"]},\"id\":\"otllxdyhgsyo\",\"name\":\"ogjltdtbnnhad\",\"type\":\"ocrkvcikh\"},{\"properties\":{\"scriptCmdletId\":\"amqgxqquezikyw\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"kallatmel\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"uipiccjzk\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"gvvcnayrhyr\"}],\"failureReason\":\"xmueed\",\"timeout\":\"drd\",\"retention\":\"tkwqqtchealm\",\"submittedAt\":\"2021-09-27T23:43:44Z\",\"startedAt\":\"2021-10-14T04:38:13Z\",\"finishedAt\":\"2021-04-13T10:54:30Z\",\"provisioningState\":\"Pending\",\"output\":[\"vgpiohgwxrt\",\"udxepxgyqagv\"],\"namedOutputs\":{\"npkukghimdblx\":{},\"wi\":{},\"fnjhfjxwmszkkfo\":{},\"rey\":{}},\"information\":[\"ikf\"],\"warnings\":[\"n\",\"a\"],\"errors\":[\"wczelpci\",\"elsfeaen\",\"abfatkl\"]},\"id\":\"xbjhwuaanozjosph\",\"name\":\"oulpjrv\",\"type\":\"ag\"}],\"nextLink\":\"vimjwos\"}") + "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"dvypgikdgsz\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"birryuzhl\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"oqrvqqaatjin\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"vgoup\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fiibfggjioolvr\"}],\"failureReason\":\"kvtkkg\",\"timeout\":\"lqwjygvjayvblm\",\"retention\":\"k\",\"submittedAt\":\"2021-12-10T06:42:49Z\",\"startedAt\":\"2020-12-21T03:49:07Z\",\"finishedAt\":\"2021-08-14T02:32:59Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"pbyrqufegxu\",\"wz\",\"bnhlmc\"],\"namedOutputs\":{\"dn\":{}},\"information\":[\"vgbmhr\",\"xkw\",\"yijejvegrhbpnaix\",\"xccbdreaxhcex\"],\"warnings\":[\"vqahqkghtpwi\",\"nhyjsv\",\"ycxzbfvoo\",\"vrvmtgjqppyost\"],\"errors\":[\"zm\"]},\"id\":\"gfipnsxk\",\"name\":\"cwaekrrjre\",\"type\":\"fxtsgum\"},{\"properties\":{\"scriptCmdletId\":\"lik\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"slol\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qpvuzlmvfelf\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"plcrpwjxeznoig\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rnjwmw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"pn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"saz\"}],\"failureReason\":\"joqkagfhsxt\",\"timeout\":\"augzxnfaazpxdtn\",\"retention\":\"mkqjj\",\"submittedAt\":\"2020-12-21T21:02:08Z\",\"startedAt\":\"2021-06-14T14:36:08Z\",\"finishedAt\":\"2021-07-12T10:16:15Z\",\"provisioningState\":\"Deleting\",\"output\":[\"uaibrebqaaysj\"],\"namedOutputs\":{\"qtnqtt\":{},\"zlwfffiakp\":{}},\"information\":[\"qmt\",\"d\",\"tmmjihyeozph\"],\"warnings\":[\"uyqncygupkvipmd\",\"cwxqu\",\"evzhfsto\"],\"errors\":[\"ojujbyp\",\"lmcuvhixb\",\"xyfwnylrcool\",\"ttpkiwkkbnujrywv\"]},\"id\":\"lbfpncurd\",\"name\":\"iwii\",\"type\":\"htywubxcbihwq\"}],\"nextLink\":\"fdntwjchrdgoih\"}") .toObject(ScriptExecutionsList.class); - Assertions.assertEquals("p", model.value().get(0).scriptCmdletId()); - Assertions.assertEquals("bmnzbtbhjpgl", model.value().get(0).parameters().get(0).name()); - Assertions.assertEquals("clvit", model.value().get(0).hiddenParameters().get(0).name()); - Assertions.assertEquals("dsjnka", model.value().get(0).failureReason()); - Assertions.assertEquals("jutiiswacff", model.value().get(0).timeout()); + Assertions.assertEquals("dvypgikdgsz", model.value().get(0).scriptCmdletId()); + Assertions.assertEquals("birryuzhl", model.value().get(0).parameters().get(0).name()); + Assertions.assertEquals("oqrvqqaatjin", model.value().get(0).hiddenParameters().get(0).name()); + Assertions.assertEquals("kvtkkg", model.value().get(0).failureReason()); + Assertions.assertEquals("lqwjygvjayvblm", model.value().get(0).timeout()); Assertions.assertEquals("k", model.value().get(0).retention()); - Assertions.assertEquals("a", model.value().get(0).output().get(0)); - Assertions.assertEquals("vimjwos", model.nextLink()); + Assertions.assertEquals("pbyrqufegxu", model.value().get(0).output().get(0)); + Assertions.assertEquals("fdntwjchrdgoih", model.nextLink()); } } 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 index 98978693aadd0..ebf1513c85539 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptPackageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ceopzfqrhhuaopp\",\"version\":\"qeqxo\",\"company\":\"dahzxctobg\",\"uri\":\"dmoizpostmg\"},\"id\":\"fbunrmfqjhhk\",\"name\":\"bpvjymjhx\",\"type\":\"j\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ibdeibq\",\"version\":\"qkgh\",\"company\":\"ndzwmkrefa\",\"uri\":\"jorwkqnyhgbij\"},\"id\":\"ivfxzsjabibsyst\",\"name\":\"wfsdjpvkvpbj\",\"type\":\"bkzbzkd\"}") .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 index 1f73f547a5c3b..527d80dd6da4d 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptPackagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"description\":\"divkrt\",\"version\":\"bxqz\",\"company\":\"zjf\",\"uri\":\"vjfdx\"}") + "{\"provisioningState\":\"Canceled\",\"description\":\"abudurgk\",\"version\":\"mokzhjjklf\",\"company\":\"mouwqlgzrfzeey\",\"uri\":\"izikayuhq\"}") .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 new file mode 100644 index 0000000000000..049876f888557 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"oyuelyetn\",\"version\":\"bf\",\"company\":\"ggagfln\",\"uri\":\"mtrwah\"},\"id\":\"mu\",\"name\":\"ftbyrplro\",\"type\":\"kpigqfusu\"}"; + + 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("lwntsjgqrs", "y", "ruuuybnch", 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 new file mode 100644 index 0000000000000..a39b6199cafd8 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Canceled\",\"description\":\"wv\",\"version\":\"vcdlg\",\"company\":\"ucmfdj\",\"uri\":\"laxpunj\"},\"id\":\"kczvvita\",\"name\":\"gx\",\"type\":\"fcsserxhtvsox\"}]}"; + + 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("qxfzyjqttvwk", "qhjpenuygbqe", 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 index b107c5926b920..f57ed436104fe 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptPackagesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackagesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ngmtsavjcb\",\"version\":\"xqpsrknftguv\",\"company\":\"uhprwmdyvxqt\",\"uri\":\"riwwroy\"},\"id\":\"exrmcqibycnojvk\",\"name\":\"mefqsgzvahapjyzh\",\"type\":\"vgqzcjrvxd\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"lxkvu\",\"version\":\"hzovawjvzunlut\",\"company\":\"n\",\"uri\":\"nxipeil\"},\"id\":\"zuaejxd\",\"name\":\"ltskzbbtd\",\"type\":\"umveekgpwozuhkf\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"ofd\",\"version\":\"uusdttouwa\",\"company\":\"ekqvkeln\",\"uri\":\"vbxwyjsflhh\"},\"id\":\"aln\",\"name\":\"ixisxyawjoy\",\"type\":\"qcslyjpkiid\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"nelixhnrztfo\",\"version\":\"bnxknalaulppg\",\"company\":\"tpnapnyiropuhpig\",\"uri\":\"gylgqgitxmedjvcs\"},\"id\":\"n\",\"name\":\"wwncwzzhxgk\",\"type\":\"rmgucnap\"}],\"nextLink\":\"eoellwptfdygp\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"dw\",\"version\":\"tswiby\",\"company\":\"dl\",\"uri\":\"shfwpracstwity\"},\"id\":\"evxccedcp\",\"name\":\"md\",\"type\":\"odn\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"jc\",\"version\":\"hlt\",\"company\":\"gcxn\",\"uri\":\"vwxqibyqunyo\"},\"id\":\"wlmdjrkv\",\"name\":\"g\",\"type\":\"vfvpdbodaciz\"}],\"nextLink\":\"q\"}") .toObject(ScriptPackagesList.class); - Assertions.assertEquals("eoellwptfdygp", model.nextLink()); + Assertions.assertEquals("q", 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 index 15351aeb1b8ad..3ae8c767b79ca 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptParameter model = BinaryData.fromString( - "{\"type\":\"String\",\"name\":\"lauwzizxbmpgcjef\",\"description\":\"muvp\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}") + "{\"type\":\"Int\",\"name\":\"tjsyin\",\"description\":\"fq\",\"visibility\":\"Visible\",\"optional\":\"Required\"}") .toObject(ScriptParameter.class); - Assertions.assertEquals("lauwzizxbmpgcjef", model.name()); + Assertions.assertEquals("tjsyin", 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 index 41b0ace68d201..032f311acefa7 100644 --- 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 @@ -11,19 +11,19 @@ public final class ScriptSecureStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptSecureStringExecutionParameter model - = BinaryData.fromString("{\"type\":\"SecureValue\",\"secureValue\":\"glsbjjc\",\"name\":\"nvxbvt\"}") - .toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("nvxbvt", model.name()); - Assertions.assertEquals("glsbjjc", model.secureValue()); + ScriptSecureStringExecutionParameter model = BinaryData + .fromString("{\"type\":\"SecureValue\",\"secureValue\":\"lhvygdyftu\",\"name\":\"rtwnawjslbi\"}") + .toObject(ScriptSecureStringExecutionParameter.class); + Assertions.assertEquals("rtwnawjslbi", model.name()); + Assertions.assertEquals("lhvygdyftu", model.secureValue()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScriptSecureStringExecutionParameter model - = new ScriptSecureStringExecutionParameter().withName("nvxbvt").withSecureValue("glsbjjc"); + = new ScriptSecureStringExecutionParameter().withName("rtwnawjslbi").withSecureValue("lhvygdyftu"); model = BinaryData.fromObject(model).toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("nvxbvt", model.name()); - Assertions.assertEquals("glsbjjc", model.secureValue()); + Assertions.assertEquals("rtwnawjslbi", model.name()); + Assertions.assertEquals("lhvygdyftu", 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 index 9dd63f31474d0..7f091137fd91d 100644 --- 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 @@ -12,17 +12,18 @@ public final class ScriptStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptStringExecutionParameter model - = BinaryData.fromString("{\"type\":\"Value\",\"value\":\"dut\",\"name\":\"cormr\"}") + = BinaryData.fromString("{\"type\":\"Value\",\"value\":\"ojgcyzt\",\"name\":\"fmznba\"}") .toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("cormr", model.name()); - Assertions.assertEquals("dut", model.value()); + Assertions.assertEquals("fmznba", model.name()); + Assertions.assertEquals("ojgcyzt", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptStringExecutionParameter model = new ScriptStringExecutionParameter().withName("cormr").withValue("dut"); + ScriptStringExecutionParameter model + = new ScriptStringExecutionParameter().withName("fmznba").withValue("ojgcyzt"); model = BinaryData.fromObject(model).toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("cormr", model.name()); - Assertions.assertEquals("dut", model.value()); + Assertions.assertEquals("fmznba", model.name()); + Assertions.assertEquals("ojgcyzt", model.value()); } } 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 index 5fc63066e5f3a..1d156729303d0 100644 --- 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 @@ -11,7 +11,7 @@ public final class VirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xv\",\"moRefId\":\"u\",\"folderPath\":\"pz\",\"restrictMovement\":\"Disabled\"},\"id\":\"dzhlrq\",\"name\":\"bh\",\"type\":\"kfrlhrxsbky\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"v\",\"moRefId\":\"pzfoqoui\",\"folderPath\":\"bxarzgszufoxci\",\"restrictMovement\":\"Enabled\"},\"id\":\"doamciodhkha\",\"name\":\"xkhnzbonlwnto\",\"type\":\"gokdwbwhks\"}") .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 index dc545be2675b6..862c0d7469fd4 100644 --- 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 @@ -11,7 +11,7 @@ public final class VirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"displayName\":\"anuzbpzkafkuw\",\"moRefId\":\"rnwb\",\"folderPath\":\"hhseyv\",\"restrictMovement\":\"Disabled\"}") + "{\"provisioningState\":\"Failed\",\"displayName\":\"rvexztvb\",\"moRefId\":\"gsfraoyzkoow\",\"folderPath\":\"mnguxawqaldsyu\",\"restrictMovement\":\"Disabled\"}") .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 index 38137b2b78ded..ea199a37c62ba 100644 --- 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 @@ -12,16 +12,16 @@ public final class VirtualMachineRestrictMovementTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Disabled\"}") + VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Enabled\"}") .toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); + Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, model.restrictMovement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineRestrictMovement model - = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.DISABLED); + = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED); model = BinaryData.fromObject(model).toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); + 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 new file mode 100644 index 0000000000000..f60ca505da8be --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Canceled\",\"displayName\":\"au\",\"moRefId\":\"opionszon\",\"folderPath\":\"ngajinnixjawrtmj\",\"restrictMovement\":\"Enabled\"},\"id\":\"ccxlzhcoxovnek\",\"name\":\"enlusfn\",\"type\":\"dtjxtxrdcqt\"}"; + + 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("fugsnnfhyetefy", "oc", "ctfjgtixr", "vzuyturmlmu", 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 new file mode 100644 index 0000000000000..02d306b728712 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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\":\"Succeeded\",\"displayName\":\"hokq\",\"moRefId\":\"bkau\",\"folderPath\":\"fshfph\",\"restrictMovement\":\"Disabled\"},\"id\":\"lai\",\"name\":\"wzejywhslw\",\"type\":\"ojpllndnpdwrpqaf\"}]}"; + + 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("taboidvmf", "hppubowsepdfgkmt", "herngb", 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 index 39d6765a9f00c..9eece92dc090f 100644 --- 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 @@ -12,8 +12,8 @@ public final class VirtualMachinesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"bbovplwzbhvgyugu\",\"moRefId\":\"vmkfssxqu\",\"folderPath\":\"fpl\",\"restrictMovement\":\"Disabled\"},\"id\":\"xnkjzkdesl\",\"name\":\"vlopwiyighx\",\"type\":\"kdwzbaiuebbaumny\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"eojnabc\",\"moRefId\":\"smtxpsieb\",\"folderPath\":\"hvpesapskrdqm\",\"restrictMovement\":\"Disabled\"},\"id\":\"htldwk\",\"name\":\"zxuutkncwscwsvl\",\"type\":\"otogtwrupqs\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"cykvceo\",\"moRefId\":\"ilovnot\",\"folderPath\":\"jfcn\",\"restrictMovement\":\"Enabled\"},\"id\":\"nxdhbt\",\"name\":\"kphywpnvjto\",\"type\":\"nermcl\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"oxuscrpabgyepsbj\",\"moRefId\":\"zq\",\"folderPath\":\"xywpmueefjzwfqkq\",\"restrictMovement\":\"Enabled\"},\"id\":\"suyonobglaocq\",\"name\":\"tcc\",\"type\":\"g\"}],\"nextLink\":\"dxyt\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"f\",\"moRefId\":\"eyvpnqicvinvkj\",\"folderPath\":\"dxrbuukzcle\",\"restrictMovement\":\"Disabled\"},\"id\":\"lw\",\"name\":\"aztz\",\"type\":\"ofncckwyfzqwhxxb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"zfeqztppri\",\"moRefId\":\"xorjaltolmncwsob\",\"folderPath\":\"csdbnwdcfhuc\",\"restrictMovement\":\"Disabled\"},\"id\":\"uvglsbjjcanvx\",\"name\":\"vtvudutncormr\",\"type\":\"xqtvcofu\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"gj\",\"moRefId\":\"gdknnqv\",\"folderPath\":\"znqntoru\",\"restrictMovement\":\"Disabled\"},\"id\":\"a\",\"name\":\"mkycgra\",\"type\":\"wjue\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ruvdmov\",\"moRefId\":\"zlxwabmqoefkifr\",\"folderPath\":\"puqujmqlgkfbtn\",\"restrictMovement\":\"Enabled\"},\"id\":\"n\",\"name\":\"bjcntujitc\",\"type\":\"ed\"}],\"nextLink\":\"wwa\"}") .toObject(VirtualMachinesList.class); - Assertions.assertEquals("dxyt", model.nextLink()); + Assertions.assertEquals("wwa", 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 index 1e66b68afba4a..cf5482ae4d22e 100644 --- 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 @@ -17,13 +17,13 @@ public final class VmHostPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmHostPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmHost\",\"vmMembers\":[\"uojgj\",\"wjue\",\"otwmcdyt\"],\"hostMembers\":[\"wit\"],\"affinityType\":\"AntiAffinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"gxhnisk\",\"provisioningState\":\"Failed\"}") + "{\"type\":\"VmHost\",\"vmMembers\":[\"icslfaoq\",\"piyylhalnswhccsp\"],\"hostMembers\":[\"aivwitqscywu\",\"gwol\"],\"affinityType\":\"Affinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"ai\",\"provisioningState\":\"Succeeded\"}") .toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("gxhnisk", model.displayName()); - Assertions.assertEquals("uojgj", model.vmMembers().get(0)); - Assertions.assertEquals("wit", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); + Assertions.assertEquals("ai", model.displayName()); + Assertions.assertEquals("icslfaoq", model.vmMembers().get(0)); + Assertions.assertEquals("aivwitqscywu", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } @@ -32,18 +32,18 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { VmHostPlacementPolicyProperties model = new VmHostPlacementPolicyProperties().withState(PlacementPolicyState.DISABLED) - .withDisplayName("gxhnisk") - .withVmMembers(Arrays.asList("uojgj", "wjue", "otwmcdyt")) - .withHostMembers(Arrays.asList("wit")) - .withAffinityType(AffinityType.ANTI_AFFINITY) + .withDisplayName("ai") + .withVmMembers(Arrays.asList("icslfaoq", "piyylhalnswhccsp")) + .withHostMembers(Arrays.asList("aivwitqscywu", "gwol")) + .withAffinityType(AffinityType.AFFINITY) .withAffinityStrength(AffinityStrength.SHOULD) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("gxhnisk", model.displayName()); - Assertions.assertEquals("uojgj", model.vmMembers().get(0)); - Assertions.assertEquals("wit", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); + Assertions.assertEquals("ai", model.displayName()); + Assertions.assertEquals("icslfaoq", model.vmMembers().get(0)); + Assertions.assertEquals("aivwitqscywu", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java index 9dfee0659c2ee..80c50dd45481f 100644 --- 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 @@ -15,24 +15,24 @@ public final class VmPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmVm\",\"vmMembers\":[\"owzxcu\",\"i\",\"jooxdjebw\"],\"affinityType\":\"Affinity\",\"state\":\"Enabled\",\"displayName\":\"fvovbvmeuecivy\",\"provisioningState\":\"Failed\"}") + "{\"type\":\"VmVm\",\"vmMembers\":[\"uhhziuiefozbhdm\",\"mlmz\"],\"affinityType\":\"Affinity\",\"state\":\"Enabled\",\"displayName\":\"rmaequ\",\"provisioningState\":\"Deleting\"}") .toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("fvovbvmeuecivy", model.displayName()); - Assertions.assertEquals("owzxcu", model.vmMembers().get(0)); + Assertions.assertEquals("rmaequ", model.displayName()); + Assertions.assertEquals("uhhziuiefozbhdm", model.vmMembers().get(0)); Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VmPlacementPolicyProperties model = new VmPlacementPolicyProperties().withState(PlacementPolicyState.ENABLED) - .withDisplayName("fvovbvmeuecivy") - .withVmMembers(Arrays.asList("owzxcu", "i", "jooxdjebw")) + .withDisplayName("rmaequ") + .withVmMembers(Arrays.asList("uhhziuiefozbhdm", "mlmz")) .withAffinityType(AffinityType.AFFINITY); model = BinaryData.fromObject(model).toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("fvovbvmeuecivy", model.displayName()); - Assertions.assertEquals("owzxcu", model.vmMembers().get(0)); + Assertions.assertEquals("rmaequ", model.displayName()); + Assertions.assertEquals("uhhziuiefozbhdm", model.vmMembers().get(0)); Assertions.assertEquals(AffinityType.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 index 0613cdd311b82..b0e37493d43aa 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkDhcpEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpEntity model = BinaryData.fromString( - "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"rv\",\"segments\":[\"pmfi\",\"bfggjioolvr\",\"x\"],\"provisioningState\":\"Building\",\"revision\":201556653544263409}") + "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"kv\",\"segments\":[\"lmqkrhahvlj\",\"ahaquh\"],\"provisioningState\":\"Failed\",\"revision\":4716171323603349027}") .toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("rv", model.displayName()); - Assertions.assertEquals(201556653544263409L, model.revision()); + Assertions.assertEquals("kv", model.displayName()); + Assertions.assertEquals(4716171323603349027L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkDhcpEntity model - = new WorkloadNetworkDhcpEntity().withDisplayName("rv").withRevision(201556653544263409L); + = new WorkloadNetworkDhcpEntity().withDisplayName("kv").withRevision(4716171323603349027L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("rv", model.displayName()); - Assertions.assertEquals(201556653544263409L, model.revision()); + Assertions.assertEquals("kv", model.displayName()); + Assertions.assertEquals(4716171323603349027L, 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 index 8c319f9f5f17e..5f5137d2db097 100644 --- 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 @@ -13,18 +13,18 @@ public final class WorkloadNetworkDhcpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpInner model = BinaryData.fromString( - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"tjsyin\",\"segments\":[\"qatmtdhtmdvy\"],\"provisioningState\":\"Succeeded\",\"revision\":7953248130446233855},\"id\":\"zywkb\",\"name\":\"rryuzhlhkjo\",\"type\":\"rvqqaatj\"}") + "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"uwbc\",\"segments\":[\"bmehh\"],\"provisioningState\":\"Deleting\",\"revision\":2958870513291350994},\"id\":\"rts\",\"name\":\"hspkdeemao\",\"type\":\"mx\"}") .toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("tjsyin", model.properties().displayName()); - Assertions.assertEquals(7953248130446233855L, model.properties().revision()); + Assertions.assertEquals("uwbc", model.properties().displayName()); + Assertions.assertEquals(2958870513291350994L, model.properties().revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner().withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("tjsyin").withRevision(7953248130446233855L)); + WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner() + .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("uwbc").withRevision(2958870513291350994L)); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("tjsyin", model.properties().displayName()); - Assertions.assertEquals(7953248130446233855L, model.properties().revision()); + Assertions.assertEquals("uwbc", model.properties().displayName()); + Assertions.assertEquals(2958870513291350994L, 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 index f28a48bc3a12b..2524648dd187c 100644 --- 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 @@ -12,10 +12,10 @@ public final class WorkloadNetworkDhcpListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"xu\",\"segments\":[\"dwzrmuh\",\"pfcqdp\",\"qxqvpsvuoymgc\",\"elvezrypq\"],\"provisioningState\":\"Deleting\",\"revision\":6554810180988949657},\"id\":\"rqwky\",\"name\":\"kobopgxed\",\"type\":\"owepbqpcrfkb\"}],\"nextLink\":\"csnjvcdwxlpqekft\"}") + "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"mgyudxytlmoyrxv\",\"segments\":[\"dw\"],\"provisioningState\":\"Building\",\"revision\":6478150774243714531},\"id\":\"zhlrqjb\",\"name\":\"ck\",\"type\":\"rlhrxs\"}],\"nextLink\":\"yvpycanuzbpzk\"}") .toObject(WorkloadNetworkDhcpList.class); - Assertions.assertEquals("xu", model.value().get(0).properties().displayName()); - Assertions.assertEquals(6554810180988949657L, model.value().get(0).properties().revision()); - Assertions.assertEquals("csnjvcdwxlpqekft", model.nextLink()); + Assertions.assertEquals("mgyudxytlmoyrxv", model.value().get(0).properties().displayName()); + Assertions.assertEquals(6478150774243714531L, model.value().get(0).properties().revision()); + Assertions.assertEquals("yvpycanuzbpzk", 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 index 451801be224b2..ae22f0c35bcd6 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkDhcpRelayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpRelay model = BinaryData.fromString( - "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"tlpdn\",\"itvgbmhrixkwm\",\"ijejvegrhbpn\"],\"displayName\":\"xexccbdreaxhcexd\",\"segments\":[\"qahqkghtpwijn\",\"yjsvfyc\",\"z\"],\"provisioningState\":\"Building\",\"revision\":7035584365835539552}") + "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"isgwbnbbeldawkz\",\"ali\"],\"displayName\":\"rqhakauha\",\"segments\":[\"fwxosowzxcu\",\"i\",\"jooxdjebw\"],\"provisioningState\":\"Succeeded\",\"revision\":7246200145127571189}") .toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("xexccbdreaxhcexd", model.displayName()); - Assertions.assertEquals(7035584365835539552L, model.revision()); - Assertions.assertEquals("tlpdn", model.serverAddresses().get(0)); + Assertions.assertEquals("rqhakauha", model.displayName()); + Assertions.assertEquals(7246200145127571189L, model.revision()); + Assertions.assertEquals("isgwbnbbeldawkz", model.serverAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("xexccbdreaxhcexd") - .withRevision(7035584365835539552L) - .withServerAddresses(Arrays.asList("tlpdn", "itvgbmhrixkwm", "ijejvegrhbpn")); + WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("rqhakauha") + .withRevision(7246200145127571189L) + .withServerAddresses(Arrays.asList("isgwbnbbeldawkz", "ali")); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("xexccbdreaxhcexd", model.displayName()); - Assertions.assertEquals(7035584365835539552L, model.revision()); - Assertions.assertEquals("tlpdn", model.serverAddresses().get(0)); + Assertions.assertEquals("rqhakauha", model.displayName()); + Assertions.assertEquals(7246200145127571189L, model.revision()); + Assertions.assertEquals("isgwbnbbeldawkz", 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 index efb6b0ce98137..8517c0d6855b9 100644 --- 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 @@ -12,24 +12,24 @@ public final class WorkloadNetworkDhcpServerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpServer model = BinaryData.fromString( - "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"lqwjygvjayvblm\",\"leaseTime\":593391508400046676,\"displayName\":\"hbxvvyhgsopbyrqu\",\"segments\":[\"xuvw\"],\"provisioningState\":\"Failed\",\"revision\":8014747037216452315}") + "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"laexqp\",\"leaseTime\":3403871146459803360,\"displayName\":\"ws\",\"segments\":[\"gvxp\"],\"provisioningState\":\"Deleting\",\"revision\":7205793596406177755}") .toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("hbxvvyhgsopbyrqu", model.displayName()); - Assertions.assertEquals(8014747037216452315L, model.revision()); - Assertions.assertEquals("lqwjygvjayvblm", model.serverAddress()); - Assertions.assertEquals(593391508400046676L, model.leaseTime()); + Assertions.assertEquals("ws", model.displayName()); + Assertions.assertEquals(7205793596406177755L, model.revision()); + Assertions.assertEquals("laexqp", model.serverAddress()); + Assertions.assertEquals(3403871146459803360L, model.leaseTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("hbxvvyhgsopbyrqu") - .withRevision(8014747037216452315L) - .withServerAddress("lqwjygvjayvblm") - .withLeaseTime(593391508400046676L); + WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("ws") + .withRevision(7205793596406177755L) + .withServerAddress("laexqp") + .withLeaseTime(3403871146459803360L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("hbxvvyhgsopbyrqu", model.displayName()); - Assertions.assertEquals(8014747037216452315L, model.revision()); - Assertions.assertEquals("lqwjygvjayvblm", model.serverAddress()); - Assertions.assertEquals(593391508400046676L, model.leaseTime()); + Assertions.assertEquals("ws", model.displayName()); + Assertions.assertEquals(7205793596406177755L, model.revision()); + Assertions.assertEquals("laexqp", model.serverAddress()); + Assertions.assertEquals(3403871146459803360L, 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 index 5ddcd297d33cf..da403e9b2681e 100644 --- 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 @@ -14,30 +14,30 @@ public final class WorkloadNetworkDnsServiceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"ywjhhgdnhx\",\"dnsServiceIp\":\"ivfomiloxgg\",\"defaultDnsZone\":\"fi\",\"fqdnZones\":[\"ieuzaofjchvcyyy\",\"fgdo\",\"cubiipuipw\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":3925666504611058153},\"id\":\"izsh\",\"name\":\"vcimpev\",\"type\":\"gmblrri\"}") + "{\"properties\":{\"displayName\":\"utiiswacf\",\"dnsServiceIp\":\"dkzzewkfvhqcrail\",\"defaultDnsZone\":\"n\",\"fqdnZones\":[\"uflrwd\",\"hdlxyjrxsagafcn\",\"hgw\"],\"logLevel\":\"WARNING\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3702419407947008695},\"id\":\"kcvqvpke\",\"name\":\"dcvd\",\"type\":\"hvoodsotbobzd\"}") .toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("ywjhhgdnhx", model.displayName()); - Assertions.assertEquals("ivfomiloxgg", model.dnsServiceIp()); - Assertions.assertEquals("fi", model.defaultDnsZone()); - Assertions.assertEquals("ieuzaofjchvcyyy", model.fqdnZones().get(0)); + Assertions.assertEquals("utiiswacf", model.displayName()); + Assertions.assertEquals("dkzzewkfvhqcrail", model.dnsServiceIp()); + Assertions.assertEquals("n", model.defaultDnsZone()); + Assertions.assertEquals("uflrwd", model.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(3925666504611058153L, model.revision()); + Assertions.assertEquals(3702419407947008695L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("ywjhhgdnhx") - .withDnsServiceIp("ivfomiloxgg") - .withDefaultDnsZone("fi") - .withFqdnZones(Arrays.asList("ieuzaofjchvcyyy", "fgdo", "cubiipuipw")) + WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("utiiswacf") + .withDnsServiceIp("dkzzewkfvhqcrail") + .withDefaultDnsZone("n") + .withFqdnZones(Arrays.asList("uflrwd", "hdlxyjrxsagafcn", "hgw")) .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(3925666504611058153L); + .withRevision(3702419407947008695L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("ywjhhgdnhx", model.displayName()); - Assertions.assertEquals("ivfomiloxgg", model.dnsServiceIp()); - Assertions.assertEquals("fi", model.defaultDnsZone()); - Assertions.assertEquals("ieuzaofjchvcyyy", model.fqdnZones().get(0)); + Assertions.assertEquals("utiiswacf", model.displayName()); + Assertions.assertEquals("dkzzewkfvhqcrail", model.dnsServiceIp()); + Assertions.assertEquals("n", model.defaultDnsZone()); + Assertions.assertEquals("uflrwd", model.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(3925666504611058153L, model.revision()); + Assertions.assertEquals(3702419407947008695L, 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 index 5a115f87d50f1..18344793c00e5 100644 --- 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 @@ -14,31 +14,30 @@ public final class WorkloadNetworkDnsServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceProperties model = BinaryData.fromString( - "{\"displayName\":\"ywdxsmic\",\"dnsServiceIp\":\"rwfscjfnynszquj\",\"defaultDnsZone\":\"dvoqyt\",\"fqdnZones\":[\"owbb\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":805790317647492283}") + "{\"displayName\":\"cjwvn\",\"dnsServiceIp\":\"ld\",\"defaultDnsZone\":\"gx\",\"fqdnZones\":[\"slpmutwuo\",\"grpkhjwniyqs\",\"uicpd\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":2377355799268639179}") .toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("ywdxsmic", model.displayName()); - Assertions.assertEquals("rwfscjfnynszquj", model.dnsServiceIp()); - Assertions.assertEquals("dvoqyt", model.defaultDnsZone()); - Assertions.assertEquals("owbb", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); - Assertions.assertEquals(805790317647492283L, model.revision()); + Assertions.assertEquals("cjwvn", model.displayName()); + Assertions.assertEquals("ld", model.dnsServiceIp()); + Assertions.assertEquals("gx", model.defaultDnsZone()); + Assertions.assertEquals("slpmutwuo", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); + Assertions.assertEquals(2377355799268639179L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceProperties model - = new WorkloadNetworkDnsServiceProperties().withDisplayName("ywdxsmic") - .withDnsServiceIp("rwfscjfnynszquj") - .withDefaultDnsZone("dvoqyt") - .withFqdnZones(Arrays.asList("owbb")) - .withLogLevel(DnsServiceLogLevelEnum.ERROR) - .withRevision(805790317647492283L); + WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("cjwvn") + .withDnsServiceIp("ld") + .withDefaultDnsZone("gx") + .withFqdnZones(Arrays.asList("slpmutwuo", "grpkhjwniyqs", "uicpd")) + .withLogLevel(DnsServiceLogLevelEnum.DEBUG) + .withRevision(2377355799268639179L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("ywdxsmic", model.displayName()); - Assertions.assertEquals("rwfscjfnynszquj", model.dnsServiceIp()); - Assertions.assertEquals("dvoqyt", model.defaultDnsZone()); - Assertions.assertEquals("owbb", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); - Assertions.assertEquals(805790317647492283L, model.revision()); + Assertions.assertEquals("cjwvn", model.displayName()); + Assertions.assertEquals("ld", model.dnsServiceIp()); + Assertions.assertEquals("gx", model.defaultDnsZone()); + Assertions.assertEquals("slpmutwuo", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); + Assertions.assertEquals(2377355799268639179L, 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 index 349b7cd8f0798..6b536cdc00c87 100644 --- 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 @@ -13,14 +13,14 @@ public final class WorkloadNetworkDnsServicesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServicesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"qybaryeua\",\"dnsServiceIp\":\"kq\",\"defaultDnsZone\":\"qgzsles\",\"fqdnZones\":[\"hernntiewdjc\",\"bquwrbehw\",\"gohbuffkmrq\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":3657364039140978355},\"id\":\"futacoebjvewzc\",\"name\":\"znmwcp\",\"type\":\"guaadraufactkahz\"},{\"properties\":{\"displayName\":\"jjziuxxpsh\",\"dnsServiceIp\":\"e\",\"defaultDnsZone\":\"lfg\",\"fqdnZones\":[\"ubkwdle\",\"rds\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":5977101318302182370},\"id\":\"hminyflnorwmduv\",\"name\":\"pklvxw\",\"type\":\"ygdxpgpqchis\"},{\"properties\":{\"displayName\":\"nnbj\",\"dnsServiceIp\":\"xgibbda\",\"defaultDnsZone\":\"onfo\",\"fqdnZones\":[\"orsukokwbqp\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":7056990023571937899},\"id\":\"r\",\"name\":\"hw\",\"type\":\"soldweyuqdunv\"}],\"nextLink\":\"nrwrbiork\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"xe\",\"dnsServiceIp\":\"nzbtbhj\",\"defaultDnsZone\":\"lkfg\",\"fqdnZones\":[\"neuelfphsdyhtoz\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":5092229497552336172},\"id\":\"xzxcl\",\"name\":\"ithhqzon\",\"type\":\"sg\"}],\"nextLink\":\"hcohfwdsjnk\"}") .toObject(WorkloadNetworkDnsServicesList.class); - Assertions.assertEquals("qybaryeua", model.value().get(0).displayName()); - Assertions.assertEquals("kq", model.value().get(0).dnsServiceIp()); - Assertions.assertEquals("qgzsles", model.value().get(0).defaultDnsZone()); - Assertions.assertEquals("hernntiewdjc", model.value().get(0).fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, model.value().get(0).logLevel()); - Assertions.assertEquals(3657364039140978355L, model.value().get(0).revision()); - Assertions.assertEquals("nrwrbiork", model.nextLink()); + Assertions.assertEquals("xe", model.value().get(0).displayName()); + Assertions.assertEquals("nzbtbhj", model.value().get(0).dnsServiceIp()); + Assertions.assertEquals("lkfg", model.value().get(0).defaultDnsZone()); + Assertions.assertEquals("neuelfphsdyhtoz", model.value().get(0).fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.value().get(0).logLevel()); + Assertions.assertEquals(5092229497552336172L, model.value().get(0).revision()); + Assertions.assertEquals("hcohfwdsjnk", 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 index 5e9d3120f54ce..595d674a2b4b8 100644 --- 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 @@ -13,30 +13,30 @@ public final class WorkloadNetworkDnsZoneInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"il\",\"domain\":[\"wt\",\"gkxnyedabg\"],\"dnsServerIps\":[\"dtj\",\"ewbcihxuuw\",\"c\"],\"sourceIp\":\"xccybvpa\",\"dnsServices\":6238077672035548376,\"provisioningState\":\"Succeeded\",\"revision\":1791393814695153018},\"id\":\"wjplma\",\"name\":\"stcyohpfkyrkdbd\",\"type\":\"iogsjkmnwq\"}") + "{\"properties\":{\"displayName\":\"smypyynpc\",\"domain\":[\"mnzgmwznmabi\",\"nsorgjhxbldt\",\"wwrlkdmtncv\",\"kotl\"],\"dnsServerIps\":[\"yhgsy\"],\"sourceIp\":\"ogjltdtbnnhad\",\"dnsServices\":2230966046874594524,\"provisioningState\":\"Canceled\",\"revision\":5398551830021510565},\"id\":\"nvpamq\",\"name\":\"x\",\"type\":\"queziky\"}") .toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("il", model.displayName()); - Assertions.assertEquals("wt", model.domain().get(0)); - Assertions.assertEquals("dtj", model.dnsServerIps().get(0)); - Assertions.assertEquals("xccybvpa", model.sourceIp()); - Assertions.assertEquals(6238077672035548376L, model.dnsServices()); - Assertions.assertEquals(1791393814695153018L, model.revision()); + Assertions.assertEquals("smypyynpc", model.displayName()); + Assertions.assertEquals("mnzgmwznmabi", model.domain().get(0)); + Assertions.assertEquals("yhgsy", model.dnsServerIps().get(0)); + Assertions.assertEquals("ogjltdtbnnhad", model.sourceIp()); + Assertions.assertEquals(2230966046874594524L, model.dnsServices()); + Assertions.assertEquals(5398551830021510565L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("il") - .withDomain(Arrays.asList("wt", "gkxnyedabg")) - .withDnsServerIps(Arrays.asList("dtj", "ewbcihxuuw", "c")) - .withSourceIp("xccybvpa") - .withDnsServices(6238077672035548376L) - .withRevision(1791393814695153018L); + WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("smypyynpc") + .withDomain(Arrays.asList("mnzgmwznmabi", "nsorgjhxbldt", "wwrlkdmtncv", "kotl")) + .withDnsServerIps(Arrays.asList("yhgsy")) + .withSourceIp("ogjltdtbnnhad") + .withDnsServices(2230966046874594524L) + .withRevision(5398551830021510565L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("il", model.displayName()); - Assertions.assertEquals("wt", model.domain().get(0)); - Assertions.assertEquals("dtj", model.dnsServerIps().get(0)); - Assertions.assertEquals("xccybvpa", model.sourceIp()); - Assertions.assertEquals(6238077672035548376L, model.dnsServices()); - Assertions.assertEquals(1791393814695153018L, model.revision()); + Assertions.assertEquals("smypyynpc", model.displayName()); + Assertions.assertEquals("mnzgmwznmabi", model.domain().get(0)); + Assertions.assertEquals("yhgsy", model.dnsServerIps().get(0)); + Assertions.assertEquals("ogjltdtbnnhad", model.sourceIp()); + Assertions.assertEquals(2230966046874594524L, model.dnsServices()); + Assertions.assertEquals(5398551830021510565L, 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 index 6fbcf6f68e10f..024e18631d993 100644 --- 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 @@ -13,31 +13,30 @@ public final class WorkloadNetworkDnsZonePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneProperties model = BinaryData.fromString( - "{\"displayName\":\"obaiyhddviaceg\",\"domain\":[\"ntfpmvmemfnc\"],\"dnsServerIps\":[\"vvbalx\"],\"sourceIp\":\"lchpodbzevwrdn\",\"dnsServices\":4609142412513709253,\"provisioningState\":\"Canceled\",\"revision\":9047416798509661707}") + "{\"displayName\":\"gxk\",\"domain\":[\"atmelwui\"],\"dnsServerIps\":[\"cjzkzivgvvcna\",\"rhyrnxxmueed\",\"drd\"],\"sourceIp\":\"tkwqqtchealm\",\"dnsServices\":2875480604821792642,\"provisioningState\":\"Canceled\",\"revision\":2951445315314991952}") .toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("obaiyhddviaceg", model.displayName()); - Assertions.assertEquals("ntfpmvmemfnc", model.domain().get(0)); - Assertions.assertEquals("vvbalx", model.dnsServerIps().get(0)); - Assertions.assertEquals("lchpodbzevwrdn", model.sourceIp()); - Assertions.assertEquals(4609142412513709253L, model.dnsServices()); - Assertions.assertEquals(9047416798509661707L, model.revision()); + Assertions.assertEquals("gxk", model.displayName()); + Assertions.assertEquals("atmelwui", model.domain().get(0)); + Assertions.assertEquals("cjzkzivgvvcna", model.dnsServerIps().get(0)); + Assertions.assertEquals("tkwqqtchealm", model.sourceIp()); + Assertions.assertEquals(2875480604821792642L, model.dnsServices()); + Assertions.assertEquals(2951445315314991952L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneProperties model - = new WorkloadNetworkDnsZoneProperties().withDisplayName("obaiyhddviaceg") - .withDomain(Arrays.asList("ntfpmvmemfnc")) - .withDnsServerIps(Arrays.asList("vvbalx")) - .withSourceIp("lchpodbzevwrdn") - .withDnsServices(4609142412513709253L) - .withRevision(9047416798509661707L); + WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("gxk") + .withDomain(Arrays.asList("atmelwui")) + .withDnsServerIps(Arrays.asList("cjzkzivgvvcna", "rhyrnxxmueed", "drd")) + .withSourceIp("tkwqqtchealm") + .withDnsServices(2875480604821792642L) + .withRevision(2951445315314991952L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("obaiyhddviaceg", model.displayName()); - Assertions.assertEquals("ntfpmvmemfnc", model.domain().get(0)); - Assertions.assertEquals("vvbalx", model.dnsServerIps().get(0)); - Assertions.assertEquals("lchpodbzevwrdn", model.sourceIp()); - Assertions.assertEquals(4609142412513709253L, model.dnsServices()); - Assertions.assertEquals(9047416798509661707L, model.revision()); + Assertions.assertEquals("gxk", model.displayName()); + Assertions.assertEquals("atmelwui", model.domain().get(0)); + Assertions.assertEquals("cjzkzivgvvcna", model.dnsServerIps().get(0)); + Assertions.assertEquals("tkwqqtchealm", model.sourceIp()); + Assertions.assertEquals(2875480604821792642L, model.dnsServices()); + Assertions.assertEquals(2951445315314991952L, 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 index 5c13c35f14019..e774e2d7a96ba 100644 --- 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 @@ -12,14 +12,14 @@ public final class WorkloadNetworkDnsZonesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZonesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"oismsksbpimlqol\",\"domain\":[\"cgxxlxs\",\"fgcviz\",\"zdwlvwlyoupfgfb\",\"jub\"],\"dnsServerIps\":[\"gkfmins\",\"owzfttsttkt\"],\"sourceIp\":\"hbq\",\"dnsServices\":2084936073486724926,\"provisioningState\":\"Updating\",\"revision\":5228889169279168273},\"id\":\"itmmqtgqqqxh\",\"name\":\"n\",\"type\":\"rxcpjuisavo\"},{\"properties\":{\"displayName\":\"zfvazi\",\"domain\":[\"frqttbajlkatnw\"],\"dnsServerIps\":[\"opidkqqfkuv\",\"cxkdmligovi\"],\"sourceIp\":\"xk\",\"dnsServices\":5344178861543099367,\"provisioningState\":\"Deleting\",\"revision\":7839348907850790126},\"id\":\"cbgoor\",\"name\":\"te\",\"type\":\"ybfhjxa\"}],\"nextLink\":\"vjgsl\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"modfvuefywsbpfvm\",\"domain\":[\"rfouyftaakcpw\",\"yzvqt\"],\"dnsServerIps\":[\"bexkpzksmondj\"],\"sourceIp\":\"uxvypomgkopkwh\",\"dnsServices\":47183864428618035,\"provisioningState\":\"Canceled\",\"revision\":6027886219408436897},\"id\":\"smocmbq\",\"name\":\"qvmkcxo\",\"type\":\"apvhelxprgly\"},{\"properties\":{\"displayName\":\"dckcbc\",\"domain\":[\"rjxgciqib\",\"hos\",\"sdqrhzoymibmrq\",\"ibahwflus\"],\"dnsServerIps\":[\"mhrkwofyyvoqacp\",\"expbtg\",\"wbwo\",\"nwashrtd\"],\"sourceIp\":\"cnqxwbpokulpi\",\"dnsServices\":6830630218833714201,\"provisioningState\":\"Deleting\",\"revision\":1202571290361403211},\"id\":\"iobyu\",\"name\":\"erpqlpqwcciuqg\",\"type\":\"dbutauvfbtkuwhh\"},{\"properties\":{\"displayName\":\"k\",\"domain\":[\"xafnndlpichko\",\"mkcdyhbpkkpwdre\"],\"dnsServerIps\":[\"vvqfovljxyws\",\"w\",\"yrs\",\"dsytgadgvr\"],\"sourceIp\":\"aeneqnzarrwl\",\"dnsServices\":6003700384655384876,\"provisioningState\":\"Updating\",\"revision\":1802422075284970664},\"id\":\"e\",\"name\":\"iipfpubj\",\"type\":\"bwwift\"},{\"properties\":{\"displayName\":\"kvpuvksgplsaknyn\",\"domain\":[\"n\"],\"dnsServerIps\":[\"huopxodlqiynto\"],\"sourceIp\":\"ihleos\",\"dnsServices\":1042560535262747024,\"provisioningState\":\"Failed\",\"revision\":9060898955426619734},\"id\":\"rpzbchckqqzqi\",\"name\":\"xiy\",\"type\":\"uiizynke\"}],\"nextLink\":\"atrwyhqmibzyh\"}") .toObject(WorkloadNetworkDnsZonesList.class); - Assertions.assertEquals("oismsksbpimlqol", model.value().get(0).displayName()); - Assertions.assertEquals("cgxxlxs", model.value().get(0).domain().get(0)); - Assertions.assertEquals("gkfmins", model.value().get(0).dnsServerIps().get(0)); - Assertions.assertEquals("hbq", model.value().get(0).sourceIp()); - Assertions.assertEquals(2084936073486724926L, model.value().get(0).dnsServices()); - Assertions.assertEquals(5228889169279168273L, model.value().get(0).revision()); - Assertions.assertEquals("vjgsl", model.nextLink()); + Assertions.assertEquals("modfvuefywsbpfvm", model.value().get(0).displayName()); + Assertions.assertEquals("rfouyftaakcpw", model.value().get(0).domain().get(0)); + Assertions.assertEquals("bexkpzksmondj", model.value().get(0).dnsServerIps().get(0)); + Assertions.assertEquals("uxvypomgkopkwh", model.value().get(0).sourceIp()); + Assertions.assertEquals(47183864428618035L, model.value().get(0).dnsServices()); + Assertions.assertEquals(6027886219408436897L, model.value().get(0).revision()); + Assertions.assertEquals("atrwyhqmibzyh", 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 index 9d1591a3d226a..c2f559508cd7a 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkGatewayInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xhojuj\",\"path\":\"pelmcuvhixbjxyf\"},\"id\":\"yl\",\"name\":\"coolsttpkiwkkb\",\"type\":\"ujrywvtyl\"}") + "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"auwhvylwzbtdhx\",\"path\":\"znbmpowuwprzq\"},\"id\":\"eualupjmkhf\",\"name\":\"obbc\",\"type\":\"wsrtjriplrbpbe\"}") .toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("xhojuj", model.displayName()); + Assertions.assertEquals("auwhvylwzbtdhx", 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 index ab9ae6c6763d0..d263d1eb89651 100644 --- 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 @@ -12,9 +12,9 @@ public final class WorkloadNetworkGatewayListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"gjqppy\",\"path\":\"tronzmyhgfi\"},\"id\":\"sxkm\",\"name\":\"waekrrjreafxtsgu\",\"type\":\"hjglikk\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"lbqpvuzlmvfelf\",\"path\":\"gplcrpwjxeznoigb\"},\"id\":\"jwmwkpnbs\",\"name\":\"zejjoqk\",\"type\":\"gfhsxttaugzxn\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"xdtnkdmkqjjlw\",\"path\":\"nvrk\"},\"id\":\"ou\",\"name\":\"ibreb\",\"type\":\"aays\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"tnqttezlwfffiak\",\"path\":\"pqqmted\"},\"id\":\"mmji\",\"name\":\"yeozphvwauyqncy\",\"type\":\"upkvipmdsc\"}],\"nextLink\":\"qupevzh\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"meue\",\"path\":\"vyhzceuojgjrwj\"},\"id\":\"iotwmcdytdxwit\",\"name\":\"nrjawgqwg\",\"type\":\"hniskxfbkpyc\"}],\"nextLink\":\"lwn\"}") .toObject(WorkloadNetworkGatewayList.class); - Assertions.assertEquals("gjqppy", model.value().get(0).displayName()); - Assertions.assertEquals("qupevzh", model.nextLink()); + Assertions.assertEquals("meue", model.value().get(0).displayName()); + Assertions.assertEquals("lwn", 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 index c753364b64811..8dcb6adc036ab 100644 --- 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 @@ -11,9 +11,9 @@ public final class WorkloadNetworkGatewayPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkGatewayProperties model = BinaryData - .fromString("{\"provisioningState\":\"Building\",\"displayName\":\"curdoiwiitht\",\"path\":\"ubxcbihw\"}") - .toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("curdoiwiitht", model.displayName()); + WorkloadNetworkGatewayProperties model + = BinaryData.fromString("{\"provisioningState\":\"Updating\",\"displayName\":\"fgb\",\"path\":\"gw\"}") + .toObject(WorkloadNetworkGatewayProperties.class); + Assertions.assertEquals("fgb", 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 index f5c9499b60b69..012f68835bfe6 100644 --- 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 @@ -11,7 +11,7 @@ public final class WorkloadNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"sdsttwvog\",\"name\":\"bbejdcngqqm\",\"type\":\"akufgmjz\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"nehmpvecx\",\"name\":\"odebfqkkrbmpu\",\"type\":\"gr\"}") .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 index 6a0984ab5e757..abe447675fb70 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"bt\",\"name\":\"gsfraoyzkoow\",\"type\":\"lmnguxaw\"},{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"yuuximerqfobwyzn\",\"name\":\"bykutw\",\"type\":\"fhpagmhrskdsnf\"}],\"nextLink\":\"doakgtdlmkkzevdl\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"xzpuzycisp\",\"name\":\"qzahmgkbrp\",\"type\":\"y\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"uqqkpik\",\"name\":\"drgvtqagn\",\"type\":\"uynhijg\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"siarbutrcvpn\",\"name\":\"zzmhjrunmpxttd\",\"type\":\"hrbnlankxmyskpbh\"}],\"nextLink\":\"btkcxywnytnrsyn\"}") .toObject(WorkloadNetworkList.class); - Assertions.assertEquals("doakgtdlmkkzevdl", model.nextLink()); + Assertions.assertEquals("btkcxywnytnrsyn", 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 index 4be2e2b56f488..ba2f8da9bad0b 100644 --- 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 @@ -13,27 +13,27 @@ public final class WorkloadNetworkPortMirroringInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"ojlpijnkrxf\",\"direction\":\"EGRESS\",\"source\":\"c\",\"destination\":\"tizzronasxif\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":319144288054659459},\"id\":\"wesgogczh\",\"name\":\"nnxk\",\"type\":\"lgnyhmo\"}") + "{\"properties\":{\"displayName\":\"xknalaulppg\",\"direction\":\"INGRESS\",\"source\":\"napnyiropuhpigv\",\"destination\":\"ylgqgitxmedjvcsl\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":1214544725492398973},\"id\":\"zhxgktrmgucn\",\"name\":\"pkteo\",\"type\":\"llwptfdy\"}") .toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("ojlpijnkrxf", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); - Assertions.assertEquals("c", model.source()); - Assertions.assertEquals("tizzronasxif", model.destination()); - Assertions.assertEquals(319144288054659459L, model.revision()); + Assertions.assertEquals("xknalaulppg", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("napnyiropuhpigv", model.source()); + Assertions.assertEquals("ylgqgitxmedjvcsl", model.destination()); + Assertions.assertEquals(1214544725492398973L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("ojlpijnkrxf") - .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("c") - .withDestination("tizzronasxif") - .withRevision(319144288054659459L); + WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("xknalaulppg") + .withDirection(PortMirroringDirectionEnum.INGRESS) + .withSource("napnyiropuhpigv") + .withDestination("ylgqgitxmedjvcsl") + .withRevision(1214544725492398973L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("ojlpijnkrxf", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); - Assertions.assertEquals("c", model.source()); - Assertions.assertEquals("tizzronasxif", model.destination()); - Assertions.assertEquals(319144288054659459L, model.revision()); + Assertions.assertEquals("xknalaulppg", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); + Assertions.assertEquals("napnyiropuhpigv", model.source()); + Assertions.assertEquals("ylgqgitxmedjvcsl", model.destination()); + Assertions.assertEquals(1214544725492398973L, 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 index c9d9728a5899e..dc6928bc6a1bd 100644 --- 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 @@ -13,13 +13,13 @@ public final class WorkloadNetworkPortMirroringListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"dntwjchrdgo\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"mwctondzjluudfd\",\"destination\":\"gg\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":5516945390083190100},\"id\":\"tgseinqfiufxqkn\",\"name\":\"irgne\",\"type\":\"ttwqmsni\"}],\"nextLink\":\"cdm\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"v\",\"direction\":\"EGRESS\",\"source\":\"begibtnmxiebwwa\",\"destination\":\"ayqcgw\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":4790866258005538380},\"id\":\"zmh\",\"name\":\"xongmtsavjcbpwxq\",\"type\":\"srknftguv\"},{\"properties\":{\"displayName\":\"hprwmdyv\",\"direction\":\"INGRESS\",\"source\":\"yriwwroyqb\",\"destination\":\"rmcqiby\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":6160997583833316786},\"id\":\"fqsgzvahapjy\",\"name\":\"hpvgqz\",\"type\":\"j\"},{\"properties\":{\"displayName\":\"djzlmwlx\",\"direction\":\"EGRESS\",\"source\":\"fhzovawjvzunluth\",\"destination\":\"prnxipeil\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":7642090703106785822},\"id\":\"ultskzbbtdz\",\"name\":\"mv\",\"type\":\"ekg\"},{\"properties\":{\"displayName\":\"zuhkfpbsjyof\",\"direction\":\"INGRESS\",\"source\":\"us\",\"destination\":\"touwaboekqv\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":2434745920403430654},\"id\":\"wyjsflhhcaalnjix\",\"name\":\"sxyawjoyaqcs\",\"type\":\"yjpkiidzyexz\"}],\"nextLink\":\"lixhnrztfol\"}") .toObject(WorkloadNetworkPortMirroringList.class); - Assertions.assertEquals("dntwjchrdgo", model.value().get(0).displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.value().get(0).direction()); - Assertions.assertEquals("mwctondzjluudfd", model.value().get(0).source()); - Assertions.assertEquals("gg", model.value().get(0).destination()); - Assertions.assertEquals(5516945390083190100L, model.value().get(0).revision()); - Assertions.assertEquals("cdm", model.nextLink()); + Assertions.assertEquals("v", model.value().get(0).displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.value().get(0).direction()); + Assertions.assertEquals("begibtnmxiebwwa", model.value().get(0).source()); + Assertions.assertEquals("ayqcgw", model.value().get(0).destination()); + Assertions.assertEquals(4790866258005538380L, model.value().get(0).revision()); + Assertions.assertEquals("lixhnrztfol", 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 index 9102d8a114889..62efeb475301b 100644 --- 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 @@ -13,28 +13,28 @@ public final class WorkloadNetworkPortMirroringPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringProperties model = BinaryData.fromString( - "{\"displayName\":\"xkk\",\"direction\":\"INGRESS\",\"source\":\"rghxjb\",\"destination\":\"qxvcxgfrpdsofb\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":20984502868975858}") + "{\"displayName\":\"fqbuaceopzf\",\"direction\":\"INGRESS\",\"source\":\"uaopppcqeq\",\"destination\":\"lzdahzxctobgbkdm\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":753837388632017239}") .toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("xkk", model.displayName()); + Assertions.assertEquals("fqbuaceopzf", model.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("rghxjb", model.source()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.destination()); - Assertions.assertEquals(20984502868975858L, model.revision()); + Assertions.assertEquals("uaopppcqeq", model.source()); + Assertions.assertEquals("lzdahzxctobgbkdm", model.destination()); + Assertions.assertEquals(753837388632017239L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPortMirroringProperties model - = new WorkloadNetworkPortMirroringProperties().withDisplayName("xkk") + = new WorkloadNetworkPortMirroringProperties().withDisplayName("fqbuaceopzf") .withDirection(PortMirroringDirectionEnum.INGRESS) - .withSource("rghxjb") - .withDestination("qxvcxgfrpdsofb") - .withRevision(20984502868975858L); + .withSource("uaopppcqeq") + .withDestination("lzdahzxctobgbkdm") + .withRevision(753837388632017239L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("xkk", model.displayName()); + Assertions.assertEquals("fqbuaceopzf", model.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("rghxjb", model.source()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.destination()); - Assertions.assertEquals(20984502868975858L, model.revision()); + Assertions.assertEquals("uaopppcqeq", model.source()); + Assertions.assertEquals("lzdahzxctobgbkdm", model.destination()); + Assertions.assertEquals(753837388632017239L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java index 1294038584249..1284594ed1830 100644 --- 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 @@ -12,10 +12,10 @@ public final class WorkloadNetworkPublicIPsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIPsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"myst\",\"numberOfPublicIPs\":885610274962208064,\"publicIPBlock\":\"pfcvlerchpqbmfp\",\"provisioningState\":\"Updating\"},\"id\":\"widf\",\"name\":\"xsspuunnoxyhk\",\"type\":\"g\"},{\"properties\":{\"displayName\":\"rihpfhoq\",\"numberOfPublicIPs\":1011085759791678741,\"publicIPBlock\":\"dao\",\"provisioningState\":\"Updating\"},\"id\":\"l\",\"name\":\"jxxkzbrmsgei\",\"type\":\"siykzkdncjdxonbz\"}],\"nextLink\":\"gculap\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"gpiohgwxrtfudxe\",\"numberOfPublicIPs\":6514858021429691884,\"publicIPBlock\":\"agvrvmnpkuk\",\"provisioningState\":\"Building\"},\"id\":\"dblx\",\"name\":\"wi\",\"type\":\"fnjhfjxwmszkkfo\"}],\"nextLink\":\"eyfkzikfja\"}") .toObject(WorkloadNetworkPublicIPsList.class); - Assertions.assertEquals("myst", model.value().get(0).displayName()); - Assertions.assertEquals(885610274962208064L, model.value().get(0).numberOfPublicIPs()); - Assertions.assertEquals("gculap", model.nextLink()); + Assertions.assertEquals("gpiohgwxrtfudxe", model.value().get(0).displayName()); + Assertions.assertEquals(6514858021429691884L, model.value().get(0).numberOfPublicIPs()); + Assertions.assertEquals("eyfkzikfja", 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 index c5cda7b61762f..eae414653df60 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"rpgogtqxep\",\"numberOfPublicIPs\":4258812781218679511,\"publicIPBlock\":\"uajlyj\",\"provisioningState\":\"Building\"},\"id\":\"fqzhv\",\"name\":\"cib\",\"type\":\"fmo\"}") + "{\"properties\":{\"displayName\":\"a\",\"numberOfPublicIPs\":2753110503115800438,\"publicIPBlock\":\"zel\",\"provisioningState\":\"Canceled\"},\"id\":\"elsfeaen\",\"name\":\"abfatkl\",\"type\":\"dxbjhwuaanozj\"}") .toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("rpgogtqxep", model.displayName()); - Assertions.assertEquals(4258812781218679511L, model.numberOfPublicIPs()); + Assertions.assertEquals("a", model.displayName()); + Assertions.assertEquals(2753110503115800438L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpInner model = new WorkloadNetworkPublicIpInner().withDisplayName("rpgogtqxep") - .withNumberOfPublicIPs(4258812781218679511L); + WorkloadNetworkPublicIpInner model + = new WorkloadNetworkPublicIpInner().withDisplayName("a").withNumberOfPublicIPs(2753110503115800438L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("rpgogtqxep", model.displayName()); - Assertions.assertEquals(4258812781218679511L, model.numberOfPublicIPs()); + Assertions.assertEquals("a", model.displayName()); + Assertions.assertEquals(2753110503115800438L, 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 index e12a3097dfba5..ec8cfb0dbb53f 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpProperties model = BinaryData.fromString( - "{\"displayName\":\"xrkjpvdw\",\"numberOfPublicIPs\":4789424331234549662,\"publicIPBlock\":\"ivwzjbhyzs\",\"provisioningState\":\"Updating\"}") + "{\"displayName\":\"ph\",\"numberOfPublicIPs\":5037944209655699604,\"publicIPBlock\":\"jrvxaglrv\",\"provisioningState\":\"Canceled\"}") .toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("xrkjpvdw", model.displayName()); - Assertions.assertEquals(4789424331234549662L, model.numberOfPublicIPs()); + Assertions.assertEquals("ph", model.displayName()); + Assertions.assertEquals(5037944209655699604L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpProperties model = new WorkloadNetworkPublicIpProperties().withDisplayName("xrkjpvdw") - .withNumberOfPublicIPs(4789424331234549662L); + WorkloadNetworkPublicIpProperties model + = new WorkloadNetworkPublicIpProperties().withDisplayName("ph").withNumberOfPublicIPs(5037944209655699604L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("xrkjpvdw", model.displayName()); - Assertions.assertEquals(4789424331234549662L, model.numberOfPublicIPs()); + Assertions.assertEquals("ph", model.displayName()); + Assertions.assertEquals(5037944209655699604L, 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 index d2062517029df..49a43344844b9 100644 --- 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 @@ -14,27 +14,28 @@ public final class WorkloadNetworkSegmentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"twbdsrezpdrhn\",\"connectedGateway\":\"yowqkdwytisibir\",\"subnet\":{\"dhcpRanges\":[\"kpzi\",\"ejzanlfz\",\"iavrm\"],\"gatewayAddress\":\"onok\"},\"portVif\":[{\"portName\":\"q\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2813820823921531110},\"id\":\"azszrnwoiindfpw\",\"name\":\"jylwbtlhflsj\",\"type\":\"dhszfjv\"}") + "{\"properties\":{\"displayName\":\"iuebbaumny\",\"connectedGateway\":\"ped\",\"subnet\":{\"dhcpRanges\":[\"a\",\"ckhsmtxpsieb\",\"fhvpesaps\"],\"gatewayAddress\":\"dqmh\"},\"portVif\":[{\"portName\":\"tldwkyzxuutk\"},{\"portName\":\"ws\"},{\"portName\":\"svlxotogtwrup\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":896120017372838413},\"id\":\"kvceoveilovnotyf\",\"name\":\"fcnj\",\"type\":\"k\"}") .toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("twbdsrezpdrhn", model.displayName()); - Assertions.assertEquals("yowqkdwytisibir", model.connectedGateway()); - Assertions.assertEquals("kpzi", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("onok", model.subnet().gatewayAddress()); - Assertions.assertEquals(2813820823921531110L, model.revision()); + Assertions.assertEquals("iuebbaumny", model.displayName()); + Assertions.assertEquals("ped", model.connectedGateway()); + Assertions.assertEquals("a", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("dqmh", model.subnet().gatewayAddress()); + Assertions.assertEquals(896120017372838413L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("twbdsrezpdrhn") - .withConnectedGateway("yowqkdwytisibir") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("kpzi", "ejzanlfz", "iavrm")) - .withGatewayAddress("onok")) - .withRevision(2813820823921531110L); + WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("iuebbaumny") + .withConnectedGateway("ped") + .withSubnet( + new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("a", "ckhsmtxpsieb", "fhvpesaps")) + .withGatewayAddress("dqmh")) + .withRevision(896120017372838413L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("twbdsrezpdrhn", model.displayName()); - Assertions.assertEquals("yowqkdwytisibir", model.connectedGateway()); - Assertions.assertEquals("kpzi", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("onok", model.subnet().gatewayAddress()); - Assertions.assertEquals(2813820823921531110L, model.revision()); + Assertions.assertEquals("iuebbaumny", model.displayName()); + Assertions.assertEquals("ped", model.connectedGateway()); + Assertions.assertEquals("a", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("dqmh", model.subnet().gatewayAddress()); + Assertions.assertEquals(896120017372838413L, 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 index e8b62179f2fb8..cc647a81f2d17 100644 --- 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 @@ -12,7 +12,7 @@ public final class WorkloadNetworkSegmentPortVifTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentPortVif model - = BinaryData.fromString("{\"portName\":\"yajguqfhwygzlv\"}").toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("yajguqfhwygzlv", model.portName()); + = BinaryData.fromString("{\"portName\":\"nobglaocq\"}").toObject(WorkloadNetworkSegmentPortVif.class); + Assertions.assertEquals("nobglaocq", 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 index 01443c72ec230..4ad02aec5b62d 100644 --- 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 @@ -14,28 +14,27 @@ public final class WorkloadNetworkSegmentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentProperties model = BinaryData.fromString( - "{\"displayName\":\"gofel\",\"connectedGateway\":\"grqmqhldvrii\",\"subnet\":{\"dhcpRanges\":[\"al\",\"hfkvtvsexsowuel\",\"qhhahhxvrhmzkwpj\",\"wws\"],\"gatewayAddress\":\"ghftqsxhqxujxuk\"},\"portVif\":[{\"portName\":\"igrjguufzdm\"},{\"portName\":\"qtfihwhbotzinga\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":3853655697248732253}") + "{\"displayName\":\"x\",\"connectedGateway\":\"bttk\",\"subnet\":{\"dhcpRanges\":[\"pnvjtoqnermclf\"],\"gatewayAddress\":\"phoxus\"},\"portVif\":[{\"portName\":\"bgyepsbj\"},{\"portName\":\"zq\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":5351409570335896037}") .toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("gofel", model.displayName()); - Assertions.assertEquals("grqmqhldvrii", model.connectedGateway()); - Assertions.assertEquals("al", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("ghftqsxhqxujxuk", model.subnet().gatewayAddress()); - Assertions.assertEquals(3853655697248732253L, model.revision()); + Assertions.assertEquals("x", model.displayName()); + Assertions.assertEquals("bttk", model.connectedGateway()); + Assertions.assertEquals("pnvjtoqnermclf", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("phoxus", model.subnet().gatewayAddress()); + Assertions.assertEquals(5351409570335896037L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("gofel") - .withConnectedGateway("grqmqhldvrii") - .withSubnet(new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("al", "hfkvtvsexsowuel", "qhhahhxvrhmzkwpj", "wws")) - .withGatewayAddress("ghftqsxhqxujxuk")) - .withRevision(3853655697248732253L); + WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("x") + .withConnectedGateway("bttk") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("pnvjtoqnermclf")) + .withGatewayAddress("phoxus")) + .withRevision(5351409570335896037L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("gofel", model.displayName()); - Assertions.assertEquals("grqmqhldvrii", model.connectedGateway()); - Assertions.assertEquals("al", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("ghftqsxhqxujxuk", model.subnet().gatewayAddress()); - Assertions.assertEquals(3853655697248732253L, model.revision()); + Assertions.assertEquals("x", model.displayName()); + Assertions.assertEquals("bttk", model.connectedGateway()); + Assertions.assertEquals("pnvjtoqnermclf", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("phoxus", model.subnet().gatewayAddress()); + Assertions.assertEquals(5351409570335896037L, 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 index 2133394c7181a..7370e0bf9ca90 100644 --- 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 @@ -12,20 +12,19 @@ public final class WorkloadNetworkSegmentSubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkSegmentSubnet model = BinaryData.fromString( - "{\"dhcpRanges\":[\"udphqamvdkfwyn\",\"cvtbv\",\"ayhmtnvyqiatkz\",\"pcnp\"],\"gatewayAddress\":\"cjaesgvvs\"}") - .toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("udphqamvdkfwyn", model.dhcpRanges().get(0)); - Assertions.assertEquals("cjaesgvvs", model.gatewayAddress()); + WorkloadNetworkSegmentSubnet model + = BinaryData.fromString("{\"dhcpRanges\":[\"fjz\"],\"gatewayAddress\":\"qkqujidsu\"}") + .toObject(WorkloadNetworkSegmentSubnet.class); + Assertions.assertEquals("fjz", model.dhcpRanges().get(0)); + Assertions.assertEquals("qkqujidsu", model.gatewayAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentSubnet model = new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("udphqamvdkfwyn", "cvtbv", "ayhmtnvyqiatkz", "pcnp")) - .withGatewayAddress("cjaesgvvs"); + WorkloadNetworkSegmentSubnet model + = new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("fjz")).withGatewayAddress("qkqujidsu"); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("udphqamvdkfwyn", model.dhcpRanges().get(0)); - Assertions.assertEquals("cjaesgvvs", model.gatewayAddress()); + Assertions.assertEquals("fjz", model.dhcpRanges().get(0)); + Assertions.assertEquals("qkqujidsu", 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 index 0f49df96e10b3..e0d5505ca2cad 100644 --- 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 @@ -12,13 +12,13 @@ public final class WorkloadNetworkSegmentsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"twaenuuzko\",\"connectedGateway\":\"minrfdw\",\"subnet\":{\"dhcpRanges\":[\"hziuiefozbhdms\",\"l\"],\"gatewayAddress\":\"qhoftrmaequiah\"},\"portVif\":[{\"portName\":\"lfaoqzpiyylhaln\"},{\"portName\":\"hc\"},{\"portName\":\"ph\"},{\"portName\":\"ivwitqscywugg\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":6648537753700098134},\"id\":\"emh\",\"name\":\"i\",\"type\":\"sbrgz\"},{\"properties\":{\"displayName\":\"swe\",\"connectedGateway\":\"qwdxggicc\",\"subnet\":{\"dhcpRanges\":[\"huexmk\",\"tlstvlzywem\"],\"gatewayAddress\":\"rncsdtclu\"},\"portVif\":[{\"portName\":\"bsfgytguslfea\"},{\"portName\":\"ygqukyhejh\"},{\"portName\":\"sx\"},{\"portName\":\"pelol\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":8128051497759597763},\"id\":\"ujzra\",\"name\":\"htwdwrftswibyrcd\",\"type\":\"bhshfwpracstwity\"},{\"properties\":{\"displayName\":\"vxccedcp\",\"connectedGateway\":\"dyodnwzxltj\",\"subnet\":{\"dhcpRanges\":[\"ltiugcxnavv\"],\"gatewayAddress\":\"qiby\"},\"portVif\":[{\"portName\":\"owx\"},{\"portName\":\"mdjrkvfgbvfvp\"},{\"portName\":\"odacizs\"},{\"portName\":\"lhkrribdeibqipqk\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":4034217572792949127},\"id\":\"krefajpjo\",\"name\":\"wkqnyhg\",\"type\":\"ij\"},{\"properties\":{\"displayName\":\"vfxzsjab\",\"connectedGateway\":\"systawfsdjp\",\"subnet\":{\"dhcpRanges\":[\"bjxbkzbzk\"],\"gatewayAddress\":\"ncj\"},\"portVif\":[{\"portName\":\"urgkakmokzhjjk\"},{\"portName\":\"fhmouwq\"},{\"portName\":\"zrfze\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":7551956675766407600},\"id\":\"yuhqlbjbsybbqwrv\",\"name\":\"ldgmfpgvmpip\",\"type\":\"slthaq\"}],\"nextLink\":\"ss\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"ybyxc\",\"connectedGateway\":\"clha\",\"subnet\":{\"dhcpRanges\":[\"abphlw\",\"qlfktsths\",\"cocmnyyaztt\"],\"gatewayAddress\":\"wwrq\"},\"portVif\":[{\"portName\":\"ckzywbiexzfeyue\"},{\"portName\":\"ibx\"},{\"portName\":\"wbhqwal\"},{\"portName\":\"zyoxaepdkzjan\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3067424612233139925},\"id\":\"v\",\"name\":\"bniwdj\",\"type\":\"wz\"},{\"properties\":{\"displayName\":\"bpg\",\"connectedGateway\":\"ytxhp\",\"subnet\":{\"dhcpRanges\":[\"pfza\",\"glcuhxwtctyqi\",\"lbbovplw\"],\"gatewayAddress\":\"hvgyuguosvmk\"},\"portVif\":[{\"portName\":\"qukkfp\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":6280051526633281163},\"id\":\"zkd\",\"name\":\"slpvlop\",\"type\":\"i\"}],\"nextLink\":\"ghxpkdw\"}") .toObject(WorkloadNetworkSegmentsList.class); - Assertions.assertEquals("twaenuuzko", model.value().get(0).displayName()); - Assertions.assertEquals("minrfdw", model.value().get(0).connectedGateway()); - Assertions.assertEquals("hziuiefozbhdms", model.value().get(0).subnet().dhcpRanges().get(0)); - Assertions.assertEquals("qhoftrmaequiah", model.value().get(0).subnet().gatewayAddress()); - Assertions.assertEquals(6648537753700098134L, model.value().get(0).revision()); - Assertions.assertEquals("ss", model.nextLink()); + Assertions.assertEquals("ybyxc", model.value().get(0).displayName()); + Assertions.assertEquals("clha", model.value().get(0).connectedGateway()); + Assertions.assertEquals("abphlw", model.value().get(0).subnet().dhcpRanges().get(0)); + Assertions.assertEquals("wwrq", model.value().get(0).subnet().gatewayAddress()); + Assertions.assertEquals(3067424612233139925L, model.value().get(0).revision()); + Assertions.assertEquals("ghxpkdw", 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 index 27fdc501eba14..d59b437cb8cf1 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkVMGroupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"umrtwnawjsl\",\"members\":[\"kojgcyzts\",\"mznbaeqphch\",\"nrnrp\",\"ehuwrykqgaifmvik\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":8629783382496754434},\"id\":\"jdz\",\"name\":\"xcv\",\"type\":\"srhnjivo\"}") + "{\"properties\":{\"displayName\":\"fqqnvwpmqtaruo\",\"members\":[\"kcjhwqytjrybnwj\",\"wgdrjervnaenqp\",\"hin\",\"oygmift\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":1265885080326792756},\"id\":\"nayqi\",\"name\":\"ynduha\",\"type\":\"hqlkthumaqo\"}") .toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("umrtwnawjsl", model.displayName()); - Assertions.assertEquals("kojgcyzts", model.members().get(0)); - Assertions.assertEquals(8629783382496754434L, model.revision()); + Assertions.assertEquals("fqqnvwpmqtaruo", model.displayName()); + Assertions.assertEquals("kcjhwqytjrybnwj", model.members().get(0)); + Assertions.assertEquals(1265885080326792756L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("umrtwnawjsl") - .withMembers(Arrays.asList("kojgcyzts", "mznbaeqphch", "nrnrp", "ehuwrykqgaifmvik")) - .withRevision(8629783382496754434L); + WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("fqqnvwpmqtaruo") + .withMembers(Arrays.asList("kcjhwqytjrybnwj", "wgdrjervnaenqp", "hin", "oygmift")) + .withRevision(1265885080326792756L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("umrtwnawjsl", model.displayName()); - Assertions.assertEquals("kojgcyzts", model.members().get(0)); - Assertions.assertEquals(8629783382496754434L, model.revision()); + Assertions.assertEquals("fqqnvwpmqtaruo", model.displayName()); + Assertions.assertEquals("kcjhwqytjrybnwj", model.members().get(0)); + Assertions.assertEquals(1265885080326792756L, 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 index eefcd87ba814b..dfed30858cd42 100644 --- 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 @@ -13,22 +13,21 @@ public final class WorkloadNetworkVMGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupProperties model = BinaryData.fromString( - "{\"displayName\":\"tnovqfzgemjdftul\",\"members\":[\"duceamtmc\",\"u\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":708418830447367497}") + "{\"displayName\":\"gycdu\",\"members\":[\"tgccymvaolpss\"],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":940610692718193227}") .toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("tnovqfzgemjdftul", model.displayName()); - Assertions.assertEquals("duceamtmc", model.members().get(0)); - Assertions.assertEquals(708418830447367497L, model.revision()); + Assertions.assertEquals("gycdu", model.displayName()); + Assertions.assertEquals("tgccymvaolpss", model.members().get(0)); + Assertions.assertEquals(940610692718193227L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupProperties model - = new WorkloadNetworkVMGroupProperties().withDisplayName("tnovqfzgemjdftul") - .withMembers(Arrays.asList("duceamtmc", "u")) - .withRevision(708418830447367497L); + WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("gycdu") + .withMembers(Arrays.asList("tgccymvaolpss")) + .withRevision(940610692718193227L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("tnovqfzgemjdftul", model.displayName()); - Assertions.assertEquals("duceamtmc", model.members().get(0)); - Assertions.assertEquals(708418830447367497L, model.revision()); + Assertions.assertEquals("gycdu", model.displayName()); + Assertions.assertEquals("tgccymvaolpss", model.members().get(0)); + Assertions.assertEquals(940610692718193227L, 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 index 1924248c3d56f..2f8d1b6195561 100644 --- 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 @@ -12,11 +12,11 @@ public final class WorkloadNetworkVMGroupsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"vz\",\"members\":[\"ycnunvjsrtk\",\"awnopqgikyzirtxd\",\"uxzejntpsew\",\"ioilqukrydxtq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":5252415972799158831},\"id\":\"ufhyaomtbgh\",\"name\":\"avgrvkffovjz\",\"type\":\"pjbi\"},{\"properties\":{\"displayName\":\"mfxumvfcluyovw\",\"members\":[\"kfezzxscyhwz\",\"g\",\"rujbzbomvzzbtdc\",\"vp\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":4156012930167419412},\"id\":\"wdsh\",\"name\":\"ssnrbgye\",\"type\":\"rymsgaojfmw\"},{\"properties\":{\"displayName\":\"tmr\",\"members\":[\"rctym\",\"xoftpipiwyczu\",\"xacpqjli\",\"hyus\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":5972606310193139455},\"id\":\"fwdgzxulucvp\",\"name\":\"mrsreuzvxurisjnh\",\"type\":\"ytxifqjzgxmrh\"},{\"properties\":{\"displayName\":\"wp\",\"members\":[\"utr\",\"jupauut\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2623463508515246746},\"id\":\"qg\",\"name\":\"zpnfqntcypsxj\",\"type\":\"foimwkslircizjxv\"}],\"nextLink\":\"fceacvlhvygd\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"fbunrmfqjhhk\",\"members\":[\"vjymjhxxjyngud\",\"vkr\",\"swbxqz\",\"szjfauvjfdxxivet\"],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":3137986994872936614},\"id\":\"qmcbxvwvxyslqbhs\",\"name\":\"xoblytkbl\",\"type\":\"pe\"},{\"properties\":{\"displayName\":\"fbkrvrnsvs\",\"members\":[\"ohxcrsbfova\",\"rruvwbhsq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":2319304863641210663},\"id\":\"rxbpyb\",\"name\":\"rfbjf\",\"type\":\"twss\"}],\"nextLink\":\"ftpvjzbexil\"}") .toObject(WorkloadNetworkVMGroupsList.class); - Assertions.assertEquals("vz", model.value().get(0).displayName()); - Assertions.assertEquals("ycnunvjsrtk", model.value().get(0).members().get(0)); - Assertions.assertEquals(5252415972799158831L, model.value().get(0).revision()); - Assertions.assertEquals("fceacvlhvygd", model.nextLink()); + Assertions.assertEquals("fbunrmfqjhhk", model.value().get(0).displayName()); + Assertions.assertEquals("vjymjhxxjyngud", model.value().get(0).members().get(0)); + Assertions.assertEquals(3137986994872936614L, model.value().get(0).revision()); + Assertions.assertEquals("ftpvjzbexil", 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 index efc1e08f2c55a..a167d2907bd09 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"txhwgfws\",\"vmType\":\"EDGE\"},\"id\":\"coezbrhubskh\",\"name\":\"dyg\",\"type\":\"ookk\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xunkbebxmubyynt\",\"vmType\":\"SERVICE\"},\"id\":\"qtkoievs\",\"name\":\"otgqrlltmu\",\"type\":\"lauwzizxbmpgcjef\"}") .toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("txhwgfws", model.displayName()); + Assertions.assertEquals("xunkbebxmubyynt", 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 index 8b4e138445626..a87f6c2b74998 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineProperties model = BinaryData - .fromString("{\"provisioningState\":\"Failed\",\"displayName\":\"bvleorfmluiqtqzf\",\"vmType\":\"EDGE\"}") + .fromString("{\"provisioningState\":\"Building\",\"displayName\":\"vpbttd\",\"vmType\":\"REGULAR\"}") .toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("bvleorfmluiqtqzf", model.displayName()); + Assertions.assertEquals("vpbttd", 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 index 4ef437d6a5754..ab236e256490a 100644 --- 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 @@ -12,9 +12,9 @@ public final class WorkloadNetworkVirtualMachinesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"ssxmojms\",\"vmType\":\"REGULAR\"},\"id\":\"prvkwcfzqljyxgtc\",\"name\":\"heyd\",\"type\":\"sdshmkxmaehvb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"pltfnhtba\",\"vmType\":\"EDGE\"},\"id\":\"ywrckp\",\"name\":\"kl\",\"type\":\"hpluodpvruudlg\"},{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"ostgkts\",\"vmType\":\"EDGE\"},\"id\":\"eclze\",\"name\":\"qbcvhzlhplod\",\"type\":\"kdl\"}],\"nextLink\":\"qfbumlkxtrqjf\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"pswiydmcwyh\",\"vmType\":\"EDGE\"},\"id\":\"sadbz\",\"name\":\"nvdfznuda\",\"type\":\"dvxzbncblylpst\"},{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"srzdzucerscdn\",\"vmType\":\"EDGE\"},\"id\":\"fiwjmygtdssls\",\"name\":\"tmweriofzpyq\",\"type\":\"emwabnet\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"h\",\"vmType\":\"SERVICE\"},\"id\":\"vwiwubmwmbesld\",\"name\":\"k\",\"type\":\"wtppjflcxogaoko\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ikvmkqzeqqk\",\"vmType\":\"EDGE\"},\"id\":\"zxmhhvhgu\",\"name\":\"eodkwobda\",\"type\":\"xtibqdxbxwakbog\"}],\"nextLink\":\"ndlkzgxhurip\"}") .toObject(WorkloadNetworkVirtualMachinesList.class); - Assertions.assertEquals("ssxmojms", model.value().get(0).displayName()); - Assertions.assertEquals("qfbumlkxtrqjf", model.nextLink()); + Assertions.assertEquals("pswiydmcwyh", model.value().get(0).displayName()); + Assertions.assertEquals("ndlkzgxhurip", 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 index b37f411f9f45e..c29ddab9b2146 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDhcpMockTests { @Test public void testCreateDhcp() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"leohibetnluankr\",\"segments\":[\"eeebtijvacv\",\"mq\",\"bqqxlaj\",\"nw\"],\"provisioningState\":\"Succeeded\",\"revision\":2784430533313824675},\"id\":\"jkuyxoafgaoq\",\"name\":\"tfaeyl\",\"type\":\"nm\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"dbxiqx\",\"segments\":[\"qbi\"],\"provisioningState\":\"Succeeded\",\"revision\":8599129879041195157},\"id\":\"nhe\",\"name\":\"f\",\"type\":\"pofvwb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testCreateDhcp() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDhcp response = manager.workloadNetworks() - .defineDhcp("rzpasccbiuimzdly") - .withExistingWorkloadNetwork("aiouaubrjt", "oq", "fuojrngif") + .defineDhcp("gzwywak") + .withExistingPrivateCloud("s", "sphaivmxyasflvg") .withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("qwmkyoquf").withRevision(4194786245193898311L)) + new WorkloadNetworkDhcpEntity().withDisplayName("knsmjblmljhlnymz").withRevision(2855783179854311369L)) .create(); - Assertions.assertEquals("leohibetnluankr", response.properties().displayName()); - Assertions.assertEquals(2784430533313824675L, response.properties().revision()); + Assertions.assertEquals("dbxiqx", response.properties().displayName()); + Assertions.assertEquals(8599129879041195157L, 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 index 05b0941487e86..ec2dc3ae5e397 100644 --- 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateDnsServiceMockTests { @Test public void testCreateDnsService() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"ids\",\"dnsServiceIp\":\"ultxijjumfq\",\"defaultDnsZone\":\"z\",\"fqdnZones\":[\"nm\",\"jng\",\"qdqx\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":5760443423859824953},\"id\":\"zsvtuikzhajqgl\",\"name\":\"fh\",\"type\":\"l\"}"; + = "{\"properties\":{\"displayName\":\"lzok\",\"dnsServiceIp\":\"ox\",\"defaultDnsZone\":\"lnjetaglt\",\"fqdnZones\":[\"atftgzpnpbsw\",\"e\",\"loccsrmozihm\",\"pgawtxxpkyjcxcjx\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":7160892458188162484},\"id\":\"lrmcaykg\",\"name\":\"noxuztrksx\",\"type\":\"pndfcpfnznt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,21 @@ public void testCreateDnsService() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsService response = manager.workloadNetworks() - .defineDnsService("hahzvechndbnwi") - .withExistingWorkloadNetwork("prprsnmokay", "ejnhlbkpb", "pcpil") - .withDisplayName("lewjwiuubwef") - .withDnsServiceIp("fapaqtfer") - .withDefaultDnsZone("wexjkmfxapjwogq") - .withFqdnZones(Arrays.asList("bpudcdab")) - .withLogLevel(DnsServiceLogLevelEnum.DEBUG) - .withRevision(8313394416637011338L) + .defineDnsService("jizcilnghgs") + .withExistingPrivateCloud("xgvelfclduccbird", "vuwcobiegstmnin") + .withDisplayName("jtbxqmuluxlx") + .withDnsServiceIp("vnersbycucrw") + .withDefaultDnsZone("mikzeb") + .withFqdnZones(Arrays.asList("smswziqgfuh", "kzruswh", "hczznvf")) + .withLogLevel(DnsServiceLogLevelEnum.ERROR) + .withRevision(2787720683354183168L) .create(); - Assertions.assertEquals("ids", response.displayName()); - Assertions.assertEquals("ultxijjumfq", response.dnsServiceIp()); - Assertions.assertEquals("z", response.defaultDnsZone()); - Assertions.assertEquals("nm", response.fqdnZones().get(0)); + Assertions.assertEquals("lzok", response.displayName()); + Assertions.assertEquals("ox", response.dnsServiceIp()); + Assertions.assertEquals("lnjetaglt", response.defaultDnsZone()); + Assertions.assertEquals("atftgzpnpbsw", response.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.logLevel()); - Assertions.assertEquals(5760443423859824953L, response.revision()); + Assertions.assertEquals(7160892458188162484L, 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 index db9087f2b29b6..c94613fc5951e 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDnsZoneMockTests { @Test public void testCreateDnsZone() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"lkafhonqjuje\",\"domain\":[\"pzvcpopmxelnwc\",\"tyjedex\",\"mlfmkqs\",\"azuawx\"],\"dnsServerIps\":[\"puamwabzxr\"],\"sourceIp\":\"cush\",\"dnsServices\":5616883092736591366,\"provisioningState\":\"Succeeded\",\"revision\":4154943067306073010},\"id\":\"sflvgsgzwywakoih\",\"name\":\"nsmjbl\",\"type\":\"ljhlnymzotq\"}"; + = "{\"properties\":{\"displayName\":\"kpak\",\"domain\":[\"fmjnnawtqa\",\"pxuckpggq\"],\"dnsServerIps\":[\"yirdhlisngwflqq\",\"pizruwnpqxpxiw\",\"cng\"],\"sourceIp\":\"aas\",\"dnsServices\":4326560645886577311,\"provisioningState\":\"Succeeded\",\"revision\":6093602471363921614},\"id\":\"viirhgfgrws\",\"name\":\"pgratzvzbglbyvi\",\"type\":\"tctbrxkjzwrgxffm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,21 +32,21 @@ public void testCreateDnsZone() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsZone response = manager.workloadNetworks() - .defineDnsZone("hv") - .withExistingWorkloadNetwork("qryxyn", "nzrdpsovwxz", "ptgoeiybbabp") - .withDisplayName("kvntjlrigjkskyri") - .withDomain(Arrays.asList("zid", "xwaabzmifrygznmm", "xrizkzobgop")) - .withDnsServerIps(Arrays.asList("slnelx")) - .withSourceIp("ixynllxecwcrojp") - .withDnsServices(2433482650518056787L) - .withRevision(8260049170746325095L) + .defineDnsZone("smgbzahgxqdl") + .withExistingPrivateCloud("jtwkjaos", "xuzvoamktcqi") + .withDisplayName("ltlaprltzkatbhj") + .withDomain(Arrays.asList("nbsoqeqalarv", "agunbtgfebw", "nbmhyree")) + .withDnsServerIps(Arrays.asList("qavbpdqmj", "lyyzglgouwtlmjj", "uojqt")) + .withSourceIp("axkjeytunlbfjk") + .withDnsServices(830794053618499369L) + .withRevision(3923529219175299110L) .create(); - Assertions.assertEquals("lkafhonqjuje", response.displayName()); - Assertions.assertEquals("pzvcpopmxelnwc", response.domain().get(0)); - Assertions.assertEquals("puamwabzxr", response.dnsServerIps().get(0)); - Assertions.assertEquals("cush", response.sourceIp()); - Assertions.assertEquals(5616883092736591366L, response.dnsServices()); - Assertions.assertEquals(4154943067306073010L, response.revision()); + Assertions.assertEquals("kpak", response.displayName()); + Assertions.assertEquals("fmjnnawtqa", response.domain().get(0)); + Assertions.assertEquals("yirdhlisngwflqq", response.dnsServerIps().get(0)); + Assertions.assertEquals("aas", response.sourceIp()); + Assertions.assertEquals(4326560645886577311L, response.dnsServices()); + Assertions.assertEquals(6093602471363921614L, 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 index 8aa62389f1690..c5efa2d3bd6d4 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreatePortMirroringMockTests { @Test public void testCreatePortMirroring() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"ugcmjkavlgorb\",\"direction\":\"INGRESS\",\"source\":\"mdtzfjltfvnzc\",\"destination\":\"t\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":175217187647549026},\"id\":\"dbzqgqqihed\",\"name\":\"vqwt\",\"type\":\"mkyi\"}"; + = "{\"properties\":{\"displayName\":\"l\",\"direction\":\"INGRESS\",\"source\":\"uiiznktwfansnvpd\",\"destination\":\"mik\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":2416325783439778913},\"id\":\"buqny\",\"name\":\"phzfylsgcrp\",\"type\":\"bcunezzceze\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,19 +32,19 @@ public void testCreatePortMirroring() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPortMirroring response = manager.workloadNetworks() - .definePortMirroring("ciqdsme") - .withExistingWorkloadNetwork("gv", "irpghriypoqeyh", "qhykprlpyzn") - .withDisplayName("tdfuxt") + .definePortMirroring("duragegizvc") + .withExistingPrivateCloud("blembnkbwvqvxkd", "vqihebwtswbzuwf") + .withDisplayName("lisdjubggbq") .withDirection(PortMirroringDirectionEnum.INGRESS) - .withSource("ibmi") - .withDestination("nnust") - .withRevision(5871871887515703016L) + .withSource("kbsazgak") + .withDestination("cyrcmjdmspo") + .withRevision(2234682115333576707L) .create(); - Assertions.assertEquals("ugcmjkavlgorb", response.displayName()); + Assertions.assertEquals("l", response.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.direction()); - Assertions.assertEquals("mdtzfjltfvnzc", response.source()); - Assertions.assertEquals("t", response.destination()); - Assertions.assertEquals(175217187647549026L, response.revision()); + Assertions.assertEquals("uiiznktwfansnvpd", response.source()); + Assertions.assertEquals("mik", response.destination()); + Assertions.assertEquals(2416325783439778913L, 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 index 914f790f310c1..390d4cd7e9496 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksCreatePublicIPMockTests { @Test public void testCreatePublicIP() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"fmd\",\"numberOfPublicIPs\":6699209546481289729,\"publicIPBlock\":\"gi\",\"provisioningState\":\"Succeeded\"},\"id\":\"felisdjub\",\"name\":\"gbqi\",\"type\":\"kxkbsazgakgacyr\"}"; + = "{\"properties\":{\"displayName\":\"nfprnjletlxs\",\"numberOfPublicIPs\":8927877098345650470,\"publicIPBlock\":\"ou\",\"provisioningState\":\"Succeeded\"},\"id\":\"owa\",\"name\":\"iynknlq\",\"type\":\"zdvpiw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreatePublicIP() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPublicIp response = manager.workloadNetworks() - .definePublicIP("ujlzqnhcvsqltn") - .withExistingWorkloadNetwork("ryuzcbmqqv", "mv", "fgtayxonsup") - .withDisplayName("bgsxgnxfyqonmpq") - .withNumberOfPublicIPs(1423276340735833697L) + .definePublicIP("yg") + .withExistingPrivateCloud("hkwfbkgozxwop", "bydpizqaclnapxb") + .withDisplayName("j") + .withNumberOfPublicIPs(5251325077784054834L) .create(); - Assertions.assertEquals("fmd", response.displayName()); - Assertions.assertEquals(6699209546481289729L, response.numberOfPublicIPs()); + Assertions.assertEquals("nfprnjletlxs", response.displayName()); + Assertions.assertEquals(8927877098345650470L, response.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java index 73cab07a8586f..6f4fd56ecc7a7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateSegmentMockTests { @Test public void testCreateSegment() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"akchzyvlixqnrk\",\"connectedGateway\":\"kjibnxmysuxswqrn\",\"subnet\":{\"dhcpRanges\":[\"ijpstte\",\"oqq\",\"wcyyufmhruncu\",\"mqspkcdqzhlctdd\"],\"gatewayAddress\":\"qn\"},\"portVif\":[{\"portName\":\"chrqb\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":3423454128709861544},\"id\":\"dcwboxjum\",\"name\":\"qqoli\",\"type\":\"r\"}"; + = "{\"properties\":{\"displayName\":\"hslhca\",\"connectedGateway\":\"u\",\"subnet\":{\"dhcpRanges\":[\"wfmvigorqjbt\",\"zhraglkafh\",\"n\"],\"gatewayAddress\":\"ujeickp\"},\"portVif\":[{\"portName\":\"opmx\"},{\"portName\":\"nwcl\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":6137899211514369318},\"id\":\"lfmk\",\"name\":\"scazuawxtzxpu\",\"type\":\"mwabzxrvxc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +33,19 @@ public void testCreateSegment() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkSegment response = manager.workloadNetworks() - .defineSegment("ypuuwwltvuqjctze") - .withExistingWorkloadNetwork("lvidizozs", "bccxjmonfdgn", "n") - .withDisplayName("if") - .withConnectedGateway("hmkdasvfl") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("cu", "chxgs", "boldforobwj")) - .withGatewayAddress("izbfhfovvacq")) - .withRevision(8492119421545831935L) + .defineSegment("jqg") + .withExistingPrivateCloud("svtui", "zh") + .withDisplayName("hm") + .withConnectedGateway("qryxyn") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("dpsovwxznptgo")) + .withGatewayAddress("ybbabpfhvfsl")) + .withRevision(4417408561997868139L) .create(); - Assertions.assertEquals("akchzyvlixqnrk", response.displayName()); - Assertions.assertEquals("kjibnxmysuxswqrn", response.connectedGateway()); - Assertions.assertEquals("ijpstte", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("qn", response.subnet().gatewayAddress()); - Assertions.assertEquals(3423454128709861544L, response.revision()); + Assertions.assertEquals("hslhca", response.displayName()); + Assertions.assertEquals("u", response.connectedGateway()); + Assertions.assertEquals("wfmvigorqjbt", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("ujeickp", response.subnet().gatewayAddress()); + Assertions.assertEquals(6137899211514369318L, 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 index 43da44348603b..af5cd18a29fa3 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateVMGroupMockTests { @Test public void testCreateVMGroup() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"xbkwv\",\"members\":[\"zvd\",\"bzdixzmq\",\"noda\",\"opqhewjptmc\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":7127280864515771015},\"id\":\"ndlatutmzlbi\",\"name\":\"jlvfhrbbpneqv\",\"type\":\"wwyyurmoch\"}"; + = "{\"properties\":{\"displayName\":\"jgehkf\",\"members\":[\"rtixokff\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":3258323746921369776},\"id\":\"qwhix\",\"name\":\"onsts\",\"type\":\"i\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testCreateVMGroup() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVMGroup response = manager.workloadNetworks() - .defineVMGroup("sufco") - .withExistingWorkloadNetwork("cysihs", "qcwdhoh", "dtmcd") - .withDisplayName("bzlmcm") - .withMembers(Arrays.asList("cvhd", "evwqqxeyskonq", "inkfkbgbz", "owxeqocljmy")) - .withRevision(7238686048723622110L) + .defineVMGroup("zvaylptrsqqw") + .withExistingPrivateCloud("fwyfwlwxjwet", "psihcla") + .withDisplayName("mwqkchcxwaxf") + .withMembers(Arrays.asList("jkjexf", "eqvhpsylkk", "hkbffmbm")) + .withRevision(3427888664971158449L) .create(); - Assertions.assertEquals("xbkwv", response.displayName()); - Assertions.assertEquals("zvd", response.members().get(0)); - Assertions.assertEquals(7127280864515771015L, response.revision()); + Assertions.assertEquals("jgehkf", response.displayName()); + Assertions.assertEquals("rtixokff", response.members().get(0)); + Assertions.assertEquals(3258323746921369776L, 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 index 3fb9c383e28a8..a9a0375eb34e2 100644 --- 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 @@ -27,9 +27,7 @@ public void testDeleteDhcp() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks() - .deleteDhcp("tgkbugrjqctojc", "isofieypefojyqd", "cuplcplcwkhih", "hlhzdsqtzbsrgno", - com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDhcp("rjeuut", "wxezwzhok", "bwnhhtql", 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 index 241aa7ac97bea..87fb33766e600 100644 --- 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 @@ -27,8 +27,7 @@ public void testDeleteDnsService() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks() - .deleteDnsService("jbjsvgjrwh", "yvycytdclxgcckn", "nwm", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDnsService("nlj", "nmgixh", "mavmq", 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 index f4c81319cffc8..492355d3d9b5b 100644 --- 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 @@ -28,7 +28,7 @@ public void testDeleteDnsZone() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworks() - .deleteDnsZone("f", "xnmwmqtibxyijddt", "qcttadijaeukmrsi", com.azure.core.util.Context.NONE); + .deleteDnsZone("la", "utmzlbiojlvfhrbb", "neqvcwwyyurmo", 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 index 0912a80dc891f..3689ba659b2bd 100644 --- 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 @@ -27,7 +27,8 @@ public void testDeletePortMirroring() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deletePortMirroring("jcivmmg", "f", "fiwrxgkn", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deletePortMirroring("os", "sjuivfcdisyir", "xzhczexrxz", 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 index 5748dae11cbc3..2313f42a67c09 100644 --- 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 @@ -27,7 +27,8 @@ public void testDeletePublicIP() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deletePublicIP("zmlovuanash", "xlpm", "erbdk", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deletePublicIP("qwazlnqnmcjngzq", "qxtbjwgnyf", "sf", 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 index 009f09b25baa0..fa8572ae49f59 100644 --- 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 @@ -27,8 +27,7 @@ public void testDeleteSegment() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks() - .deleteSegment("g", "khocxvdfffwaf", "roud", "spave", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteSegment("ecdmdqbwpy", "q", "gsfjac", 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 index 1d4bf46ef6d11..67255e3815704 100644 --- 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 @@ -27,7 +27,8 @@ public void testDeleteVMGroup() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deleteVMGroup("qfr", "qlkzme", "nitgvkxlz", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deleteVMGroup("cwyhahno", "drkywuhps", "fuurutlwexx", 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 index dc21c4b10e265..0849623f708fe 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetDhcpWithResponseMockTests { @Test public void testGetDhcpWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"awiuagyd\",\"segments\":[\"bylyrfgia\",\"tcojocqwo\"],\"provisioningState\":\"Updating\",\"revision\":5588254011472132694},\"id\":\"sfzldmoz\",\"name\":\"xylfsb\",\"type\":\"kadpysown\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ycy\",\"segments\":[\"lxgccknfnwmbtm\"],\"provisioningState\":\"Building\",\"revision\":4849320902219836691},\"id\":\"ttzaefed\",\"name\":\"ihchrphkmcrjdqn\",\"type\":\"dfzpbgtgkylkdg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetDhcpWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDhcp response = manager.workloadNetworks() - .getDhcpWithResponse("qxtjjfzqlqhyca", "odggx", "beesmieknlra", com.azure.core.util.Context.NONE) + .getDhcpWithResponse("a", "xulcdisdos", "jbjsvgjrwh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("awiuagyd", response.properties().displayName()); - Assertions.assertEquals(5588254011472132694L, response.properties().revision()); + Assertions.assertEquals("ycy", response.properties().displayName()); + Assertions.assertEquals(4849320902219836691L, 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 index 6b736149acde3..c5bc3cfcec852 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksGetDnsServiceWithResponseMockTests { @Test public void testGetDnsServiceWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"hzmme\",\"dnsServiceIp\":\"kdlpa\",\"defaultDnsZone\":\"rcxfailcfxwmdb\",\"fqdnZones\":[\"fgsftufqob\",\"jln\",\"cgcckknhxkizvyt\",\"rzvul\"],\"logLevel\":\"FATAL\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":1051106432166933965},\"id\":\"gukkjqnvbroy\",\"name\":\"a\",\"type\":\"xulcdisdos\"}"; + = "{\"properties\":{\"displayName\":\"acevehjkuyx\",\"dnsServiceIp\":\"fgaoq\",\"defaultDnsZone\":\"faey\",\"fqdnZones\":[\"mfgvxirpghriypo\"],\"logLevel\":\"FATAL\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":1589497887711034264},\"id\":\"lpyznuciqdsmexi\",\"name\":\"tdfuxt\",\"type\":\"asiibmiybnnust\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetDnsServiceWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsService response = manager.workloadNetworks() - .getDnsServiceWithResponse("pqtgsfjac", "slhhxudbxv", "d", "tnsi", com.azure.core.util.Context.NONE) + .getDnsServiceWithResponse("tnluankrr", "xeeebtijvacvbmqz", "qqxlajr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hzmme", response.displayName()); - Assertions.assertEquals("kdlpa", response.dnsServiceIp()); - Assertions.assertEquals("rcxfailcfxwmdb", response.defaultDnsZone()); - Assertions.assertEquals("fgsftufqob", response.fqdnZones().get(0)); + Assertions.assertEquals("acevehjkuyx", response.displayName()); + Assertions.assertEquals("fgaoq", response.dnsServiceIp()); + Assertions.assertEquals("faey", response.defaultDnsZone()); + Assertions.assertEquals("mfgvxirpghriypo", response.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.logLevel()); - Assertions.assertEquals(1051106432166933965L, response.revision()); + Assertions.assertEquals(1589497887711034264L, 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 index 6c77a503cc191..8362170793534 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetDnsZoneWithResponseMockTests { @Test public void testGetDnsZoneWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"ajoylhjl\",\"domain\":[\"y\",\"primr\"],\"dnsServerIps\":[\"teecjmeislst\",\"asylwx\"],\"sourceIp\":\"aumweoohguufu\",\"dnsServices\":2748183930947748817,\"provisioningState\":\"Updating\",\"revision\":7433692398956601722},\"id\":\"zolbaemwmdxmebw\",\"name\":\"scjpahlxv\",\"type\":\"a\"}"; + = "{\"properties\":{\"displayName\":\"xeyskonqzinkfkbg\",\"domain\":[\"owxeqocljmy\",\"vkzqk\"],\"dnsServerIps\":[\"okbzef\",\"zrxcczurt\"],\"sourceIp\":\"ipqxbkwvzgnzv\",\"dnsServices\":8865201443625196451,\"provisioningState\":\"Updating\",\"revision\":8445410138304519082},\"id\":\"pnodawopqhe\",\"name\":\"jptmcgsbost\",\"type\":\"eln\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testGetDnsZoneWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsZone response = manager.workloadNetworks() - .getDnsZoneWithResponse("a", "llibphbqzmizak", "kan", "jpdn", com.azure.core.util.Context.NONE) + .getDnsZoneWithResponse("cohdx", "zlmcmuapcvhdb", "v", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ajoylhjl", response.displayName()); - Assertions.assertEquals("y", response.domain().get(0)); - Assertions.assertEquals("teecjmeislst", response.dnsServerIps().get(0)); - Assertions.assertEquals("aumweoohguufu", response.sourceIp()); - Assertions.assertEquals(2748183930947748817L, response.dnsServices()); - Assertions.assertEquals(7433692398956601722L, response.revision()); + Assertions.assertEquals("xeyskonqzinkfkbg", response.displayName()); + Assertions.assertEquals("owxeqocljmy", response.domain().get(0)); + Assertions.assertEquals("okbzef", response.dnsServerIps().get(0)); + Assertions.assertEquals("ipqxbkwvzgnzv", response.sourceIp()); + Assertions.assertEquals(8865201443625196451L, response.dnsServices()); + Assertions.assertEquals(8445410138304519082L, 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 index 458f8c46830eb..b731274ab87d8 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetGatewayWithResponseMockTests { @Test public void testGetGatewayWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"g\",\"path\":\"joxslhvnhla\"},\"id\":\"q\",\"name\":\"kkzjcjbtrga\",\"type\":\"hvv\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"ibph\",\"path\":\"zmizakakan\"},\"id\":\"p\",\"name\":\"n\",\"type\":\"zhajoylhjlmuo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetGatewayWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkGateway response = manager.workloadNetworks() - .getGatewayWithResponse("metttwgd", "lqxihhrmooiz", "seypxiutcxapz", "y", com.azure.core.util.Context.NONE) + .getGatewayWithResponse("qtgdqohmcwsl", "riz", "tpwb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("g", response.displayName()); + Assertions.assertEquals("ibph", 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 index 605a7475c74ba..6676affc033ed 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksGetPortMirroringWithResponseMockTests { @Test public void testGetPortMirroringWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"snfepgfewetwlyx\",\"direction\":\"EGRESS\",\"source\":\"ykxhdjh\",\"destination\":\"mmbcxfhbcp\",\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":2736440248619026147},\"id\":\"qizxfpxtgqscjavf\",\"name\":\"juhdqazkmtgguwpi\",\"type\":\"r\"}"; + = "{\"properties\":{\"displayName\":\"bu\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"xebeybpmz\",\"destination\":\"rtffyaqitmh\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":1147864952141338837},\"id\":\"seufuqy\",\"name\":\"xpdlcgqlsis\",\"type\":\"jqfrddgamquh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetPortMirroringWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPortMirroring response = manager.workloadNetworks() - .getPortMirroringWithResponse("aaomylweazu", "cse", "hwwn", "jhlfzswpchwahf", + .getPortMirroringWithResponse("yijddtvqcttad", "jaeukmrsieekpn", "zaapmudqmeqwi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("snfepgfewetwlyx", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); - Assertions.assertEquals("ykxhdjh", response.source()); - Assertions.assertEquals("mmbcxfhbcp", response.destination()); - Assertions.assertEquals(2736440248619026147L, response.revision()); + Assertions.assertEquals("bu", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.direction()); + Assertions.assertEquals("xebeybpmz", response.source()); + Assertions.assertEquals("rtffyaqitmh", response.destination()); + Assertions.assertEquals(1147864952141338837L, 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 index 9b62bf43b5992..137474ea5bff7 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetPublicIPWithResponseMockTests { @Test public void testGetPublicIPWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"lnzonzlrpiqywn\",\"numberOfPublicIPs\":7895495047582223702,\"publicIPBlock\":\"z\",\"provisioningState\":\"Succeeded\"},\"id\":\"zehtdhgb\",\"name\":\"k\",\"type\":\"reljeamur\"}"; + = "{\"properties\":{\"displayName\":\"dcdab\",\"numberOfPublicIPs\":8090697821679343432,\"publicIPBlock\":\"yawbzasqbu\",\"provisioningState\":\"Updating\"},\"id\":\"kyexaoguyaipi\",\"name\":\"sdaultxij\",\"type\":\"um\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,10 @@ public void testGetPublicIPWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPublicIp response = manager.workloadNetworks() - .getPublicIPWithResponse("rsjuivfcdisyir", "xzhczexrxz", "ujrtrhqvwr", "vk", - com.azure.core.util.Context.NONE) + .getPublicIPWithResponse("ex", "kmfx", "pjwogqqno", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lnzonzlrpiqywn", response.displayName()); - Assertions.assertEquals(7895495047582223702L, response.numberOfPublicIPs()); + Assertions.assertEquals("dcdab", response.displayName()); + Assertions.assertEquals(8090697821679343432L, 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 index bb42a3f722c8f..11eb745d8adea 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetSegmentWithResponseMockTests { @Test public void testGetSegmentWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"yik\",\"connectedGateway\":\"lauyav\",\"subnet\":{\"dhcpRanges\":[\"ncstt\",\"jfybvpoekrsgsgb\",\"huzqgn\",\"dgkynscliqhzvhxn\"],\"gatewayAddress\":\"mtk\"},\"portVif\":[{\"portName\":\"ppnvdxz\"},{\"portName\":\"ihfrbbcevqa\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":9015448282305825378},\"id\":\"qojpy\",\"name\":\"vgtrdcnifmzzs\",\"type\":\"ymbrnysuxmpraf\"}"; + = "{\"properties\":{\"displayName\":\"erteeammxqiekk\",\"connectedGateway\":\"ddrtkgdojb\",\"subnet\":{\"dhcpRanges\":[\"vrefdeesv\"],\"gatewayAddress\":\"uij\"},\"portVif\":[{\"portName\":\"s\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":4136420798110514219},\"id\":\"awddjibab\",\"name\":\"vit\",\"type\":\"tvtzeexavoxtfg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetSegmentWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkSegment response = manager.workloadNetworks() - .getSegmentWithResponse("tj", "zysdzh", "zwwva", "qyuvvfonkp", com.azure.core.util.Context.NONE) + .getSegmentWithResponse("svxeizzgwklnsr", "ffeycx", "ktp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("yik", response.displayName()); - Assertions.assertEquals("lauyav", response.connectedGateway()); - Assertions.assertEquals("ncstt", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("mtk", response.subnet().gatewayAddress()); - Assertions.assertEquals(9015448282305825378L, response.revision()); + Assertions.assertEquals("erteeammxqiekk", response.displayName()); + Assertions.assertEquals("ddrtkgdojb", response.connectedGateway()); + Assertions.assertEquals("vrefdeesv", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("uij", response.subnet().gatewayAddress()); + Assertions.assertEquals(4136420798110514219L, 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 index a14444a5865b4..a2a416b7b7fec 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetVMGroupWithResponseMockTests { @Test public void testGetVMGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"zgtila\",\"members\":[\"fhqlyvi\",\"ouwivkxoyzunbixx\",\"ti\",\"vcpwpgclrc\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":6631490194181258927},\"id\":\"enxpmyyefr\",\"name\":\"mpdnqqskawa\",\"type\":\"qvmmbn\"}"; + = "{\"properties\":{\"displayName\":\"uuwwltv\",\"members\":[\"ctzenkeifzzhmkd\",\"svflyhbxcudch\",\"gsrboldforobw\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":6875255372638477871},\"id\":\"ovvacqpbt\",\"name\":\"odxeszabbela\",\"type\":\"umuaslzkwrrwoycq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,11 @@ public void testGetVMGroupWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVMGroup response = manager.workloadNetworks() - .getVMGroupWithResponse("uzjyihsasbhudypo", "yue", "slynsqyrpfoo", "rlttymsjnygqdnfw", - com.azure.core.util.Context.NONE) + .getVMGroupWithResponse("lvidizozs", "bccxjmonfdgn", "n", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zgtila", response.displayName()); - Assertions.assertEquals("fhqlyvi", response.members().get(0)); - Assertions.assertEquals(6631490194181258927L, response.revision()); + Assertions.assertEquals("uuwwltv", response.displayName()); + Assertions.assertEquals("ctzenkeifzzhmkd", response.members().get(0)); + Assertions.assertEquals(6875255372638477871L, 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 index 0d2321b38f671..d4c6863087bad 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetVirtualMachineWithResponseMockTests { @Test public void testGetVirtualMachineWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"vblbjednljlageua\",\"vmType\":\"EDGE\"},\"id\":\"nsmjbnkppxynen\",\"name\":\"svxeizzgwklnsr\",\"type\":\"ffeycx\"}"; + = "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"dyfpchrqbnj\",\"vmType\":\"REGULAR\"},\"id\":\"egy\",\"name\":\"cw\",\"type\":\"oxjumvqqo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetVirtualMachineWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVirtualMachine response = manager.workloadNetworks() - .getVirtualMachineWithResponse("pqg", "tjeaahhvjhh", "akz", "bbjjidjksyxk", + .getVirtualMachineWithResponse("ttexoqqpwcyyufmh", "uncuw", "qspkcdqzhlctd", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vblbjednljlageua", response.displayName()); + Assertions.assertEquals("dyfpchrqbnj", 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 index 0b84a1ea68f28..e2bd5a1187dfe 100644 --- 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 @@ -20,7 +20,7 @@ public final class WorkloadNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"rr\",\"name\":\"vpglydz\",\"type\":\"krvq\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"pmyyefrpmpdnqq\",\"name\":\"ka\",\"type\":\"ao\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetwork response = manager.workloadNetworks() - .getWithResponse("ktwkuziyc", "levufuztcktyhj", "qedcgzulwm", com.azure.core.util.Context.NONE) + .getWithResponse("vcpwpgclrc", "vtsoxf", 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 index a4bdb21bf8456..31561d1835e2c 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListDhcpMockTests { @Test public void testListDhcp() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"yxcdyuibhmfdnbzy\",\"segments\":[\"vfcjnaeoisrvhmg\"],\"provisioningState\":\"Failed\",\"revision\":2822407997617521552},\"id\":\"scvwmzhwplef\",\"name\":\"xvxilcbtg\",\"type\":\"hnze\"}]}"; + = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"sirudhzmmesckdlp\",\"segments\":[\"rcxfailcfxwmdb\",\"xdfgsftufqobr\",\"lnacgcc\",\"knh\"],\"provisioningState\":\"Succeeded\",\"revision\":589895181395208986},\"id\":\"nrzvuljraaer\",\"name\":\"nok\",\"type\":\"gukkjqnvbroy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListDhcp() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().listDhcp("hrv", "bunzozudh", "xg", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listDhcp("slhhxudbxv", "d", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yxcdyuibhmfdnbzy", response.iterator().next().properties().displayName()); - Assertions.assertEquals(2822407997617521552L, response.iterator().next().properties().revision()); + Assertions.assertEquals("sirudhzmmesckdlp", response.iterator().next().properties().displayName()); + Assertions.assertEquals(589895181395208986L, 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 index 2333e50ea47a8..ea6c126886246 100644 --- 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksListDnsServicesMockTests { @Test public void testListDnsServices() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"kgdoj\",\"dnsServiceIp\":\"xv\",\"defaultDnsZone\":\"refdee\",\"fqdnZones\":[\"cuijpxt\",\"s\",\"wprtu\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":8726216389105102201},\"id\":\"bxv\",\"name\":\"titvtzeexavox\",\"type\":\"fglecdmdqbwp\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"uojrngiflr\",\"dnsServiceIp\":\"asccbiui\",\"defaultDnsZone\":\"dlyjdf\",\"fqdnZones\":[\"kyoqufdv\",\"uzslzojhpctfnmdx\",\"tngfdgugeyzihgr\",\"yui\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":1993582902542449094},\"id\":\"jee\",\"name\":\"yhyhsgzfczb\",\"type\":\"omfgbeglqgleohib\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testListDnsServices() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworks() - .listDnsServices("ktp", "ymerteeammxq", "ekkkzd", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().listDnsServices("ihrraiouaub", "jtlo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kgdoj", response.iterator().next().displayName()); - Assertions.assertEquals("xv", response.iterator().next().dnsServiceIp()); - Assertions.assertEquals("refdee", response.iterator().next().defaultDnsZone()); - Assertions.assertEquals("cuijpxt", response.iterator().next().fqdnZones().get(0)); + Assertions.assertEquals("uojrngiflr", response.iterator().next().displayName()); + Assertions.assertEquals("asccbiui", response.iterator().next().dnsServiceIp()); + Assertions.assertEquals("dlyjdf", response.iterator().next().defaultDnsZone()); + Assertions.assertEquals("kyoqufdv", response.iterator().next().fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.iterator().next().logLevel()); - Assertions.assertEquals(8726216389105102201L, response.iterator().next().revision()); + Assertions.assertEquals(1993582902542449094L, 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 index 6241707fdfb95..ae462ada475dc 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListDnsZonesMockTests { @Test public void testListDnsZones() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"dqns\",\"domain\":[\"pbgtgkylkdghrj\",\"uutlwxezwzhok\",\"bwnhhtql\"],\"dnsServerIps\":[\"gppipifh\",\"f\",\"oajvgcxtxjcs\",\"eafidltugsresm\"],\"sourceIp\":\"sjhoiftxfkfwegpr\",\"dnsServices\":2543866141895923842,\"provisioningState\":\"Failed\",\"revision\":1203918131224408172},\"id\":\"qtgdqohmcwsl\",\"name\":\"riz\",\"type\":\"tpwb\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"gcmjkavl\",\"domain\":[\"bmftpmdt\"],\"dnsServerIps\":[\"ltfvnz\",\"yj\",\"otp\",\"opv\"],\"sourceIp\":\"dbzqgqqihed\",\"dnsServices\":7204032751679115216,\"provisioningState\":\"Failed\",\"revision\":1811434069334068168},\"id\":\"bcysih\",\"name\":\"gqcwdhohsdtmc\",\"type\":\"zsu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testListDnsZones() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworks() - .listDnsZones("tmvpdvjdhtt", "a", "fedxihchrphkm", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().listDnsZones("oudorhcgyyp", "otwypundmb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dqns", response.iterator().next().displayName()); - Assertions.assertEquals("pbgtgkylkdghrj", response.iterator().next().domain().get(0)); - Assertions.assertEquals("gppipifh", response.iterator().next().dnsServerIps().get(0)); - Assertions.assertEquals("sjhoiftxfkfwegpr", response.iterator().next().sourceIp()); - Assertions.assertEquals(2543866141895923842L, response.iterator().next().dnsServices()); - Assertions.assertEquals(1203918131224408172L, response.iterator().next().revision()); + Assertions.assertEquals("gcmjkavl", response.iterator().next().displayName()); + Assertions.assertEquals("bmftpmdt", response.iterator().next().domain().get(0)); + Assertions.assertEquals("ltfvnz", response.iterator().next().dnsServerIps().get(0)); + Assertions.assertEquals("dbzqgqqihed", response.iterator().next().sourceIp()); + Assertions.assertEquals(7204032751679115216L, response.iterator().next().dnsServices()); + Assertions.assertEquals(1811434069334068168L, 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 index d62edd360b5ad..9d81e912cff7f 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListGatewaysMockTests { @Test public void testListGateways() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"wyivqikf\",\"path\":\"vhrfsphuagrt\"},\"id\":\"kteusqczk\",\"name\":\"yklxubyjaffmmfbl\",\"type\":\"qcuubgqibrta\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"afidltugsres\",\"path\":\"ssjhoiftxfkf\"},\"id\":\"gpr\",\"name\":\"ptil\",\"type\":\"ucb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListGateways() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworks() - .listGateways("cjhfgmvecactxmw", "teyowclu", "ovekqvgqouwi", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().listGateways("ehgpp", "pifhpfeoajvgcxtx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wyivqikf", response.iterator().next().displayName()); + Assertions.assertEquals("afidltugsres", 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 index 6e2da7776a7b9..b22e288cdd161 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"kdmflvestmjlx\",\"name\":\"ril\",\"type\":\"zapeewchpx\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"kxlzyqdrfeg\",\"name\":\"ealzxwhcansymoyq\",\"type\":\"lwigdivbkbx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().list("kambtrnegvmnvuqe", "vldspa", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().list("vmm", "npqfrtqlkzmeg", 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 index 893477a645d59..29fe67b6717e0 100644 --- 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksListPortMirroringMockTests { @Test public void testListPortMirroring() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"lftidgfcwqmpim\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"hemjy\",\"destination\":\"hujswtwkozzwcul\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":3474722441210213341},\"id\":\"jwltlwtjjgu\",\"name\":\"talhsnvkcdmxzr\",\"type\":\"oaimlnw\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"vasylwxdzau\",\"direction\":\"INGRESS\",\"source\":\"ohguuf\",\"destination\":\"boyjathwt\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":7359436654104402484},\"id\":\"dxmeb\",\"name\":\"jscjpahl\",\"type\":\"veabfqxnmwmqtib\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testListPortMirroring() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworks() - .listPortMirroring("brxjjsto", "beitpkx", "tmo", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().listPortMirroring("xprimrsop", "eecjmeis", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lftidgfcwqmpim", response.iterator().next().displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.iterator().next().direction()); - Assertions.assertEquals("hemjy", response.iterator().next().source()); - Assertions.assertEquals("hujswtwkozzwcul", response.iterator().next().destination()); - Assertions.assertEquals(3474722441210213341L, response.iterator().next().revision()); + Assertions.assertEquals("vasylwxdzau", response.iterator().next().displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.iterator().next().direction()); + Assertions.assertEquals("ohguuf", response.iterator().next().source()); + Assertions.assertEquals("boyjathwt", response.iterator().next().destination()); + Assertions.assertEquals(7359436654104402484L, 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 index 88abe232699ab..0742933babc0e 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListPublicIPsMockTests { @Test public void testListPublicIPs() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"dqwyxeb\",\"numberOfPublicIPs\":5927921282145979607,\"publicIPBlock\":\"zznrtffyaqi\",\"provisioningState\":\"Canceled\"},\"id\":\"eioqaqhvse\",\"name\":\"fuqyrxpdlcgqlsi\",\"type\":\"mjqfrddgamquhio\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"yzejnhlbk\",\"numberOfPublicIPs\":72002495094677042,\"publicIPBlock\":\"piljhahzvech\",\"provisioningState\":\"Failed\"},\"id\":\"wieholewjwiu\",\"name\":\"bwefqsfapaqtfer\",\"type\":\"q\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListPublicIPs() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().listPublicIPs("ekpndzaapmudq", "eqw", "gp", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listPublicIPs("hppr", "rsnm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dqwyxeb", response.iterator().next().displayName()); - Assertions.assertEquals(5927921282145979607L, response.iterator().next().numberOfPublicIPs()); + Assertions.assertEquals("yzejnhlbk", response.iterator().next().displayName()); + Assertions.assertEquals(72002495094677042L, 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 index 5567308b56d3f..07aa48edd3ffc 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListSegmentsMockTests { @Test public void testListSegments() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"tpzdmovzvfvaawzq\",\"connectedGateway\":\"f\",\"subnet\":{\"dhcpRanges\":[\"riglaec\"],\"gatewayAddress\":\"dticokpvzml\"},\"portVif\":[{\"portName\":\"dgxobfircl\"},{\"portName\":\"kciayzri\"},{\"portName\":\"hya\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":8892395873525165573},\"id\":\"vkjlmxhom\",\"name\":\"ynhdwdigum\",\"type\":\"nraauzz\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"kjsqzhzbezkgi\",\"connectedGateway\":\"idxas\",\"subnet\":{\"dhcpRanges\":[\"yvvjskgfmo\",\"wa\",\"pqg\",\"tjeaahhvjhh\"],\"gatewayAddress\":\"kzyb\"},\"portVif\":[{\"portName\":\"dj\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":8248669428764587059},\"id\":\"evblbje\",\"name\":\"nljlageuaulx\",\"type\":\"nsmjbnkppxynen\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testListSegments() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().listSegments("ev", "oepry", "t", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listSegments("omfaj", "wasqvdaeyyg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("tpzdmovzvfvaawzq", response.iterator().next().displayName()); - Assertions.assertEquals("f", response.iterator().next().connectedGateway()); - Assertions.assertEquals("riglaec", response.iterator().next().subnet().dhcpRanges().get(0)); - Assertions.assertEquals("dticokpvzml", response.iterator().next().subnet().gatewayAddress()); - Assertions.assertEquals(8892395873525165573L, response.iterator().next().revision()); + Assertions.assertEquals("kjsqzhzbezkgi", response.iterator().next().displayName()); + Assertions.assertEquals("idxas", response.iterator().next().connectedGateway()); + Assertions.assertEquals("yvvjskgfmo", response.iterator().next().subnet().dhcpRanges().get(0)); + Assertions.assertEquals("kzyb", response.iterator().next().subnet().gatewayAddress()); + Assertions.assertEquals(8248669428764587059L, 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 index f332fd9f46db0..9b63368eafb34 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListVMGroupsMockTests { @Test public void testListVMGroups() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"lgafcqusrdve\",\"members\":[\"sdtutnwlduyc\",\"uzhyrmewipmvekdx\",\"kuqgsjjxundxgket\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":7918905716501947847},\"id\":\"mhv\",\"name\":\"muvgp\",\"type\":\"uneqsxvmhf\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"lnzonzlrpiqywn\",\"members\":[\"tszcofizehtdhgb\",\"k\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":5299106895755673529},\"id\":\"rvzmlovuana\",\"name\":\"hcxlpm\",\"type\":\"erbdk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testListVMGroups() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.workloadNetworks() - .listVMGroups("uvyinzqodfvpgs", "oxgsgbpfgzdjtx", "zflbqvg", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.workloadNetworks().listVMGroups("ujrtrhqvwr", "vk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lgafcqusrdve", response.iterator().next().displayName()); - Assertions.assertEquals("sdtutnwlduyc", response.iterator().next().members().get(0)); - Assertions.assertEquals(7918905716501947847L, response.iterator().next().revision()); + Assertions.assertEquals("lnzonzlrpiqywn", response.iterator().next().displayName()); + Assertions.assertEquals("tszcofizehtdhgb", response.iterator().next().members().get(0)); + Assertions.assertEquals(5299106895755673529L, 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 index ac83c6498420b..035035102ee25 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListVirtualMachinesMockTests { @Test public void testListVirtualMachines() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"sqvdaeyygux\",\"vmType\":\"EDGE\"},\"id\":\"qzhzbezkgimsi\",\"name\":\"xasicddyvvjskg\",\"type\":\"mocwa\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"chzyvlixqnrk\",\"vmType\":\"REGULAR\"},\"id\":\"ibn\",\"name\":\"mysu\",\"type\":\"swqrntvlwijp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListVirtualMachines() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworks() - .listVirtualMachines("qdrfegcealzxwhc", "nsymoyqhlwigd", "vbkbxgomf", com.azure.core.util.Context.NONE); + .listVirtualMachines("lalniex", "srzpgepqtybbww", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sqvdaeyygux", response.iterator().next().displayName()); + Assertions.assertEquals("chzyvlixqnrk", response.iterator().next().displayName()); } } From a22dea220c10414a576b61a667fe02f59dd36add Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 23 Jul 2024 17:19:34 +0800 Subject: [PATCH 15/17] regen --- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 32 +++ .../WorkloadNetworkDhcpImpl.java | 16 ++ .../WorkloadNetworksClientImpl.java | 12 +- .../implementation/WorkloadNetworksImpl.java | 228 ++++++++++++++++++ .../avs/models/WorkloadNetworkDhcp.java | 15 ++ .../avs/models/WorkloadNetworks.java | 128 ++++++++++ .../WorkloadNetworksUpdateDhcpSamples.java | 32 +++ .../tsp-location.yaml | 2 +- 8 files changed, 458 insertions(+), 7 deletions(-) create mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index de1492c142ba6..bc11bf8089734 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -148,6 +148,7 @@ - [ListSegments](#workloadnetworks_listsegments) - [ListVMGroups](#workloadnetworks_listvmgroups) - [ListVirtualMachines](#workloadnetworks_listvirtualmachines) +- [UpdateDhcp](#workloadnetworks_updatedhcp) - [UpdateDnsService](#workloadnetworks_updatednsservice) - [UpdateDnsZone](#workloadnetworks_updatednszone) - [UpdatePortMirroring](#workloadnetworks_updateportmirroring) @@ -2478,6 +2479,37 @@ 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. + */ +public final class WorkloadNetworksUpdateDhcpSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDhcp.json + */ + /** + * Sample code: WorkloadNetworks_UpdateDhcp. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkDhcp resource = manager.workloadNetworks() + .getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400L)) + .apply(); + } +} +``` + ### WorkloadNetworks_UpdateDnsService ```java diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java index 2dee211ffa292..925014918166a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java @@ -107,6 +107,22 @@ public WorkloadNetworkDhcp apply(Context context) { this.dhcpId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dhcpConfigurations"); } + public WorkloadNetworkDhcp refresh() { + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworks() + .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE) + .getValue(); + return this; + } + + public WorkloadNetworkDhcp refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWorkloadNetworks() + .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context) + .getValue(); + return this; + } + public WorkloadNetworkDhcpImpl withProperties(WorkloadNetworkDhcpEntity properties) { this.innerModel().withProperties(properties); return this; 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 5244dab20d126..6eac66261ea2c 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 @@ -172,7 +172,7 @@ Mono> listDhcp(@HostParam("endpoint") String e Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{dhcpId}/{privateCloudName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDhcp(@HostParam("endpoint") String endpoint, @@ -279,7 +279,7 @@ Mono>> updatePortMirroring(@HostParam("endpoint") Stri Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{portMirroringId}/{privateCloudName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deletePortMirroring(@HostParam("endpoint") String endpoint, @@ -332,7 +332,7 @@ Mono>> updateVMGroup(@HostParam("endpoint") String end @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{vmGroupId}/{privateCloudName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteVMGroup(@HostParam("endpoint") String endpoint, @@ -405,7 +405,7 @@ Mono>> updateDnsService(@HostParam("endpoint") String @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{dnsServiceId}/{privateCloudName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteDnsService(@HostParam("endpoint") String endpoint, @@ -457,7 +457,7 @@ Mono>> updateDnsZone(@HostParam("endpoint") String end @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{dnsZoneId}/{privateCloudName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteDnsZone(@HostParam("endpoint") String endpoint, @@ -498,7 +498,7 @@ Mono>> createPublicIP(@HostParam("endpoint") String en @BodyParam("application/json") WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/{publicIPId}/{privateCloudName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deletePublicIP(@HostParam("endpoint") String endpoint, 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 d1831dd67b18a..fd8ce26bdd7fe 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 @@ -496,6 +496,44 @@ public Response getSegmentByIdWithResponse(String id, Co return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); } + public WorkloadNetworkDhcp getDhcpById(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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); + if (dhcpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + String privateCloudName = 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))); + } + return this.getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); + } + + public Response getDhcpByIdWithResponse(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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); + if (dhcpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + String privateCloudName = 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))); + } + return this.getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context); + } + public WorkloadNetworkPortMirroring getPortMirroringById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -764,6 +802,196 @@ public void deleteDhcpByIdWithResponse(String id, Context context) { this.deleteDhcp(resourceGroupName, privateCloudName, dhcpId, context); } + public void deletePortMirroringById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, Context.NONE); + } + + public void deletePortMirroringByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); + } + + public void deleteVMGroupById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, Context.NONE); + } + + public void deleteVMGroupByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, context); + } + + public void deleteDnsServiceById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, Context.NONE); + } + + public void deleteDnsServiceByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); + } + + public void deleteDnsZoneById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, Context.NONE); + } + + public void deleteDnsZoneByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); + } + + public void deletePublicIPById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIPId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deletePublicIP(resourceGroupName, publicIPId, privateCloudName, Context.NONE); + } + + public void deletePublicIPByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIPId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deletePublicIP(resourceGroupName, publicIPId, privateCloudName, context); + } + private WorkloadNetworksClient serviceClient() { return this.innerClient; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java index da444e46241cd..adad0ea38981f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java @@ -171,4 +171,19 @@ interface WithProperties { Update withProperties(WorkloadNetworkDhcpEntity properties); } } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + WorkloadNetworkDhcp refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + WorkloadNetworkDhcp refresh(Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java index 3bc6d42bd4dde..3a10764e9607e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java @@ -756,6 +756,29 @@ Response getPublicIPWithResponse(String resourceGroupNa */ Response getSegmentByIdWithResponse(String id, Context context); + /** + * Get a WorkloadNetworkDhcp. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + WorkloadNetworkDhcp getDhcpById(String id); + + /** + * Get a WorkloadNetworkDhcp. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetworkDhcp along with {@link Response}. + */ + Response getDhcpByIdWithResponse(String id, Context context); + /** * Get a WorkloadNetworkPortMirroring. * @@ -913,6 +936,111 @@ Response getPublicIPWithResponse(String resourceGroupNa */ void deleteDhcpByIdWithResponse(String id, Context context); + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePortMirroringById(String id); + + /** + * Delete a WorkloadNetworkPortMirroring. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePortMirroringByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteVMGroupById(String id); + + /** + * Delete a WorkloadNetworkVMGroup. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteVMGroupByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDnsServiceById(String id); + + /** + * Delete a WorkloadNetworkDnsService. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDnsServiceByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDnsZoneById(String id); + + /** + * Delete a WorkloadNetworkDnsZone. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteDnsZoneByIdWithResponse(String id, Context context); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePublicIPById(String id); + + /** + * Delete a WorkloadNetworkPublicIP. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deletePublicIPByIdWithResponse(String id, Context context); + /** * Begins definition for a new WorkloadNetworkSegment resource. * 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 new file mode 100644 index 0000000000000..15f50b1a67704 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; + +/** + * Samples for WorkloadNetworks UpdateDhcp. + */ +public final class WorkloadNetworksUpdateDhcpSamples { + /* + * x-ms-original-file: + * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDhcp.json + */ + /** + * Sample code: WorkloadNetworks_UpdateDhcp. + * + * @param manager Entry point to AvsManager. + */ + public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + WorkloadNetworkDhcp resource = manager.workloadNetworks() + .getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400L)) + .apply(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml index c311e5f593fb7..8dbefcc721d69 100644 --- a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/vmware/Microsoft.AVS.Management -commit: 487745a020644e03832689ae47ed413084e47f5f +commit: d0a7cd8047586f8fdf8517704647a19bd853659a repo: Azure/azure-rest-api-specs additionalDirectories: From dd922217630114dd501b3dcb2a035e541e559c9a Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 27 Aug 2024 15:46:49 +0800 Subject: [PATCH 16/17] update commit --- sdk/avs/azure-resourcemanager-avs/tsp-location.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml index 8dbefcc721d69..b3a9f13134eed 100644 --- a/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml +++ b/sdk/avs/azure-resourcemanager-avs/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/vmware/Microsoft.AVS.Management -commit: d0a7cd8047586f8fdf8517704647a19bd853659a +commit: fcf7f36eb27a62875d559e3b5d376711c186ea93 repo: Azure/azure-rest-api-specs additionalDirectories: From 3549ba46814cee018b980cb7c040141e3ebaaee5 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Tue, 27 Aug 2024 15:51:41 +0800 Subject: [PATCH 17/17] regen --- sdk/avs/azure-resourcemanager-avs/SAMPLE.md | 606 +++-- .../azure/resourcemanager/avs/AvsManager.java | 48 +- .../resourcemanager/avs/fluent/AvsClient.java | 18 +- .../avs/fluent/IscsiPathsClient.java | 36 +- .../avs/fluent/WorkloadNetworksClient.java | 418 ++- .../avs/fluent/models/AddonInner.java | 24 +- .../avs/fluent/models/CloudLinkInner.java | 24 +- .../avs/fluent/models/ClusterInner.java | 24 +- .../avs/fluent/models/DatastoreInner.java | 24 +- .../ExpressRouteAuthorizationInner.java | 24 +- .../models/GlobalReachConnectionInner.java | 24 +- .../fluent/models/HcxEnterpriseSiteInner.java | 24 +- .../avs/fluent/models/IscsiPathInner.java | 24 +- .../fluent/models/PlacementPolicyInner.java | 24 +- .../avs/fluent/models/PrivateCloudInner.java | 28 +- .../avs/fluent/models/ScriptCmdletInner.java | 24 +- .../fluent/models/ScriptExecutionInner.java | 24 +- .../avs/fluent/models/ScriptPackageInner.java | 24 +- .../fluent/models/VirtualMachineInner.java | 24 +- .../models/WorkloadNetworkDhcpInner.java | 24 +- .../WorkloadNetworkDnsServiceInner.java | 24 +- .../models/WorkloadNetworkDnsZoneInner.java | 24 +- .../models/WorkloadNetworkGatewayInner.java | 24 +- .../fluent/models/WorkloadNetworkInner.java | 24 +- .../WorkloadNetworkPortMirroringInner.java | 24 +- .../models/WorkloadNetworkPublicIpInner.java | 24 +- .../models/WorkloadNetworkSegmentInner.java | 24 +- .../models/WorkloadNetworkVMGroupInner.java | 24 +- .../WorkloadNetworkVirtualMachineInner.java | 24 +- .../avs/implementation/AddonsClientImpl.java | 8 +- .../AuthorizationsClientImpl.java | 8 +- .../avs/implementation/AvsClientBuilder.java | 38 +- .../avs/implementation/AvsClientImpl.java | 44 +- .../implementation/CloudLinksClientImpl.java | 8 +- .../implementation/ClustersClientImpl.java | 8 +- .../implementation/DatastoresClientImpl.java | 8 +- .../GlobalReachConnectionsClientImpl.java | 8 +- .../HcxEnterpriseSitesClientImpl.java | 8 +- .../avs/implementation/IscsiPathImpl.java | 91 +- .../implementation/IscsiPathsClientImpl.java | 185 +- .../avs/implementation/IscsiPathsImpl.java | 105 +- .../implementation/LocationsClientImpl.java | 8 +- .../implementation/OperationsClientImpl.java | 8 +- .../PlacementPoliciesClientImpl.java | 8 +- .../PrivateCloudsClientImpl.java | 8 +- .../ScriptCmdletsClientImpl.java | 8 +- .../ScriptExecutionsClientImpl.java | 8 +- .../ScriptPackagesClientImpl.java | 8 +- .../VirtualMachinesClientImpl.java | 8 +- .../WorkloadNetworkDhcpImpl.java | 33 +- .../WorkloadNetworkDnsServiceImpl.java | 24 +- .../WorkloadNetworkDnsZoneImpl.java | 23 +- .../WorkloadNetworkPortMirroringImpl.java | 26 +- .../WorkloadNetworkPublicIpImpl.java | 16 +- .../WorkloadNetworkSegmentImpl.java | 23 +- .../WorkloadNetworkVMGroupImpl.java | 23 +- .../WorkloadNetworksClientImpl.java | 2377 +++++++++++------ .../implementation/WorkloadNetworksImpl.java | 593 ++-- .../avs/models/AddonArcProperties.java | 1 - .../avs/models/AddonHcxProperties.java | 1 - .../avs/models/AddonSrmProperties.java | 1 - .../avs/models/AddonVrProperties.java | 1 - .../resourcemanager/avs/models/IscsiPath.java | 122 + .../avs/models/IscsiPaths.java | 64 +- .../PSCredentialExecutionParameter.java | 9 +- .../ScriptSecureStringExecutionParameter.java | 9 +- .../ScriptStringExecutionParameter.java | 9 +- .../VmHostPlacementPolicyProperties.java | 1 - .../models/VmPlacementPolicyProperties.java | 1 - .../avs/models/WorkloadNetworkDhcp.java | 21 +- .../avs/models/WorkloadNetworkDhcpRelay.java | 25 +- .../avs/models/WorkloadNetworkDhcpServer.java | 25 +- .../avs/models/WorkloadNetworkDnsService.java | 6 +- .../avs/models/WorkloadNetworkDnsZone.java | 6 +- .../models/WorkloadNetworkPortMirroring.java | 6 +- .../avs/models/WorkloadNetworkPublicIp.java | 6 +- .../avs/models/WorkloadNetworkSegment.java | 6 +- .../avs/models/WorkloadNetworkVMGroup.java | 6 +- .../avs/models/WorkloadNetworks.java | 305 +-- .../proxy-config.json | 2 +- .../reflect-config.json | 2 +- .../AddonsCreateOrUpdateSamples.java | 54 +- .../avs/generated/AddonsDeleteSamples.java | 2 +- .../avs/generated/AddonsGetSamples.java | 38 +- .../avs/generated/AddonsListSamples.java | 2 +- .../AuthorizationsCreateOrUpdateSamples.java | 3 +- .../AuthorizationsDeleteSamples.java | 2 +- .../generated/AuthorizationsGetSamples.java | 2 +- .../generated/AuthorizationsListSamples.java | 2 +- .../CloudLinksCreateOrUpdateSamples.java | 3 +- .../generated/CloudLinksDeleteSamples.java | 2 +- .../avs/generated/CloudLinksGetSamples.java | 2 +- .../avs/generated/CloudLinksListSamples.java | 2 +- .../ClustersCreateOrUpdateSamples.java | 3 +- .../avs/generated/ClustersDeleteSamples.java | 2 +- .../avs/generated/ClustersGetSamples.java | 2 +- .../avs/generated/ClustersListSamples.java | 2 +- .../generated/ClustersListZonesSamples.java | 14 +- .../avs/generated/ClustersUpdateSamples.java | 2 +- .../DatastoresCreateOrUpdateSamples.java | 3 +- .../generated/DatastoresDeleteSamples.java | 2 +- .../avs/generated/DatastoresGetSamples.java | 2 +- .../avs/generated/DatastoresListSamples.java | 2 +- ...ReachConnectionsCreateOrUpdateSamples.java | 3 +- .../GlobalReachConnectionsDeleteSamples.java | 3 +- .../GlobalReachConnectionsGetSamples.java | 3 +- .../GlobalReachConnectionsListSamples.java | 3 +- ...xEnterpriseSitesCreateOrUpdateSamples.java | 3 +- .../HcxEnterpriseSitesDeleteSamples.java | 3 +- .../HcxEnterpriseSitesGetSamples.java | 2 +- .../HcxEnterpriseSitesListSamples.java | 3 +- .../IscsiPathsCreateOrUpdateSamples.java | 11 +- .../generated/IscsiPathsDeleteSamples.java | 4 +- .../avs/generated/IscsiPathsGetSamples.java | 4 +- .../IscsiPathsListByPrivateCloudSamples.java | 2 +- ...ocationsCheckQuotaAvailabilitySamples.java | 3 +- ...ocationsCheckTrialAvailabilitySamples.java | 19 +- .../avs/generated/OperationsListSamples.java | 2 +- ...lacementPoliciesCreateOrUpdateSamples.java | 3 +- .../PlacementPoliciesDeleteSamples.java | 3 +- .../PlacementPoliciesGetSamples.java | 2 +- .../PlacementPoliciesListSamples.java | 2 +- .../PlacementPoliciesUpdateSamples.java | 3 +- .../PrivateCloudsCreateOrUpdateSamples.java | 28 +- .../generated/PrivateCloudsDeleteSamples.java | 2 +- ...rivateCloudsGetByResourceGroupSamples.java | 14 +- ...vateCloudsListAdminCredentialsSamples.java | 3 +- ...ivateCloudsListByResourceGroupSamples.java | 14 +- .../generated/PrivateCloudsListSamples.java | 15 +- ...rivateCloudsRotateNsxtPasswordSamples.java | 3 +- ...ateCloudsRotateVcenterPasswordSamples.java | 3 +- .../generated/PrivateCloudsUpdateSamples.java | 17 +- .../generated/ScriptCmdletsGetSamples.java | 2 +- .../generated/ScriptCmdletsListSamples.java | 2 +- ...ScriptExecutionsCreateOrUpdateSamples.java | 3 +- .../ScriptExecutionsDeleteSamples.java | 3 +- ...riptExecutionsGetExecutionLogsSamples.java | 3 +- .../generated/ScriptExecutionsGetSamples.java | 2 +- .../ScriptExecutionsListSamples.java | 2 +- .../generated/ScriptPackagesGetSamples.java | 2 +- .../generated/ScriptPackagesListSamples.java | 2 +- .../generated/VirtualMachinesGetSamples.java | 2 +- .../generated/VirtualMachinesListSamples.java | 2 +- ...irtualMachinesRestrictMovementSamples.java | 3 +- .../WorkloadNetworksCreateDhcpSamples.java | 5 +- ...rkloadNetworksCreateDnsServiceSamples.java | 5 +- .../WorkloadNetworksCreateDnsZoneSamples.java | 5 +- ...oadNetworksCreatePortMirroringSamples.java | 5 +- ...WorkloadNetworksCreatePublicIPSamples.java | 11 +- .../WorkloadNetworksCreateSegmentSamples.java | 5 +- .../WorkloadNetworksCreateVMGroupSamples.java | 8 +- .../WorkloadNetworksDeleteDhcpSamples.java | 5 +- ...rkloadNetworksDeleteDnsServiceSamples.java | 3 +- .../WorkloadNetworksDeleteDnsZoneSamples.java | 3 +- ...oadNetworksDeletePortMirroringSamples.java | 3 +- ...WorkloadNetworksDeletePublicIPSamples.java | 9 +- .../WorkloadNetworksDeleteSegmentSamples.java | 6 +- .../WorkloadNetworksDeleteVMGroupSamples.java | 3 +- .../WorkloadNetworksGetDhcpSamples.java | 3 +- .../WorkloadNetworksGetDnsServiceSamples.java | 5 +- .../WorkloadNetworksGetDnsZoneSamples.java | 5 +- .../WorkloadNetworksGetGatewaySamples.java | 5 +- ...rkloadNetworksGetPortMirroringSamples.java | 5 +- .../WorkloadNetworksGetPublicIPSamples.java | 9 +- .../generated/WorkloadNetworksGetSamples.java | 4 +- .../WorkloadNetworksGetSegmentSamples.java | 5 +- .../WorkloadNetworksGetVMGroupSamples.java | 5 +- ...kloadNetworksGetVirtualMachineSamples.java | 5 +- .../WorkloadNetworksListDhcpSamples.java | 5 +- ...orkloadNetworksListDnsServicesSamples.java | 5 +- .../WorkloadNetworksListDnsZonesSamples.java | 5 +- .../WorkloadNetworksListGatewaysSamples.java | 5 +- ...kloadNetworksListPortMirroringSamples.java | 5 +- .../WorkloadNetworksListPublicIPsSamples.java | 9 +- .../WorkloadNetworksListSamples.java | 2 +- .../WorkloadNetworksListSegmentsSamples.java | 5 +- .../WorkloadNetworksListVMGroupsSamples.java | 5 +- ...oadNetworksListVirtualMachinesSamples.java | 5 +- .../WorkloadNetworksUpdateDhcpSamples.java | 32 - ...rkloadNetworksUpdateDnsServiceSamples.java | 5 +- .../WorkloadNetworksUpdateDnsZoneSamples.java | 5 +- ...oadNetworksUpdatePortMirroringSamples.java | 5 +- .../WorkloadNetworksUpdateSegmentSamples.java | 5 +- .../WorkloadNetworksUpdateVMGroupSamples.java | 5 +- .../generated/AddonArcPropertiesTests.java | 8 +- .../generated/AddonHcxPropertiesTests.java | 8 +- .../avs/generated/AddonInnerTests.java | 2 +- .../avs/generated/AddonListTests.java | 4 +- .../avs/generated/AddonPropertiesTests.java | 2 +- .../avs/generated/AddonVrPropertiesTests.java | 12 +- .../AddonsCreateOrUpdateMockTests.java | 6 +- .../avs/generated/AddonsDeleteMockTests.java | 2 +- .../AddonsGetWithResponseMockTests.java | 4 +- .../avs/generated/AddonsListMockTests.java | 5 +- .../AuthorizationsDeleteMockTests.java | 2 +- .../avs/generated/CloudLinkInnerTests.java | 8 +- .../avs/generated/CloudLinkListTests.java | 6 +- .../generated/CloudLinkPropertiesTests.java | 8 +- .../CloudLinksCreateOrUpdateMockTests.java | 10 +- .../generated/CloudLinksDeleteMockTests.java | 2 +- .../CloudLinksGetWithResponseMockTests.java | 6 +- .../generated/CloudLinksListMockTests.java | 6 +- .../ClustersCreateOrUpdateMockTests.java | 38 +- .../generated/ClustersDeleteMockTests.java | 2 +- .../ClustersGetWithResponseMockTests.java | 20 +- .../avs/generated/ClustersListMockTests.java | 20 +- ...lustersListZonesWithResponseMockTests.java | 4 +- .../DatastoresCreateOrUpdateMockTests.java | 23 +- .../generated/DatastoresDeleteMockTests.java | 2 +- .../DatastoresGetWithResponseMockTests.java | 13 +- .../generated/DatastoresListMockTests.java | 14 +- ...GlobalReachConnectionsDeleteMockTests.java | 2 +- ...priseSitesDeleteWithResponseMockTests.java | 3 +- .../avs/generated/IscsiPathInnerTests.java | 8 +- .../generated/IscsiPathListResultTests.java | 6 +- .../generated/IscsiPathPropertiesTests.java | 8 +- .../IscsiPathsCreateOrUpdateMockTests.java | 11 +- .../generated/IscsiPathsDeleteMockTests.java | 2 +- .../IscsiPathsGetWithResponseMockTests.java | 9 +- ...IscsiPathsListByPrivateCloudMockTests.java | 6 +- ...uotaAvailabilityWithResponseMockTests.java | 4 +- ...rialAvailabilityWithResponseMockTests.java | 14 +- .../generated/OperationsListMockTests.java | 2 +- ...cementPoliciesCreateOrUpdateMockTests.java | 12 +- .../PlacementPoliciesDeleteMockTests.java | 2 +- ...ementPoliciesGetWithResponseMockTests.java | 7 +- .../PlacementPoliciesListMockTests.java | 8 +- .../generated/PlacementPoliciesListTests.java | 6 +- .../generated/PlacementPolicyInnerTests.java | 12 +- .../PlacementPolicyPropertiesTests.java | 8 +- .../PlacementPolicyUpdatePropertiesTests.java | 26 +- .../generated/PlacementPolicyUpdateTests.java | 20 +- .../PrivateCloudsDeleteMockTests.java | 2 +- .../avs/generated/ScriptCmdletInnerTests.java | 2 +- .../ScriptCmdletPropertiesTests.java | 2 +- ...ScriptCmdletsGetWithResponseMockTests.java | 4 +- .../generated/ScriptCmdletsListMockTests.java | 4 +- .../avs/generated/ScriptCmdletsListTests.java | 4 +- .../generated/ScriptExecutionInnerTests.java | 57 +- .../ScriptExecutionParameterTests.java | 8 +- .../ScriptExecutionPropertiesTests.java | 55 +- ...riptExecutionsCreateOrUpdateMockTests.java | 47 +- .../ScriptExecutionsDeleteMockTests.java | 2 +- ...GetExecutionLogsWithResponseMockTests.java | 21 +- ...iptExecutionsGetWithResponseMockTests.java | 18 +- .../ScriptExecutionsListMockTests.java | 18 +- .../generated/ScriptExecutionsListTests.java | 16 +- .../generated/ScriptPackageInnerTests.java | 2 +- .../ScriptPackagePropertiesTests.java | 2 +- ...criptPackagesGetWithResponseMockTests.java | 4 +- .../ScriptPackagesListMockTests.java | 4 +- .../generated/ScriptPackagesListTests.java | 4 +- .../avs/generated/ScriptParameterTests.java | 4 +- ...ptSecureStringExecutionParameterTests.java | 16 +- .../ScriptStringExecutionParameterTests.java | 13 +- .../generated/VirtualMachineInnerTests.java | 2 +- .../VirtualMachinePropertiesTests.java | 2 +- .../VirtualMachineRestrictMovementTests.java | 8 +- ...rtualMachinesGetWithResponseMockTests.java | 4 +- .../VirtualMachinesListMockTests.java | 4 +- .../generated/VirtualMachinesListTests.java | 4 +- .../VmHostPlacementPolicyPropertiesTests.java | 26 +- .../VmPlacementPolicyPropertiesTests.java | 14 +- .../WorkloadNetworkDhcpEntityTests.java | 12 +- .../WorkloadNetworkDhcpInnerTests.java | 14 +- .../WorkloadNetworkDhcpListTests.java | 8 +- .../WorkloadNetworkDhcpRelayTests.java | 20 +- .../WorkloadNetworkDhcpServerTests.java | 26 +- .../WorkloadNetworkDnsServiceInnerTests.java | 32 +- ...kloadNetworkDnsServicePropertiesTests.java | 39 +- .../WorkloadNetworkDnsServicesListTests.java | 16 +- .../WorkloadNetworkDnsZoneInnerTests.java | 38 +- ...WorkloadNetworkDnsZonePropertiesTests.java | 39 +- .../WorkloadNetworkDnsZonesListTests.java | 16 +- .../WorkloadNetworkGatewayInnerTests.java | 4 +- .../WorkloadNetworkGatewayListTests.java | 6 +- ...WorkloadNetworkGatewayPropertiesTests.java | 8 +- .../generated/WorkloadNetworkInnerTests.java | 2 +- .../generated/WorkloadNetworkListTests.java | 4 +- ...orkloadNetworkPortMirroringInnerTests.java | 32 +- ...WorkloadNetworkPortMirroringListTests.java | 14 +- ...adNetworkPortMirroringPropertiesTests.java | 26 +- .../WorkloadNetworkPublicIPsListTests.java | 8 +- .../WorkloadNetworkPublicIpInnerTests.java | 14 +- ...orkloadNetworkPublicIpPropertiesTests.java | 14 +- .../WorkloadNetworkSegmentInnerTests.java | 33 +- .../WorkloadNetworkSegmentPortVifTests.java | 4 +- ...WorkloadNetworkSegmentPropertiesTests.java | 33 +- .../WorkloadNetworkSegmentSubnetTests.java | 19 +- .../WorkloadNetworkSegmentsListTests.java | 14 +- .../WorkloadNetworkVMGroupInnerTests.java | 20 +- ...WorkloadNetworkVMGroupPropertiesTests.java | 21 +- .../WorkloadNetworkVMGroupsListTests.java | 10 +- ...rkloadNetworkVirtualMachineInnerTests.java | 4 +- ...dNetworkVirtualMachinePropertiesTests.java | 4 +- ...rkloadNetworkVirtualMachinesListTests.java | 6 +- .../WorkloadNetworksCreateDhcpMockTests.java | 12 +- ...loadNetworksCreateDnsServiceMockTests.java | 28 +- ...orkloadNetworksCreateDnsZoneMockTests.java | 30 +- ...dNetworksCreatePortMirroringMockTests.java | 26 +- ...rkloadNetworksCreatePublicIPMockTests.java | 18 +- ...orkloadNetworksCreateSegmentMockTests.java | 26 +- ...orkloadNetworksCreateVMGroupMockTests.java | 18 +- .../WorkloadNetworksDeleteDhcpMockTests.java | 2 +- ...loadNetworksDeleteDnsServiceMockTests.java | 2 +- ...orkloadNetworksDeleteDnsZoneMockTests.java | 2 +- ...dNetworksDeletePortMirroringMockTests.java | 2 +- ...rkloadNetworksDeletePublicIPMockTests.java | 6 +- ...orkloadNetworksDeleteSegmentMockTests.java | 3 +- ...orkloadNetworksDeleteVMGroupMockTests.java | 2 +- ...dNetworksGetDhcpWithResponseMockTests.java | 8 +- ...rksGetDnsServiceWithResponseMockTests.java | 17 +- ...tworksGetDnsZoneWithResponseMockTests.java | 16 +- ...tworksGetGatewayWithResponseMockTests.java | 7 +- ...GetPortMirroringWithResponseMockTests.java | 14 +- ...worksGetPublicIPWithResponseMockTests.java | 13 +- ...tworksGetSegmentWithResponseMockTests.java | 15 +- ...tworksGetVMGroupWithResponseMockTests.java | 10 +- ...etVirtualMachineWithResponseMockTests.java | 6 +- ...kloadNetworksGetWithResponseMockTests.java | 4 +- .../WorkloadNetworksListDhcpMockTests.java | 10 +- ...kloadNetworksListDnsServicesMockTests.java | 16 +- ...WorkloadNetworksListDnsZonesMockTests.java | 18 +- ...WorkloadNetworksListGatewaysMockTests.java | 8 +- .../WorkloadNetworksListMockTests.java | 4 +- ...oadNetworksListPortMirroringMockTests.java | 12 +- ...orkloadNetworksListPublicIPsMockTests.java | 14 +- ...WorkloadNetworksListSegmentsMockTests.java | 14 +- ...WorkloadNetworksListVMGroupsMockTests.java | 10 +- ...dNetworksListVirtualMachinesMockTests.java | 6 +- 330 files changed, 4839 insertions(+), 3559 deletions(-) delete mode 100644 sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index bc11bf8089734..d6c3eb91c086b 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -118,14 +118,14 @@ - [CreateDnsService](#workloadnetworks_creatednsservice) - [CreateDnsZone](#workloadnetworks_creatednszone) - [CreatePortMirroring](#workloadnetworks_createportmirroring) -- [CreatePublicIP](#workloadnetworks_createpublicip) +- [CreatePublicIp](#workloadnetworks_createpublicip) - [CreateSegment](#workloadnetworks_createsegment) - [CreateVMGroup](#workloadnetworks_createvmgroup) - [DeleteDhcp](#workloadnetworks_deletedhcp) - [DeleteDnsService](#workloadnetworks_deletednsservice) - [DeleteDnsZone](#workloadnetworks_deletednszone) - [DeletePortMirroring](#workloadnetworks_deleteportmirroring) -- [DeletePublicIP](#workloadnetworks_deletepublicip) +- [DeletePublicIp](#workloadnetworks_deletepublicip) - [DeleteSegment](#workloadnetworks_deletesegment) - [DeleteVMGroup](#workloadnetworks_deletevmgroup) - [Get](#workloadnetworks_get) @@ -134,7 +134,7 @@ - [GetDnsZone](#workloadnetworks_getdnszone) - [GetGateway](#workloadnetworks_getgateway) - [GetPortMirroring](#workloadnetworks_getportmirroring) -- [GetPublicIP](#workloadnetworks_getpublicip) +- [GetPublicIp](#workloadnetworks_getpublicip) - [GetSegment](#workloadnetworks_getsegment) - [GetVMGroup](#workloadnetworks_getvmgroup) - [GetVirtualMachine](#workloadnetworks_getvirtualmachine) @@ -144,11 +144,10 @@ - [ListDnsZones](#workloadnetworks_listdnszones) - [ListGateways](#workloadnetworks_listgateways) - [ListPortMirroring](#workloadnetworks_listportmirroring) -- [ListPublicIPs](#workloadnetworks_listpublicips) +- [ListPublicIps](#workloadnetworks_listpublicips) - [ListSegments](#workloadnetworks_listsegments) - [ListVMGroups](#workloadnetworks_listvmgroups) - [ListVirtualMachines](#workloadnetworks_listvirtualmachines) -- [UpdateDhcp](#workloadnetworks_updatedhcp) - [UpdateDnsService](#workloadnetworks_updatednsservice) - [UpdateDnsZone](#workloadnetworks_updatednszone) - [UpdatePortMirroring](#workloadnetworks_updateportmirroring) @@ -158,14 +157,48 @@ ```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. */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_CreateOrUpdate_ArcReg.json + * x-ms-original-file: 2023-09-01/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: 2023-09-01/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: 2023-09-01/Addons_CreateOrUpdate_ArcReg.json */ /** * Sample code: Addons_CreateOrUpdate_ArcReg. @@ -180,6 +213,22 @@ public final class AddonsCreateOrUpdateSamples { "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) .create(); } + + /* + * x-ms-original-file: 2023-09-01/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(); + } } ``` @@ -191,7 +240,7 @@ public final class AddonsCreateOrUpdateSamples { */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Delete.json + * x-ms-original-file: 2023-09-01/Addons_Delete.json */ /** * Sample code: Addons_Delete. @@ -212,7 +261,43 @@ public final class AddonsDeleteSamples { */ public final class AddonsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Get_ArcReg.json + * x-ms-original-file: 2023-09-01/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: 2023-09-01/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: 2023-09-01/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); + } + + /* + * x-ms-original-file: 2023-09-01/Addons_Get_ArcReg.json */ /** * Sample code: Addons_Get_ArcReg. @@ -233,7 +318,7 @@ public final class AddonsGetSamples { */ public final class AddonsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_List.json + * x-ms-original-file: 2023-09-01/Addons_List.json */ /** * Sample code: Addons_List. @@ -254,8 +339,7 @@ public final class AddonsListSamples { */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. @@ -276,7 +360,7 @@ public final class AuthorizationsCreateOrUpdateSamples { */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_Delete.json + * x-ms-original-file: 2023-09-01/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. @@ -297,7 +381,7 @@ public final class AuthorizationsDeleteSamples { */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_Get.json + * x-ms-original-file: 2023-09-01/Authorizations_Get.json */ /** * Sample code: Authorizations_Get. @@ -319,7 +403,7 @@ public final class AuthorizationsGetSamples { */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_List.json + * x-ms-original-file: 2023-09-01/Authorizations_List.json */ /** * Sample code: Authorizations_List. @@ -340,8 +424,7 @@ public final class AuthorizationsListSamples { */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. @@ -367,7 +450,7 @@ public final class CloudLinksCreateOrUpdateSamples { */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Delete.json + * x-ms-original-file: 2023-09-01/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. @@ -388,7 +471,7 @@ public final class CloudLinksDeleteSamples { */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Get.json + * x-ms-original-file: 2023-09-01/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. @@ -409,7 +492,7 @@ public final class CloudLinksGetSamples { */ public final class CloudLinksListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_List.json + * x-ms-original-file: 2023-09-01/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. @@ -432,8 +515,7 @@ import com.azure.resourcemanager.avs.models.Sku; */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. @@ -459,7 +541,7 @@ public final class ClustersCreateOrUpdateSamples { */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Delete.json + * x-ms-original-file: 2023-09-01/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. @@ -480,7 +562,7 @@ public final class ClustersDeleteSamples { */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Get.json + * x-ms-original-file: 2023-09-01/Clusters_Get.json */ /** * Sample code: Clusters_Get. @@ -501,7 +583,7 @@ public final class ClustersGetSamples { */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_List.json + * x-ms-original-file: 2023-09-01/Clusters_List.json */ /** * Sample code: Clusters_List. @@ -522,7 +604,7 @@ public final class ClustersListSamples { */ public final class ClustersListZonesSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_ListZones.json + * x-ms-original-file: 2023-09-01/Clusters_ListZones.json */ /** * Sample code: Clusters_ListZones. @@ -532,6 +614,18 @@ public final class ClustersListZonesSamples { 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: 2023-09-01/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); + } } ``` @@ -545,7 +639,7 @@ import com.azure.resourcemanager.avs.models.Cluster; */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Update.json + * x-ms-original-file: 2023-09-01/Clusters_Update.json */ /** * Sample code: Clusters_Update. @@ -571,8 +665,7 @@ import com.azure.resourcemanager.avs.models.NetAppVolume; */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. @@ -598,7 +691,7 @@ public final class DatastoresCreateOrUpdateSamples { */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Delete.json + * x-ms-original-file: 2023-09-01/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. @@ -619,7 +712,7 @@ public final class DatastoresDeleteSamples { */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Get.json + * x-ms-original-file: 2023-09-01/Datastores_Get.json */ /** * Sample code: Datastores_Get. @@ -641,7 +734,7 @@ public final class DatastoresGetSamples { */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_List.json + * x-ms-original-file: 2023-09-01/Datastores_List.json */ /** * Sample code: Datastores_List. @@ -662,8 +755,7 @@ public final class DatastoresListSamples { */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. @@ -690,8 +782,7 @@ public final class GlobalReachConnectionsCreateOrUpdateSamples { */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_Delete.json + * x-ms-original-file: 2023-09-01/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. @@ -712,8 +803,7 @@ public final class GlobalReachConnectionsDeleteSamples { */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_Get.json + * x-ms-original-file: 2023-09-01/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. @@ -735,8 +825,7 @@ public final class GlobalReachConnectionsGetSamples { */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_List.json + * x-ms-original-file: 2023-09-01/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. @@ -757,8 +846,7 @@ public final class GlobalReachConnectionsListSamples { */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. @@ -779,8 +867,7 @@ public final class HcxEnterpriseSitesCreateOrUpdateSamples { */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Delete.json + * x-ms-original-file: 2023-09-01/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. @@ -801,7 +888,7 @@ public final class HcxEnterpriseSitesDeleteSamples { */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Get.json + * x-ms-original-file: 2023-09-01/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. @@ -822,8 +909,7 @@ public final class HcxEnterpriseSitesGetSamples { */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_List.json + * x-ms-original-file: 2023-09-01/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. @@ -839,15 +925,12 @@ public final class HcxEnterpriseSitesListSamples { ### IscsiPaths_CreateOrUpdate ```java -import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; - /** * Samples for IscsiPaths CreateOrUpdate. */ public final class IscsiPathsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/IscsiPaths_CreateOrUpdate.json */ /** * Sample code: IscsiPaths_CreateOrUpdate. @@ -856,8 +939,10 @@ public final class IscsiPathsCreateOrUpdateSamples { */ 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); + .define("default") + .withExistingPrivateCloud("group1", "cloud1") + .withNetworkBlock("192.168.0.0/24") + .create(); } } ``` @@ -870,7 +955,7 @@ public final class IscsiPathsCreateOrUpdateSamples { */ public final class IscsiPathsDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Delete.json + * x-ms-original-file: 2023-09-01/IscsiPaths_Delete.json */ /** * Sample code: IscsiPaths_Delete. @@ -878,7 +963,7 @@ public final class IscsiPathsDeleteSamples { * @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); + manager.iscsiPaths().delete("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -891,7 +976,7 @@ public final class IscsiPathsDeleteSamples { */ public final class IscsiPathsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Get.json + * x-ms-original-file: 2023-09-01/IscsiPaths_Get.json */ /** * Sample code: IscsiPaths_Get. @@ -899,7 +984,7 @@ public final class IscsiPathsGetSamples { * @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); + manager.iscsiPaths().getWithResponse("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -912,7 +997,7 @@ public final class IscsiPathsGetSamples { */ public final class IscsiPathsListByPrivateCloudSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_List.json + * x-ms-original-file: 2023-09-01/IscsiPaths_List.json */ /** * Sample code: IscsiPaths_ListByPrivateCloud. @@ -933,8 +1018,7 @@ public final class IscsiPathsListByPrivateCloudSamples { */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckQuotaAvailability.json + * x-ms-original-file: 2023-09-01/Locations_CheckQuotaAvailability.json */ /** * Sample code: Locations_CheckQuotaAvailability. @@ -950,14 +1034,14 @@ public final class LocationsCheckQuotaAvailabilitySamples { ### Locations_CheckTrialAvailability ```java +import com.azure.resourcemanager.avs.models.Sku; /** * Samples for Locations CheckTrialAvailability. */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckTrialAvailability.json + * x-ms-original-file: 2023-09-01/Locations_CheckTrialAvailability.json */ /** * Sample code: Locations_CheckTrialAvailability. @@ -967,6 +1051,20 @@ public final class LocationsCheckTrialAvailabilitySamples { public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs.AvsManager manager) { manager.locations().checkTrialAvailabilityWithResponse("eastus", null, com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2023-09-01/Locations_CheckTrialAvailabilityWithSku.json + */ + /** + * Sample code: Locations_CheckTrialAvailabilityWithSku. + * + * @param manager Entry point to AvsManager. + */ + public static void locationsCheckTrialAvailabilityWithSku(com.azure.resourcemanager.avs.AvsManager manager) { + manager.locations() + .checkTrialAvailabilityWithResponse("eastus", new Sku().withName("avs52t"), + com.azure.core.util.Context.NONE); + } } ``` @@ -978,7 +1076,7 @@ public final class LocationsCheckTrialAvailabilitySamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Operations_List.json + * x-ms-original-file: 2023-09-01/Operations_List.json */ /** * Sample code: Operations_List. @@ -1005,8 +1103,7 @@ import java.util.Arrays; */ public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/PlacementPolicies_CreateOrUpdate.json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. @@ -1038,8 +1135,7 @@ public final class PlacementPoliciesCreateOrUpdateSamples { */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Delete.json + * x-ms-original-file: 2023-09-01/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. @@ -1060,7 +1156,7 @@ public final class PlacementPoliciesDeleteSamples { */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Get.json + * x-ms-original-file: 2023-09-01/PlacementPolicies_Get.json */ /** * Sample code: PlacementPolicies_Get. @@ -1082,7 +1178,7 @@ public final class PlacementPoliciesGetSamples { */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_List.json + * x-ms-original-file: 2023-09-01/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. @@ -1109,8 +1205,7 @@ import java.util.Arrays; */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Update.json + * x-ms-original-file: 2023-09-01/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. @@ -1138,6 +1233,8 @@ public final class PlacementPoliciesUpdateSamples { ### PrivateClouds_CreateOrUpdate ```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.Sku; @@ -1150,8 +1247,7 @@ import java.util.Map; */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. @@ -1171,6 +1267,29 @@ public final class PrivateCloudsCreateOrUpdateSamples { .create(); } + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_CreateOrUpdate_Stretched.json + */ + /** + * Sample code: PrivateClouds_CreateOrUpdate_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsCreateOrUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds() + .define("cloud1") + .withRegion("eastus2") + .withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")) + .withTags(mapOf()) + .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) { @@ -1193,7 +1312,7 @@ public final class PrivateCloudsCreateOrUpdateSamples { */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Delete.json + * x-ms-original-file: 2023-09-01/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. @@ -1214,7 +1333,7 @@ public final class PrivateCloudsDeleteSamples { */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Get.json + * x-ms-original-file: 2023-09-01/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. @@ -1224,6 +1343,18 @@ public final class PrivateCloudsGetByResourceGroupSamples { public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager manager) { manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_Get_Stretched.json + */ + /** + * Sample code: PrivateClouds_Get_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsGetStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } } ``` @@ -1235,8 +1366,7 @@ public final class PrivateCloudsGetByResourceGroupSamples { */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListInSubscription.json + * x-ms-original-file: 2023-09-01/PrivateClouds_ListInSubscription.json */ /** * Sample code: PrivateClouds_ListInSubscription. @@ -1246,6 +1376,18 @@ public final class PrivateCloudsListSamples { public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { manager.privateClouds().list(com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_ListInSubscription_Stretched.json + */ + /** + * Sample code: PrivateClouds_ListInSubscription_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsListInSubscriptionStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().list(com.azure.core.util.Context.NONE); + } } ``` @@ -1257,8 +1399,7 @@ public final class PrivateCloudsListSamples { */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: 2023-09-01/PrivateClouds_ListAdminCredentials.json */ /** * Sample code: PrivateClouds_ListAdminCredentials. @@ -1279,7 +1420,7 @@ public final class PrivateCloudsListAdminCredentialsSamples { */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_List.json + * x-ms-original-file: 2023-09-01/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. @@ -1289,6 +1430,18 @@ public final class PrivateCloudsListByResourceGroupSamples { public static void privateCloudsList(com.azure.resourcemanager.avs.AvsManager manager) { manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_List_Stretched.json + */ + /** + * Sample code: PrivateClouds_List_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsListStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); + } } ``` @@ -1300,8 +1453,7 @@ public final class PrivateCloudsListByResourceGroupSamples { */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: 2023-09-01/PrivateClouds_RotateNsxtPassword.json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. @@ -1322,8 +1474,7 @@ public final class PrivateCloudsRotateNsxtPasswordSamples { */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: 2023-09-01/PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. @@ -1352,7 +1503,7 @@ import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentityType; */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Update.json + * x-ms-original-file: 2023-09-01/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. @@ -1372,6 +1523,21 @@ public final class PrivateCloudsUpdateSamples { .withKeyVaultUrl("fakeTokenPlaceholder"))) .apply(); } + + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_Update_Stretched.json + */ + /** + * Sample code: PrivateClouds_Update_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { + PrivateCloud resource = manager.privateClouds() + .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withManagementCluster(new ManagementCluster().withClusterSize(4)).apply(); + } } ``` @@ -1383,7 +1549,7 @@ public final class PrivateCloudsUpdateSamples { */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptCmdlets_Get.json + * x-ms-original-file: 2023-09-01/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. @@ -1406,7 +1572,7 @@ public final class ScriptCmdletsGetSamples { */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptCmdlets_List.json + * x-ms-original-file: 2023-09-01/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. @@ -1431,8 +1597,7 @@ import java.util.Arrays; */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/ScriptExecutions_CreateOrUpdate.json */ /** * Sample code: ScriptExecutions_CreateOrUpdate. @@ -1466,8 +1631,7 @@ public final class ScriptExecutionsCreateOrUpdateSamples { */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_Delete.json + * x-ms-original-file: 2023-09-01/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. @@ -1488,7 +1652,7 @@ public final class ScriptExecutionsDeleteSamples { */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_Get.json + * x-ms-original-file: 2023-09-01/ScriptExecutions_Get.json */ /** * Sample code: ScriptExecutions_Get. @@ -1513,8 +1677,7 @@ import java.util.Arrays; */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: 2023-09-01/ScriptExecutions_GetExecutionLogs.json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. @@ -1539,7 +1702,7 @@ public final class ScriptExecutionsGetExecutionLogsSamples { */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_List.json + * x-ms-original-file: 2023-09-01/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. @@ -1560,7 +1723,7 @@ public final class ScriptExecutionsListSamples { */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_Get.json + * x-ms-original-file: 2023-09-01/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. @@ -1582,7 +1745,7 @@ public final class ScriptPackagesGetSamples { */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_List.json + * x-ms-original-file: 2023-09-01/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. @@ -1603,7 +1766,7 @@ public final class ScriptPackagesListSamples { */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_Get.json + * x-ms-original-file: 2023-09-01/VirtualMachines_Get.json */ /** * Sample code: VirtualMachines_Get. @@ -1625,7 +1788,7 @@ public final class VirtualMachinesGetSamples { */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_List.json + * x-ms-original-file: 2023-09-01/VirtualMachines_List.json */ /** * Sample code: VirtualMachines_List. @@ -1649,8 +1812,7 @@ import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_RestrictMovement.json + * x-ms-original-file: 2023-09-01/VirtualMachines_RestrictMovement.json */ /** * Sample code: VirtualMachines_RestrictMovement. @@ -1676,8 +1838,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; */ public final class WorkloadNetworksCreateDhcpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDhcp.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateDhcp.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. @@ -1687,7 +1848,7 @@ public final class WorkloadNetworksCreateDhcpSamples { public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDhcp("dhcp1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") .withRevision(1L) .withServerAddress("40.1.5.1/24") @@ -1708,8 +1869,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsService.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateDnsService.json */ /** * Sample code: WorkloadNetworks_CreateDnsService. @@ -1719,7 +1879,7 @@ public final class WorkloadNetworksCreateDnsServiceSamples { public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDnsService("dnsService1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("dnsService1") .withDnsServiceIp("5.5.5.5") .withDefaultDnsZone("defaultDnsZone1") @@ -1741,8 +1901,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsZone.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateDnsZone.json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. @@ -1752,7 +1911,7 @@ public final class WorkloadNetworksCreateDnsZoneSamples { public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDnsZone("dnsZone1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("dnsZone1") .withDomain(Arrays.asList()) .withDnsServerIps(Arrays.asList("1.1.1.1")) @@ -1773,8 +1932,7 @@ import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreatePortMirroring.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. @@ -1784,7 +1942,7 @@ public final class WorkloadNetworksCreatePortMirroringSamples { public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .definePortMirroring("portMirroring1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("portMirroring1") .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) .withSource("vmGroup1") @@ -1795,16 +1953,15 @@ public final class WorkloadNetworksCreatePortMirroringSamples { } ``` -### WorkloadNetworks_CreatePublicIP +### WorkloadNetworks_CreatePublicIp ```java /** - * Samples for WorkloadNetworks CreatePublicIP. + * Samples for WorkloadNetworks CreatePublicIp. */ -public final class WorkloadNetworksCreatePublicIPSamples { +public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePublicIP.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreatePublicIP.json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. @@ -1813,8 +1970,8 @@ public final class WorkloadNetworksCreatePublicIPSamples { */ public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .definePublicIP("publicIP1") - .withExistingPrivateCloud("group1", "cloud1") + .definePublicIp("publicIP1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("publicIP1") .withNumberOfPublicIPs(32L) .create(); @@ -1833,8 +1990,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksCreateSegmentSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateSegments.json */ /** * Sample code: WorkloadNetworks_CreateSegments. @@ -1844,7 +2000,7 @@ public final class WorkloadNetworksCreateSegmentSamples { public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineSegment("segment1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("segment1") .withConnectedGateway("/infra/tier-1s/gateway") .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) @@ -1863,8 +2019,7 @@ public final class WorkloadNetworksCreateSegmentSamples { */ public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateVMGroup.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateVMGroup.json */ /** * Sample code: WorkloadNetworks_CreateVMGroup. @@ -1872,7 +2027,10 @@ public final class WorkloadNetworksCreateVMGroupSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().defineVMGroup("vmGroup1").withExistingPrivateCloud("group1", "cloud1").create(); + manager.workloadNetworks() + .defineVMGroup("vmGroup1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .create(); } } ``` @@ -1885,8 +2043,7 @@ public final class WorkloadNetworksCreateVMGroupSamples { */ public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDhcp.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteDhcp.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. @@ -1894,7 +2051,7 @@ public final class WorkloadNetworksDeleteDhcpSamples { * @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); + manager.workloadNetworks().deleteDhcp("group1", "cloud1", null, "dhcp1", com.azure.core.util.Context.NONE); } } ``` @@ -1907,8 +2064,7 @@ public final class WorkloadNetworksDeleteDhcpSamples { */ public final class WorkloadNetworksDeleteDnsServiceSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsService.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteDnsService.json */ /** * Sample code: WorkloadNetworks_DeleteDnsService. @@ -1930,8 +2086,7 @@ public final class WorkloadNetworksDeleteDnsServiceSamples { */ public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsZone.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteDnsZone.json */ /** * Sample code: WorkloadNetworks_DeleteDnsZone. @@ -1952,8 +2107,7 @@ public final class WorkloadNetworksDeleteDnsZoneSamples { */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeletePortMirroring.json */ /** * Sample code: WorkloadNetworks_DeletePortMirroring. @@ -1967,16 +2121,15 @@ public final class WorkloadNetworksDeletePortMirroringSamples { } ``` -### WorkloadNetworks_DeletePublicIP +### WorkloadNetworks_DeletePublicIp ```java /** - * Samples for WorkloadNetworks DeletePublicIP. + * Samples for WorkloadNetworks DeletePublicIp. */ -public final class WorkloadNetworksDeletePublicIPSamples { +public final class WorkloadNetworksDeletePublicIpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePublicIP.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeletePublicIP.json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. @@ -1984,7 +2137,7 @@ public final class WorkloadNetworksDeletePublicIPSamples { * @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); + manager.workloadNetworks().deletePublicIp("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -1997,8 +2150,7 @@ public final class WorkloadNetworksDeletePublicIPSamples { */ public final class WorkloadNetworksDeleteSegmentSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteSegment.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteSegment.json */ /** * Sample code: WorkloadNetworks_DeleteSegment. @@ -2006,7 +2158,8 @@ public final class WorkloadNetworksDeleteSegmentSamples { * @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); + manager.workloadNetworks() + .deleteSegment("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); } } ``` @@ -2019,8 +2172,7 @@ public final class WorkloadNetworksDeleteSegmentSamples { */ public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteVMGroup.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteVMGroup.json */ /** * Sample code: WorkloadNetworks_DeleteVMGroup. @@ -2041,7 +2193,7 @@ public final class WorkloadNetworksDeleteVMGroupSamples { */ public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_Get.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_Get.json */ /** * Sample code: WorkloadNetworks_Get. @@ -2049,7 +2201,7 @@ public final class WorkloadNetworksGetSamples { * @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); + manager.workloadNetworks().getWithResponse("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -2062,8 +2214,7 @@ public final class WorkloadNetworksGetSamples { */ public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDhcp.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetDhcp.json */ /** * Sample code: WorkloadNetworks_GetDhcp. @@ -2084,8 +2235,7 @@ public final class WorkloadNetworksGetDhcpSamples { */ public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsService.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetDnsService.json */ /** * Sample code: WorkloadNetworks_GetDnsService. @@ -2094,7 +2244,7 @@ public final class WorkloadNetworksGetDnsServiceSamples { */ public static void workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); + .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE); } } ``` @@ -2107,8 +2257,7 @@ public final class WorkloadNetworksGetDnsServiceSamples { */ public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsZone.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetDnsZone.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. @@ -2117,7 +2266,7 @@ public final class WorkloadNetworksGetDnsZoneSamples { */ public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); + .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE); } } ``` @@ -2130,8 +2279,7 @@ public final class WorkloadNetworksGetDnsZoneSamples { */ public final class WorkloadNetworksGetGatewaySamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetGateway.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. @@ -2140,7 +2288,7 @@ public final class WorkloadNetworksGetGatewaySamples { */ public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getGatewayWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); + .getGatewayWithResponse("group1", "cloud1", null, "gateway1", com.azure.core.util.Context.NONE); } } ``` @@ -2153,8 +2301,7 @@ public final class WorkloadNetworksGetGatewaySamples { */ public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetPortMirroring.json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. @@ -2163,21 +2310,20 @@ public final class WorkloadNetworksGetPortMirroringSamples { */ public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); + .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_GetPublicIP +### WorkloadNetworks_GetPublicIp ```java /** - * Samples for WorkloadNetworks GetPublicIP. + * Samples for WorkloadNetworks GetPublicIp. */ -public final class WorkloadNetworksGetPublicIPSamples { +public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPublicIP.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetPublicIP.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. @@ -2186,7 +2332,7 @@ public final class WorkloadNetworksGetPublicIPSamples { */ public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getPublicIPWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); + .getPublicIpWithResponse("group1", "cloud1", null, "publicIP1", com.azure.core.util.Context.NONE); } } ``` @@ -2199,8 +2345,7 @@ public final class WorkloadNetworksGetPublicIPSamples { */ public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetSegment.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetSegment.json */ /** * Sample code: WorkloadNetworks_GetSegment. @@ -2209,7 +2354,7 @@ public final class WorkloadNetworksGetSegmentSamples { */ public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); } } ``` @@ -2222,8 +2367,7 @@ public final class WorkloadNetworksGetSegmentSamples { */ public final class WorkloadNetworksGetVMGroupSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVMGroup.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetVMGroup.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. @@ -2232,7 +2376,7 @@ public final class WorkloadNetworksGetVMGroupSamples { */ public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); + .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE); } } ``` @@ -2245,8 +2389,7 @@ public final class WorkloadNetworksGetVMGroupSamples { */ public final class WorkloadNetworksGetVirtualMachineSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetVirtualMachine.json */ /** * Sample code: WorkloadNetworks_GetVirtualMachine. @@ -2255,7 +2398,7 @@ public final class WorkloadNetworksGetVirtualMachineSamples { */ public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getVirtualMachineWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); + .getVirtualMachineWithResponse("group1", "cloud1", null, "vm1", com.azure.core.util.Context.NONE); } } ``` @@ -2268,7 +2411,7 @@ public final class WorkloadNetworksGetVirtualMachineSamples { */ public final class WorkloadNetworksListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_List.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_List.json */ /** * Sample code: WorkloadNetworks_List. @@ -2289,8 +2432,7 @@ public final class WorkloadNetworksListSamples { */ public final class WorkloadNetworksListDhcpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDhcp.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListDhcp.json */ /** * Sample code: WorkloadNetworks_ListDhcp. @@ -2298,7 +2440,7 @@ public final class WorkloadNetworksListDhcpSamples { * @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); + manager.workloadNetworks().listDhcp("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -2311,8 +2453,7 @@ public final class WorkloadNetworksListDhcpSamples { */ public final class WorkloadNetworksListDnsServicesSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListDnsServices.json */ /** * Sample code: WorkloadNetworks_ListDnsServices. @@ -2320,7 +2461,7 @@ public final class WorkloadNetworksListDnsServicesSamples { * @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); + manager.workloadNetworks().listDnsServices("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -2333,8 +2474,7 @@ public final class WorkloadNetworksListDnsServicesSamples { */ public final class WorkloadNetworksListDnsZonesSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. @@ -2342,7 +2482,7 @@ public final class WorkloadNetworksListDnsZonesSamples { * @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); + manager.workloadNetworks().listDnsZones("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -2355,8 +2495,7 @@ public final class WorkloadNetworksListDnsZonesSamples { */ public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListGateways.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. @@ -2364,7 +2503,7 @@ public final class WorkloadNetworksListGatewaysSamples { * @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); + manager.workloadNetworks().listGateways("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -2377,8 +2516,7 @@ public final class WorkloadNetworksListGatewaysSamples { */ public final class WorkloadNetworksListPortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListPortMirroring.json */ /** * Sample code: WorkloadNetworks_ListPortMirroring. @@ -2386,21 +2524,20 @@ public final class WorkloadNetworksListPortMirroringSamples { * @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); + manager.workloadNetworks().listPortMirroring("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListPublicIPs +### WorkloadNetworks_ListPublicIps ```java /** - * Samples for WorkloadNetworks ListPublicIPs. + * Samples for WorkloadNetworks ListPublicIps. */ -public final class WorkloadNetworksListPublicIPsSamples { +public final class WorkloadNetworksListPublicIpsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListPublicIPs.json */ /** * Sample code: WorkloadNetworks_ListPublicIPs. @@ -2408,7 +2545,7 @@ public final class WorkloadNetworksListPublicIPsSamples { * @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); + manager.workloadNetworks().listPublicIps("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -2421,8 +2558,7 @@ public final class WorkloadNetworksListPublicIPsSamples { */ public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListSegments.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. @@ -2430,7 +2566,7 @@ public final class WorkloadNetworksListSegmentsSamples { * @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); + manager.workloadNetworks().listSegments("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -2443,8 +2579,7 @@ public final class WorkloadNetworksListSegmentsSamples { */ public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. @@ -2452,7 +2587,7 @@ public final class WorkloadNetworksListVMGroupsSamples { * @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); + manager.workloadNetworks().listVMGroups("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -2465,8 +2600,7 @@ public final class WorkloadNetworksListVMGroupsSamples { */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListVirtualMachines.json */ /** * Sample code: WorkloadNetworks_ListVirtualMachines. @@ -2474,38 +2608,7 @@ public final class WorkloadNetworksListVirtualMachinesSamples { * @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); - } -} -``` - -### WorkloadNetworks_UpdateDhcp - -```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; - -/** - * Samples for WorkloadNetworks UpdateDhcp. - */ -public final class WorkloadNetworksUpdateDhcpSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDhcp.json - */ - /** - * Sample code: WorkloadNetworks_UpdateDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDhcp resource = manager.workloadNetworks() - .getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties( - new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400L)) - .apply(); + manager.workloadNetworks().listVirtualMachines("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } ``` @@ -2522,8 +2625,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateDnsServiceSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDnsService.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdateDnsService.json */ /** * Sample code: WorkloadNetworks_UpdateDnsService. @@ -2532,7 +2634,7 @@ public final class WorkloadNetworksUpdateDnsServiceSamples { */ public static void workloadNetworksUpdateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkDnsService resource = manager.workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE) + .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsService1") @@ -2557,8 +2659,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateDnsZoneSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDnsZone.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdateDnsZone.json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. @@ -2567,7 +2668,7 @@ public final class WorkloadNetworksUpdateDnsZoneSamples { */ public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkDnsZone resource = manager.workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE) + .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsZone1") @@ -2591,8 +2692,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdatePortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdatePortMirroring.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. @@ -2601,7 +2701,7 @@ public final class WorkloadNetworksUpdatePortMirroringSamples { */ public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkPortMirroring resource = manager.workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) + .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) @@ -2623,8 +2723,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; */ public final class WorkloadNetworksUpdateSegmentSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdateSegments.json */ /** * Sample code: WorkloadNetworks_UpdateSegments. @@ -2633,7 +2732,7 @@ public final class WorkloadNetworksUpdateSegmentSamples { */ public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkSegment resource = manager.workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) + .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } @@ -2651,8 +2750,7 @@ import java.util.Arrays; */ public final class WorkloadNetworksUpdateVMGroupSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateVMGroup.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdateVMGroup.json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup. @@ -2661,7 +2759,7 @@ public final class WorkloadNetworksUpdateVMGroupSamples { */ public static void workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkVMGroup resource = manager.workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) + .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java index 802d660e62f90..085c3f9c42b63 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 @@ -23,10 +23,10 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.avs.fluent.AVSClient; +import com.azure.resourcemanager.avs.fluent.AvsClient; import com.azure.resourcemanager.avs.implementation.AddonsImpl; import com.azure.resourcemanager.avs.implementation.AuthorizationsImpl; -import com.azure.resourcemanager.avs.implementation.AVSClientBuilder; +import com.azure.resourcemanager.avs.implementation.AvsClientBuilder; import com.azure.resourcemanager.avs.implementation.CloudLinksImpl; import com.azure.resourcemanager.avs.implementation.ClustersImpl; import com.azure.resourcemanager.avs.implementation.DatastoresImpl; @@ -87,8 +87,6 @@ public final class AvsManager { private GlobalReachConnections globalReachConnections; - private WorkloadNetworks workloadNetworks; - private CloudLinks cloudLinks; private Addons addons; @@ -105,12 +103,14 @@ public final class AvsManager { private IscsiPaths iscsiPaths; - private final AVSClient clientObject; + private WorkloadNetworks workloadNetworks; + + private final AvsClient clientObject; private AvsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AVSClientBuilder().pipeline(httpPipeline) + this.clientObject = new AvsClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -412,20 +412,6 @@ public GlobalReachConnections globalReachConnections() { return globalReachConnections; } - /** - * Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkSegment, WorkloadNetworkDhcp, - * WorkloadNetworkPortMirroring, WorkloadNetworkVMGroup, WorkloadNetworkDnsService, WorkloadNetworkDnsZone, - * WorkloadNetworkPublicIp. - * - * @return Resource collection API of WorkloadNetworks. - */ - public WorkloadNetworks workloadNetworks() { - if (this.workloadNetworks == null) { - this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this); - } - return workloadNetworks; - } - /** * Gets the resource collection API of CloudLinks. It manages CloudLink. * @@ -511,7 +497,7 @@ public ScriptExecutions scriptExecutions() { } /** - * Gets the resource collection API of IscsiPaths. + * Gets the resource collection API of IscsiPaths. It manages IscsiPath. * * @return Resource collection API of IscsiPaths. */ @@ -523,12 +509,26 @@ public IscsiPaths iscsiPaths() { } /** - * Gets wrapped service client AVSClient providing direct access to the underlying auto-generated API + * Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkSegment, WorkloadNetworkDhcp, + * WorkloadNetworkPortMirroring, WorkloadNetworkVMGroup, WorkloadNetworkDnsService, WorkloadNetworkDnsZone, + * WorkloadNetworkPublicIp. + * + * @return Resource collection API of WorkloadNetworks. + */ + public WorkloadNetworks workloadNetworks() { + if (this.workloadNetworks == null) { + this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this); + } + return workloadNetworks; + } + + /** + * Gets wrapped service client AvsClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. * - * @return Wrapped service client AVSClient. + * @return Wrapped service client AvsClient. */ - public AVSClient serviceClient() { + public AvsClient serviceClient() { return this.clientObject; } } 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 6254043eef2c5..73c423f679dd0 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 @@ -8,9 +8,9 @@ import java.time.Duration; /** - * The interface for AVSClient class. + * The interface for AvsClient class. */ -public interface AVSClient { +public interface AvsClient { /** * Gets Server parameter. * @@ -102,13 +102,6 @@ public interface AVSClient { */ GlobalReachConnectionsClient getGlobalReachConnections(); - /** - * Gets the WorkloadNetworksClient object to access its operations. - * - * @return the WorkloadNetworksClient object. - */ - WorkloadNetworksClient getWorkloadNetworks(); - /** * Gets the CloudLinksClient object to access its operations. * @@ -164,4 +157,11 @@ public interface AVSClient { * @return the IscsiPathsClient object. */ IscsiPathsClient getIscsiPaths(); + + /** + * Gets the WorkloadNetworksClient object to access its operations. + * + * @return the WorkloadNetworksClient object. + */ + WorkloadNetworksClient getWorkloadNetworks(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java index d0e7c433ad7bb..b17dab94dbc97 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java @@ -50,6 +50,7 @@ PagedIterable listByPrivateCloud(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -57,26 +58,29 @@ PagedIterable listByPrivateCloud(String resourceGroupName, Strin * @return a IscsiPath along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName, + Context context); /** * Get a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath. */ @ServiceMethod(returns = ReturnType.SINGLE) - IscsiPathInner get(String resourceGroupName, String privateCloudName); + IscsiPathInner get(String resourceGroupName, String privateCloudName, String iscsiPathName); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @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. @@ -85,13 +89,14 @@ PagedIterable listByPrivateCloud(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, IscsiPathInner resource); + String privateCloudName, String iscsiPathName, IscsiPathInner resource); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,13 +106,14 @@ SyncPoller, IscsiPathInner> beginCreateOrUpdate(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, IscsiPathInner resource, Context context); + String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @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. @@ -115,13 +121,15 @@ SyncPoller, IscsiPathInner> beginCreateOrUpdate(Strin * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, + IscsiPathInner resource); /** * Create a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,27 +138,30 @@ SyncPoller, IscsiPathInner> beginCreateOrUpdate(Strin * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, - Context context); + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, + IscsiPathInner resource, Context context); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String iscsiPathName); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -158,30 +169,33 @@ IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String iscsiPathName, Context context); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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); + void delete(String resourceGroupName, String privateCloudName, String iscsiPathName); /** * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String privateCloudName, Context context); + void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java index 63068b0084e26..245f555ccf552 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 @@ -27,77 +27,83 @@ */ public interface WorkloadNetworksClient { /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkInner get(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkInner get(String resourceGroupName, String privateCloudName, String workloadNetworkName); /** * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSegments(String resourceGroupName, String privateCloudName); + PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -106,13 +112,14 @@ public interface WorkloadNetworksClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listSegments(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,13 +129,14 @@ PagedIterable listSegments(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, - String segmentId, Context context); + String workloadNetworkName, String segmentId, Context context); /** * Get a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -136,13 +144,15 @@ Response getSegmentWithResponse(String resourceGrou * @return a WorkloadNetworkSegment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId); + WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId); /** * Create a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +162,7 @@ Response getSegmentWithResponse(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( - String resourceGroupName, String privateCloudName, String segmentId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment); /** @@ -160,6 +170,7 @@ SyncPoller, WorkloadNetworkSegmentInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -170,7 +181,7 @@ SyncPoller, WorkloadNetworkSegmentInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( - String resourceGroupName, String privateCloudName, String segmentId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); /** @@ -178,6 +189,7 @@ SyncPoller, WorkloadNetworkSegmentInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -186,14 +198,15 @@ SyncPoller, WorkloadNetworkSegmentInner> * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); + WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment); /** * Create a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -203,14 +216,16 @@ WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String priva * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); + WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, + Context context); /** * Update a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,13 +235,15 @@ WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties); + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties); /** * Update a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -237,14 +254,15 @@ SyncPoller, WorkloadNetworkSegmentInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, - Context context); + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties, Context context); /** * Update a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -253,14 +271,15 @@ SyncPoller, WorkloadNetworkSegmentInner> * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner properties); + WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties); /** * Update a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -270,14 +289,15 @@ WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String priva * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, String segmentId, - WorkloadNetworkSegmentInner properties, Context context); + WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, Context context); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -286,13 +306,14 @@ WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String segmentId); + String workloadNetworkName, String segmentId); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -302,26 +323,28 @@ SyncPoller, Void> beginDeleteSegment(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String segmentId, Context context); + String workloadNetworkName, String segmentId, Context context); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); + void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -329,26 +352,30 @@ SyncPoller, Void> beginDeleteSegment(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); + void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + Context context); /** * List WorkloadNetworkDhcp resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDhcp(String resourceGroupName, String privateCloudName); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkDhcp resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -357,7 +384,7 @@ SyncPoller, Void> beginDeleteSegment(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkDhcp. @@ -394,6 +421,7 @@ Response getDhcpWithResponse(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -403,13 +431,15 @@ Response getDhcpWithResponse(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Create a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -420,13 +450,15 @@ SyncPoller, WorkloadNetworkDhcpInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Create a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -435,14 +467,15 @@ SyncPoller, WorkloadNetworkDhcpInner> begin * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp); + WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Create a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -452,14 +485,15 @@ WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateClou * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Update a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -469,13 +503,15 @@ WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateClou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Update a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -486,13 +522,15 @@ SyncPoller, WorkloadNetworkDhcpInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Update a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -501,14 +539,15 @@ SyncPoller, WorkloadNetworkDhcpInner> begin * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp); + WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); /** * Update a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -518,14 +557,15 @@ WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateClou * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); + WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -534,13 +574,14 @@ WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateClou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, - String dhcpId); + String workloadNetworkName, String dhcpId); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -549,27 +590,29 @@ SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, Str * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, - Context context); + SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, Context context); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); + void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -577,26 +620,30 @@ SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, Str * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); + void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + Context context); /** * List WorkloadNetworkGateway resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGateways(String resourceGroupName, String privateCloudName); + PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkGateway resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -605,13 +652,14 @@ SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listGateways(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkGateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -621,13 +669,14 @@ PagedIterable listGateways(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, - String gatewayId, Context context); + String workloadNetworkName, String gatewayId, Context context); /** * Get a WorkloadNetworkGateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -635,13 +684,15 @@ Response getGatewayWithResponse(String resourceGrou * @return a WorkloadNetworkGateway. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId); + WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId); /** * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -650,13 +701,14 @@ Response getGatewayWithResponse(String resourceGrou */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName); + String privateCloudName, String workloadNetworkName); /** * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -666,13 +718,14 @@ PagedIterable listPortMirroring(String resour */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName, Context context); + String privateCloudName, String workloadNetworkName, Context context); /** * Get a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -682,13 +735,14 @@ PagedIterable listPortMirroring(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) Response getPortMirroringWithResponse(String resourceGroupName, - String privateCloudName, String portMirroringId, Context context); + String privateCloudName, String workloadNetworkName, String portMirroringId, Context context); /** * Get a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -697,13 +751,14 @@ Response getPortMirroringWithResponse(String */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId); + String workloadNetworkName, String portMirroringId); /** * Create a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -713,14 +768,15 @@ WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Create a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -731,14 +787,15 @@ WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Create a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -748,13 +805,15 @@ WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Create a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -765,13 +824,15 @@ WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Update a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -781,14 +842,15 @@ WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Update a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -799,14 +861,15 @@ WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Update a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -816,13 +879,15 @@ WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** * Update a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -833,7 +898,8 @@ WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** * Delete a WorkloadNetworkPortMirroring. @@ -899,19 +965,22 @@ void deletePortMirroring(String resourceGroupName, String portMirroringId, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkVMGroup resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -920,13 +989,14 @@ void deletePortMirroring(String resourceGroupName, String portMirroringId, Strin */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -936,13 +1006,14 @@ PagedIterable listVMGroups(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, - String vmGroupId, Context context); + String workloadNetworkName, String vmGroupId, Context context); /** * Get a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -950,13 +1021,15 @@ Response getVMGroupWithResponse(String resourceGrou * @return a WorkloadNetworkVMGroup. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); + WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId); /** * Create a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -966,13 +1039,15 @@ Response getVMGroupWithResponse(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource); + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource); /** * Create a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -983,14 +1058,15 @@ SyncPoller, WorkloadNetworkVMGroupInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, - Context context); + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource, Context context); /** * Create a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -999,14 +1075,15 @@ SyncPoller, WorkloadNetworkVMGroupInner> * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner resource); + WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource); /** * Create a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -1016,14 +1093,15 @@ WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String priva * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner resource, Context context); + WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context); /** * Update a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1033,7 +1111,7 @@ WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, String privateCloudName, String vmGroupId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup); /** @@ -1041,6 +1119,7 @@ SyncPoller, WorkloadNetworkVMGroupInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -1051,7 +1130,7 @@ SyncPoller, WorkloadNetworkVMGroupInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, String privateCloudName, String vmGroupId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); /** @@ -1059,6 +1138,7 @@ SyncPoller, WorkloadNetworkVMGroupInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1067,14 +1147,15 @@ SyncPoller, WorkloadNetworkVMGroupInner> * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); + WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup); /** * Update a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -1084,8 +1165,9 @@ WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String priva * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); + WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + Context context); /** * Delete a WorkloadNetworkVMGroup. @@ -1150,6 +1232,7 @@ SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1158,13 +1241,14 @@ SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName); + String privateCloudName, String workloadNetworkName); /** * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1174,13 +1258,14 @@ PagedIterable listVirtualMachines(String res */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName, Context context); + String privateCloudName, String workloadNetworkName, Context context); /** * Get a WorkloadNetworkVirtualMachine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1190,13 +1275,14 @@ PagedIterable listVirtualMachines(String res */ @ServiceMethod(returns = ReturnType.SINGLE) Response getVirtualMachineWithResponse(String resourceGroupName, - String privateCloudName, String virtualMachineId, Context context); + String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context); /** * Get a WorkloadNetworkVirtualMachine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1205,13 +1291,14 @@ Response getVirtualMachineWithResponse(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, String privateCloudName, - String virtualMachineId); + String workloadNetworkName, String virtualMachineId); /** * List WorkloadNetworkDnsService resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1219,13 +1306,15 @@ WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, S * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkDnsService resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1235,13 +1324,14 @@ WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1251,13 +1341,14 @@ PagedIterable listDnsServices(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDnsServiceWithResponse(String resourceGroupName, - String privateCloudName, String dnsServiceId, Context context); + String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context); /** * Get a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1266,13 +1357,14 @@ Response getDnsServiceWithResponse(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId); + String workloadNetworkName, String dnsServiceId); /** * Create a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1282,7 +1374,7 @@ WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String pr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** @@ -1290,6 +1382,7 @@ SyncPoller, WorkloadNetworkDnsService * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -1300,7 +1393,7 @@ SyncPoller, WorkloadNetworkDnsService */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** @@ -1308,6 +1401,7 @@ SyncPoller, WorkloadNetworkDnsService * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1317,13 +1411,14 @@ SyncPoller, WorkloadNetworkDnsService */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** * Create a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -1334,13 +1429,15 @@ WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context); /** * Update a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1350,7 +1447,7 @@ WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** @@ -1358,6 +1455,7 @@ SyncPoller, WorkloadNetworkDnsService * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -1368,7 +1466,7 @@ SyncPoller, WorkloadNetworkDnsService */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** @@ -1376,6 +1474,7 @@ SyncPoller, WorkloadNetworkDnsService * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1385,13 +1484,14 @@ SyncPoller, WorkloadNetworkDnsService */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** * Update a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -1402,7 +1502,8 @@ WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context); /** * Delete a WorkloadNetworkDnsService. @@ -1467,19 +1568,22 @@ SyncPoller, Void> beginDeleteDnsService(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkDnsZone resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1488,13 +1592,14 @@ SyncPoller, Void> beginDeleteDnsService(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1504,13 +1609,14 @@ PagedIterable listDnsZones(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, - String dnsZoneId, Context context); + String workloadNetworkName, String dnsZoneId, Context context); /** * Get a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1518,13 +1624,15 @@ Response getDnsZoneWithResponse(String resourceGrou * @return a WorkloadNetworkDnsZone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); + WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId); /** * Create a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1534,7 +1642,7 @@ Response getDnsZoneWithResponse(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** @@ -1542,6 +1650,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -1552,7 +1661,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** @@ -1560,6 +1669,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1568,14 +1678,15 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** * Create a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -1585,14 +1696,16 @@ WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String priva * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); + WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context); /** * Update a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1602,7 +1715,7 @@ WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String priva */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** @@ -1610,6 +1723,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -1620,7 +1734,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** @@ -1628,6 +1742,7 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1636,14 +1751,15 @@ SyncPoller, WorkloadNetworkDnsZoneInner> * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** * Update a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -1653,8 +1769,9 @@ WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String priva * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); + WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context); /** * Delete a WorkloadNetworkDnsZone. @@ -1719,6 +1836,7 @@ SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1726,13 +1844,15 @@ SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); + PagedIterable listPublicIps(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkPublicIP resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1741,14 +1861,15 @@ SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - Context context); + PagedIterable listPublicIps(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1757,14 +1878,15 @@ PagedIterable listPublicIPs(String resourceGroupNa * @return a WorkloadNetworkPublicIP along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getPublicIPWithResponse(String resourceGroupName, String privateCloudName, - String publicIPId, Context context); + Response getPublicIpWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, Context context); /** * Get a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1772,13 +1894,15 @@ Response getPublicIPWithResponse(String resourceGr * @return a WorkloadNetworkPublicIP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String privateCloudName, String publicIPId); + WorkloadNetworkPublicIpInner getPublicIp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId); /** * Create a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1787,8 +1911,8 @@ Response getPublicIPWithResponse(String resourceGr * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( - String resourceGroupName, String privateCloudName, String publicIPId, + SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP); /** @@ -1796,6 +1920,7 @@ SyncPoller, WorkloadNetworkPublicIpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -1805,8 +1930,8 @@ SyncPoller, WorkloadNetworkPublicIpInne * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( - String resourceGroupName, String privateCloudName, String publicIPId, + SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); /** @@ -1814,6 +1939,7 @@ SyncPoller, WorkloadNetworkPublicIpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1822,14 +1948,15 @@ SyncPoller, WorkloadNetworkPublicIpInne * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP); + WorkloadNetworkPublicIpInner createPublicIp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP); /** * Create a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -1839,8 +1966,9 @@ WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String pri * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, String publicIPId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); + WorkloadNetworkPublicIpInner createPublicIp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, + Context context); /** * Delete a WorkloadNetworkPublicIP. @@ -1854,7 +1982,7 @@ WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String pri * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePublicIP(String resourceGroupName, String publicIPId, + SyncPoller, Void> beginDeletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName); /** @@ -1870,7 +1998,7 @@ SyncPoller, Void> beginDeletePublicIP(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePublicIP(String resourceGroupName, String publicIPId, + SyncPoller, Void> beginDeletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName, Context context); /** @@ -1884,7 +2012,7 @@ SyncPoller, Void> beginDeletePublicIP(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName); + void deletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName); /** * Delete a WorkloadNetworkPublicIP. @@ -1898,5 +2026,5 @@ SyncPoller, Void> beginDeletePublicIP(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName, Context context); + void deletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java index a75e9e49114fc..b10182fc28ac8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java @@ -29,9 +29,9 @@ public final class AddonInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class AddonInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of AddonInner class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java index 691492e5ea6ee..0e017ae37ee6b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java @@ -30,9 +30,9 @@ public final class CloudLinkInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class CloudLinkInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CloudLinkInner class. @@ -69,13 +69,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -89,13 +89,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java index 6bd673b741097..1c70541067564 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java @@ -37,9 +37,9 @@ public final class ClusterInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -47,9 +47,9 @@ public final class ClusterInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterInner class. @@ -96,13 +96,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -116,13 +116,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 4954826a9a398..f3f342abacd58 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 @@ -33,9 +33,9 @@ public final class DatastoreInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -43,9 +43,9 @@ public final class DatastoreInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DatastoreInner class. @@ -72,13 +72,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -92,13 +92,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java index caf334f972f5f..0bd4d8fd831cf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java @@ -29,9 +29,9 @@ public final class ExpressRouteAuthorizationInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class ExpressRouteAuthorizationInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ExpressRouteAuthorizationInner class. @@ -68,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -88,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java index ed222baefee14..bb9dd9b570e41 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java @@ -30,9 +30,9 @@ public final class GlobalReachConnectionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class GlobalReachConnectionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GlobalReachConnectionInner class. @@ -69,13 +69,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -89,13 +89,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java index b4fbdc678979d..983e7a7570c06 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java @@ -30,9 +30,9 @@ public final class HcxEnterpriseSiteInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class HcxEnterpriseSiteInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of HcxEnterpriseSiteInner class. @@ -69,13 +69,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -89,13 +89,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java index d2cac63467d77..2f1c23cd338fe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java @@ -29,9 +29,9 @@ public final class IscsiPathInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class IscsiPathInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of IscsiPathInner class. @@ -68,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -88,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java index 5583ff808096c..39f303d8b7a5a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java @@ -29,9 +29,9 @@ public final class PlacementPolicyInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class PlacementPolicyInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of PlacementPolicyInner class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 86694aaa6813a..9f58ec30a6826 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 @@ -53,9 +53,9 @@ public final class PrivateCloudInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -63,9 +63,9 @@ public final class PrivateCloudInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of PrivateCloudInner class. @@ -132,13 +132,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -152,13 +152,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -593,6 +593,10 @@ 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); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java index 59f17f2eed70b..dfa4dcbf88663 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java @@ -32,9 +32,9 @@ public final class ScriptCmdletInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -42,9 +42,9 @@ public final class ScriptCmdletInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ScriptCmdletInner class. @@ -71,13 +71,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -91,13 +91,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java index 5293cf0b63aac..b8ecb5114a775 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java @@ -34,9 +34,9 @@ public final class ScriptExecutionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -44,9 +44,9 @@ public final class ScriptExecutionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ScriptExecutionInner class. @@ -73,13 +73,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -93,13 +93,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java index 54f8cd2dbac62..8c28fd56d5606 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java @@ -29,9 +29,9 @@ public final class ScriptPackageInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class ScriptPackageInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ScriptPackageInner class. @@ -68,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -88,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 541dd0138869b..fe2e97bc6daf9 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 @@ -30,9 +30,9 @@ public final class VirtualMachineInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class VirtualMachineInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of VirtualMachineInner class. @@ -69,13 +69,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -89,13 +89,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java index 306524f570db5..8c43aace77e25 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java @@ -29,9 +29,9 @@ public final class WorkloadNetworkDhcpInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class WorkloadNetworkDhcpInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkDhcpInner class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java index 29942b1b1293e..23f2cef38a467 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java @@ -32,9 +32,9 @@ public final class WorkloadNetworkDnsServiceInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -42,9 +42,9 @@ public final class WorkloadNetworkDnsServiceInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkDnsServiceInner class. @@ -71,13 +71,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -91,13 +91,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java index 094e41ecaaa7b..b93022ad1b33a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java @@ -30,9 +30,9 @@ public final class WorkloadNetworkDnsZoneInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class WorkloadNetworkDnsZoneInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkDnsZoneInner class. @@ -69,13 +69,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -89,13 +89,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java index 86ed7d2016bb8..9f3f78dea7433 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java @@ -29,9 +29,9 @@ public final class WorkloadNetworkGatewayInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class WorkloadNetworkGatewayInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkGatewayInner class. @@ -68,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -88,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java index 133d024192e66..a78db495a5f03 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java @@ -29,9 +29,9 @@ public final class WorkloadNetworkInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class WorkloadNetworkInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkInner class. @@ -68,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -88,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java index ec3120a39abe3..f97cfbf6bef9b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java @@ -31,9 +31,9 @@ public final class WorkloadNetworkPortMirroringInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -41,9 +41,9 @@ public final class WorkloadNetworkPortMirroringInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkPortMirroringInner class. @@ -70,13 +70,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -90,13 +90,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java index 04a032f5346ed..afa4d42cc36c0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java @@ -29,9 +29,9 @@ public final class WorkloadNetworkPublicIpInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class WorkloadNetworkPublicIpInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkPublicIpInner class. @@ -68,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -88,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java index eb336f74ca5bc..ca41cd2fa325c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java @@ -33,9 +33,9 @@ public final class WorkloadNetworkSegmentInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -43,9 +43,9 @@ public final class WorkloadNetworkSegmentInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkSegmentInner class. @@ -72,13 +72,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -92,13 +92,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java index 1dbee8f62ca0c..e6a1780120f0c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java @@ -31,9 +31,9 @@ public final class WorkloadNetworkVMGroupInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -41,9 +41,9 @@ public final class WorkloadNetworkVMGroupInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkVMGroupInner class. @@ -70,13 +70,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -90,13 +90,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java index e0ebbeca78a5d..58c911905bc66 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java @@ -30,9 +30,9 @@ public final class WorkloadNetworkVirtualMachineInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class WorkloadNetworkVirtualMachineInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkloadNetworkVirtualMachineInner class. @@ -69,13 +69,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -89,13 +89,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java index 50c24fcd62c93..d98200df74cdf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java @@ -50,24 +50,24 @@ public final class AddonsClientImpl implements AddonsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of AddonsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AddonsClientImpl(AVSClientImpl client) { + AddonsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(AddonsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientAddons to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientAddons to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientAddons") + @ServiceInterface(name = "AvsClientAddons") public interface AddonsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java index 7ac85ce97d9eb..7259697452fb8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java @@ -50,25 +50,25 @@ public final class AuthorizationsClientImpl implements AuthorizationsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of AuthorizationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AuthorizationsClientImpl(AVSClientImpl client) { + AuthorizationsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(AuthorizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientAuthorizations to be used by the proxy service to perform + * The interface defining all the services for AvsClientAuthorizations to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientAuthorizati") + @ServiceInterface(name = "AvsClientAuthorizati") public interface AuthorizationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java index dd90210acdbd7..72c78a4af8432 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java @@ -15,10 +15,10 @@ import java.time.Duration; /** - * A builder for creating a new instance of the AVSClientImpl type. + * A builder for creating a new instance of the AvsClientImpl type. */ -@ServiceClientBuilder(serviceClients = { AVSClientImpl.class }) -public final class AVSClientBuilder { +@ServiceClientBuilder(serviceClients = { AvsClientImpl.class }) +public final class AvsClientBuilder { /* * Server parameter */ @@ -28,9 +28,9 @@ public final class AVSClientBuilder { * Sets Server parameter. * * @param endpoint the endpoint value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder endpoint(String endpoint) { + public AvsClientBuilder endpoint(String endpoint) { this.endpoint = endpoint; return this; } @@ -44,9 +44,9 @@ public AVSClientBuilder endpoint(String endpoint) { * Sets The ID of the target subscription. The value must be an UUID. * * @param subscriptionId the subscriptionId value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder subscriptionId(String subscriptionId) { + public AvsClientBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public AVSClientBuilder subscriptionId(String subscriptionId) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder environment(AzureEnvironment environment) { + public AvsClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public AVSClientBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder pipeline(HttpPipeline pipeline) { + public AvsClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public AVSClientBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public AvsClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public AVSClientBuilder defaultPollInterval(Duration defaultPollInterval) { * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AVSClientBuilder. + * @return the AvsClientBuilder. */ - public AVSClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public AvsClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AVSClientImpl with the provided parameters. + * Builds an instance of AvsClientImpl with the provided parameters. * - * @return an instance of AVSClientImpl. + * @return an instance of AvsClientImpl. */ - public AVSClientImpl buildClient() { + public AvsClientImpl buildClient() { AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) ? pipeline @@ -130,7 +130,7 @@ public AVSClientImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - AVSClientImpl client = new AVSClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, + AvsClientImpl client = new AvsClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.endpoint, this.subscriptionId); return client; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index 8faa7ed8428ac..ddbc989cf2536 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java @@ -25,7 +25,7 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.avs.fluent.AddonsClient; import com.azure.resourcemanager.avs.fluent.AuthorizationsClient; -import com.azure.resourcemanager.avs.fluent.AVSClient; +import com.azure.resourcemanager.avs.fluent.AvsClient; import com.azure.resourcemanager.avs.fluent.CloudLinksClient; import com.azure.resourcemanager.avs.fluent.ClustersClient; import com.azure.resourcemanager.avs.fluent.DatastoresClient; @@ -51,10 +51,10 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the AVSClientImpl type. + * Initializes a new instance of the AvsClientImpl type. */ -@ServiceClient(builder = AVSClientBuilder.class) -public final class AVSClientImpl implements AVSClient { +@ServiceClient(builder = AvsClientBuilder.class) +public final class AvsClientImpl implements AvsClient { /** * Server parameter. */ @@ -251,20 +251,6 @@ public GlobalReachConnectionsClient getGlobalReachConnections() { return this.globalReachConnections; } - /** - * The WorkloadNetworksClient object to access its operations. - */ - private final WorkloadNetworksClient workloadNetworks; - - /** - * Gets the WorkloadNetworksClient object to access its operations. - * - * @return the WorkloadNetworksClient object. - */ - public WorkloadNetworksClient getWorkloadNetworks() { - return this.workloadNetworks; - } - /** * The CloudLinksClient object to access its operations. */ @@ -378,7 +364,21 @@ public IscsiPathsClient getIscsiPaths() { } /** - * Initializes an instance of AVSClient client. + * The WorkloadNetworksClient object to access its operations. + */ + private final WorkloadNetworksClient workloadNetworks; + + /** + * Gets the WorkloadNetworksClient object to access its operations. + * + * @return the WorkloadNetworksClient object. + */ + public WorkloadNetworksClient getWorkloadNetworks() { + return this.workloadNetworks; + } + + /** + * Initializes an instance of AvsClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. @@ -387,7 +387,7 @@ public IscsiPathsClient getIscsiPaths() { * @param endpoint Server parameter. * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ - AVSClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AvsClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; @@ -403,7 +403,6 @@ public IscsiPathsClient getIscsiPaths() { this.hcxEnterpriseSites = new HcxEnterpriseSitesClientImpl(this); this.authorizations = new AuthorizationsClientImpl(this); this.globalReachConnections = new GlobalReachConnectionsClientImpl(this); - this.workloadNetworks = new WorkloadNetworksClientImpl(this); this.cloudLinks = new CloudLinksClientImpl(this); this.addons = new AddonsClientImpl(this); this.virtualMachines = new VirtualMachinesClientImpl(this); @@ -412,6 +411,7 @@ public IscsiPathsClient getIscsiPaths() { this.scriptCmdlets = new ScriptCmdletsClientImpl(this); this.scriptExecutions = new ScriptExecutionsClientImpl(this); this.iscsiPaths = new IscsiPathsClientImpl(this); + this.workloadNetworks = new WorkloadNetworksClientImpl(this); } /** @@ -540,5 +540,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AVSClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AvsClientImpl.class); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java index 2b3346d1d5a03..ac2f1aa325ddc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java @@ -50,25 +50,25 @@ public final class CloudLinksClientImpl implements CloudLinksClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of CloudLinksClientImpl. * * @param client the instance of the service client containing this operation class. */ - CloudLinksClientImpl(AVSClientImpl client) { + CloudLinksClientImpl(AvsClientImpl client) { this.service = RestProxy.create(CloudLinksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientCloudLinks to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientCloudLinks to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientCloudLinks") + @ServiceInterface(name = "AvsClientCloudLinks") public interface CloudLinksService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java index ed04ac2edac22..ea0b217f38684 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java @@ -54,24 +54,24 @@ public final class ClustersClientImpl implements ClustersClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of ClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ClustersClientImpl(AVSClientImpl client) { + ClustersClientImpl(AvsClientImpl client) { this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientClusters to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientClusters to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientClusters") + @ServiceInterface(name = "AvsClientClusters") public interface ClustersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java index b4196f569da6c..038bf652471ac 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java @@ -50,25 +50,25 @@ public final class DatastoresClientImpl implements DatastoresClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of DatastoresClientImpl. * * @param client the instance of the service client containing this operation class. */ - DatastoresClientImpl(AVSClientImpl client) { + DatastoresClientImpl(AvsClientImpl client) { this.service = RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientDatastores to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientDatastores to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientDatastores") + @ServiceInterface(name = "AvsClientDatastores") public interface DatastoresService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java index a50f08efcb3d0..b2887e4e68ea2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java @@ -50,25 +50,25 @@ public final class GlobalReachConnectionsClientImpl implements GlobalReachConnec /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of GlobalReachConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - GlobalReachConnectionsClientImpl(AVSClientImpl client) { + GlobalReachConnectionsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(GlobalReachConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientGlobalReachConnections to be used by the proxy service to + * The interface defining all the services for AvsClientGlobalReachConnections to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientGlobalReach") + @ServiceInterface(name = "AvsClientGlobalReach") public interface GlobalReachConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java index 3a7f65078d846..a81c54343cb32 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java @@ -45,25 +45,25 @@ public final class HcxEnterpriseSitesClientImpl implements HcxEnterpriseSitesCli /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of HcxEnterpriseSitesClientImpl. * * @param client the instance of the service client containing this operation class. */ - HcxEnterpriseSitesClientImpl(AVSClientImpl client) { + HcxEnterpriseSitesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(HcxEnterpriseSitesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientHcxEnterpriseSites to be used by the proxy service to + * The interface defining all the services for AvsClientHcxEnterpriseSites to be used by the proxy service to * perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientHcxEnterpri") + @ServiceInterface(name = "AvsClientHcxEnterpri") public interface HcxEnterpriseSitesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java index feb385954029b..822cf3e4851fb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java @@ -5,20 +5,16 @@ 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.IscsiPathInner; import com.azure.resourcemanager.avs.models.IscsiPath; import com.azure.resourcemanager.avs.models.IscsiPathProvisioningState; -public final class IscsiPathImpl implements IscsiPath { +public final class IscsiPathImpl implements IscsiPath, IscsiPath.Definition, IscsiPath.Update { private IscsiPathInner innerObject; private final com.azure.resourcemanager.avs.AvsManager serviceManager; - IscsiPathImpl(IscsiPathInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - public String id() { return this.innerModel().id(); } @@ -43,6 +39,10 @@ public String networkBlock() { return this.innerModel().networkBlock(); } + public String resourceGroupName() { + return resourceGroupName; + } + public IscsiPathInner innerModel() { return this.innerObject; } @@ -50,4 +50,83 @@ public IscsiPathInner innerModel() { private com.azure.resourcemanager.avs.AvsManager manager() { return this.serviceManager; } + + private String resourceGroupName; + + private String privateCloudName; + + private String iscsiPathName; + + public IscsiPathImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + this.resourceGroupName = resourceGroupName; + this.privateCloudName = privateCloudName; + return this; + } + + public IscsiPath create() { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), Context.NONE); + return this; + } + + public IscsiPath create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), context); + return this; + } + + IscsiPathImpl(String name, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = new IscsiPathInner(); + this.serviceManager = serviceManager; + this.iscsiPathName = name; + } + + public IscsiPathImpl update() { + return this; + } + + public IscsiPath apply() { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), Context.NONE); + return this; + } + + public IscsiPath apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .createOrUpdate(resourceGroupName, privateCloudName, iscsiPathName, this.innerModel(), context); + return this; + } + + IscsiPathImpl(IscsiPathInner 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.iscsiPathName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "iscsiPaths"); + } + + public IscsiPath refresh() { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE) + .getValue(); + return this; + } + + public IscsiPath refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getIscsiPaths() + .getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, context) + .getValue(); + return this; + } + + public IscsiPathImpl withNetworkBlock(String networkBlock) { + this.innerModel().withNetworkBlock(networkBlock); + return this; + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java index 9e369d91d0d55..9ee79639c73fa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java @@ -50,25 +50,25 @@ public final class IscsiPathsClientImpl implements IscsiPathsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of IscsiPathsClientImpl. * * @param client the instance of the service client containing this operation class. */ - IscsiPathsClientImpl(AVSClientImpl client) { + IscsiPathsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(IscsiPathsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientIscsiPaths to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientIscsiPaths to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientIscsiPaths") + @ServiceInterface(name = "AvsClientIscsiPaths") public interface IscsiPathsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths") @@ -81,34 +81,35 @@ Mono> listByPrivateCloud(@HostParam("endpoint") St Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get(@HostParam("endpoint") 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); + @PathParam("privateCloudName") String privateCloudName, @PathParam("iscsiPathName") String iscsiPathName, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, - @BodyParam("application/json") IscsiPathInner resource, Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("iscsiPathName") String iscsiPathName, + @HeaderParam("accept") String accept, @BodyParam("application/json") IscsiPathInner resource, + Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/{iscsiPathName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("endpoint") 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); + @PathParam("privateCloudName") String privateCloudName, @PathParam("iscsiPathName") String iscsiPathName, + @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -269,13 +270,15 @@ public PagedIterable listByPrivateCloud(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String iscsiPathName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -292,10 +295,13 @@ private Mono> getWithResponseAsync(String resourceGroup return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -304,6 +310,7 @@ private Mono> getWithResponseAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -312,7 +319,7 @@ private Mono> getWithResponseAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, - Context context) { + String iscsiPathName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -329,10 +336,13 @@ private Mono> getWithResponseAsync(String resourceGroup return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context); + resourceGroupName, privateCloudName, iscsiPathName, accept, context); } /** @@ -340,14 +350,15 @@ private Mono> getWithResponseAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName) { - return getWithResponseAsync(resourceGroupName, privateCloudName) + private Mono getAsync(String resourceGroupName, String privateCloudName, String iscsiPathName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -356,6 +367,7 @@ private Mono getAsync(String resourceGroupName, String privateCl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -364,8 +376,8 @@ private Mono getAsync(String resourceGroupName, String privateCl */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String privateCloudName, - Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, context).block(); + String iscsiPathName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, context).block(); } /** @@ -373,14 +385,15 @@ public Response getWithResponse(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IscsiPathInner get(String resourceGroupName, String privateCloudName) { - return getWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); + public IscsiPathInner get(String resourceGroupName, String privateCloudName, String iscsiPathName) { + return getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE).getValue(); } /** @@ -388,6 +401,7 @@ public IscsiPathInner get(String resourceGroupName, String privateCloudName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -396,7 +410,7 @@ public IscsiPathInner get(String resourceGroupName, String privateCloudName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String privateCloudName, IscsiPathInner resource) { + String privateCloudName, String iscsiPathName, IscsiPathInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -413,6 +427,9 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } if (resource == null) { return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { @@ -421,7 +438,8 @@ private Mono>> createOrUpdateWithResponseAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, resource, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, resource, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -430,6 +448,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -439,7 +458,7 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String privateCloudName, IscsiPathInner resource, Context context) { + String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -456,6 +475,9 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } if (resource == null) { return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { @@ -464,7 +486,8 @@ private Mono>> createOrUpdateWithResponseAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, resource, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, resource, + context); } /** @@ -472,6 +495,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -480,9 +504,9 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiPathInner> beginCreateOrUpdateAsync(String resourceGroupName, - String privateCloudName, IscsiPathInner resource) { + String privateCloudName, String iscsiPathName, IscsiPathInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, resource); + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), IscsiPathInner.class, IscsiPathInner.class, this.client.getContext()); } @@ -492,6 +516,7 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -501,10 +526,10 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IscsiPathInner> beginCreateOrUpdateAsync(String resourceGroupName, - String privateCloudName, IscsiPathInner resource, Context context) { + String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context) { context = this.client.mergeContext(context); Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, resource, context); + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), IscsiPathInner.class, IscsiPathInner.class, context); } @@ -514,6 +539,7 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -522,8 +548,9 @@ private PollerFlux, IscsiPathInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, IscsiPathInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource).getSyncPoller(); + String privateCloudName, String iscsiPathName, IscsiPathInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource) + .getSyncPoller(); } /** @@ -531,6 +558,7 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -540,8 +568,9 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, - String privateCloudName, IscsiPathInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).getSyncPoller(); + String privateCloudName, String iscsiPathName, IscsiPathInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context) + .getSyncPoller(); } /** @@ -549,6 +578,7 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -557,8 +587,8 @@ public SyncPoller, IscsiPathInner> beginCreateOrUpdat */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, - IscsiPathInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource).last() + String iscsiPathName, IscsiPathInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -567,6 +597,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -576,8 +607,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, - IscsiPathInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).last() + String iscsiPathName, IscsiPathInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -586,6 +617,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -593,8 +625,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource) { - return createOrUpdateAsync(resourceGroupName, privateCloudName, resource).block(); + public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, + IscsiPathInner resource) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource).block(); } /** @@ -602,6 +635,7 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -610,9 +644,9 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo * @return an iSCSI path resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, - Context context) { - return createOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).block(); + public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, String iscsiPathName, + IscsiPathInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, iscsiPathName, resource, context).block(); } /** @@ -620,14 +654,15 @@ public IscsiPathInner createOrUpdate(String resourceGroupName, String privateClo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String iscsiPathName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -644,10 +679,13 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, iscsiPathName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -656,6 +694,7 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -664,7 +703,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, - Context context) { + String iscsiPathName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -681,10 +720,13 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (iscsiPathName == null) { + return Mono.error(new IllegalArgumentException("Parameter iscsiPathName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context); + resourceGroupName, privateCloudName, iscsiPathName, accept, context); } /** @@ -692,14 +734,17 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String iscsiPathName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -709,6 +754,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -717,9 +763,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, - Context context) { + String iscsiPathName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, iscsiPathName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -729,14 +776,16 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String iscsiPathName) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName).getSyncPoller(); } /** @@ -744,6 +793,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -752,8 +802,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); + String iscsiPathName, Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName, context).getSyncPoller(); } /** @@ -761,14 +811,15 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateCloudName) { - return beginDeleteAsync(resourceGroupName, privateCloudName).last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String iscsiPathName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -777,6 +828,7 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -784,8 +836,9 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String privateCloudName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, context).last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String iscsiPathName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, iscsiPathName, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -794,13 +847,14 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateCloudName) { - deleteAsync(resourceGroupName, privateCloudName).block(); + public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName) { + deleteAsync(resourceGroupName, privateCloudName, iscsiPathName).block(); } /** @@ -808,14 +862,15 @@ public void delete(String resourceGroupName, String privateCloudName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String privateCloudName, Context context) { - deleteAsync(resourceGroupName, privateCloudName, context).block(); + public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context) { + deleteAsync(resourceGroupName, privateCloudName, iscsiPathName, context).block(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java index 09bdc6a51539d..4ea5e6c7b4b61 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java @@ -39,9 +39,10 @@ public PagedIterable listByPrivateCloud(String resourceGroupName, Str return ResourceManagerUtils.mapPage(inner, inner1 -> new IscsiPathImpl(inner1, this.manager())); } - public Response getWithResponse(String resourceGroupName, String privateCloudName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName, + Context context) { Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, context); + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new IscsiPathImpl(inner.getValue(), this.manager())); @@ -50,8 +51,8 @@ public Response getWithResponse(String resourceGroupName, String priv } } - public IscsiPath get(String resourceGroupName, String privateCloudName) { - IscsiPathInner inner = this.serviceClient().get(resourceGroupName, privateCloudName); + public IscsiPath get(String resourceGroupName, String privateCloudName, String iscsiPathName) { + IscsiPathInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, iscsiPathName); if (inner != null) { return new IscsiPathImpl(inner, this.manager()); } else { @@ -59,32 +60,88 @@ public IscsiPath get(String resourceGroupName, String privateCloudName) { } } - public IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource) { - IscsiPathInner inner = this.serviceClient().createOrUpdate(resourceGroupName, privateCloudName, resource); - if (inner != null) { - return new IscsiPathImpl(inner, this.manager()); - } else { - return null; + public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName) { + this.serviceClient().delete(resourceGroupName, privateCloudName, iscsiPathName); + } + + public void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context) { + this.serviceClient().delete(resourceGroupName, privateCloudName, iscsiPathName, context); + } + + public IscsiPath 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); + if (iscsiPathName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE).getValue(); } - public IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, - Context context) { - IscsiPathInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, privateCloudName, resource, context); - if (inner != null) { - return new IscsiPathImpl(inner, this.manager()); - } else { - return null; + public 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); + if (iscsiPathName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, iscsiPathName, context); } - public void deleteByResourceGroup(String resourceGroupName, String privateCloudName) { - this.serviceClient().delete(resourceGroupName, privateCloudName); + 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); + if (iscsiPathName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + } + this.delete(resourceGroupName, privateCloudName, iscsiPathName, Context.NONE); } - public void delete(String resourceGroupName, String privateCloudName, Context context) { - this.serviceClient().delete(resourceGroupName, privateCloudName, context); + 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 iscsiPathName = ResourceManagerUtils.getValueFromIdByName(id, "iscsiPaths"); + if (iscsiPathName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'iscsiPaths'.", id))); + } + this.delete(resourceGroupName, privateCloudName, iscsiPathName, context); } private IscsiPathsClient serviceClient() { @@ -94,4 +151,8 @@ private IscsiPathsClient serviceClient() { private com.azure.resourcemanager.avs.AvsManager manager() { return this.serviceManager; } + + public IscsiPathImpl define(String name) { + return new IscsiPathImpl(name, this.manager()); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java index 28f575fd53fde..7492fa79aaf55 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java @@ -40,25 +40,25 @@ public final class LocationsClientImpl implements LocationsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of LocationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LocationsClientImpl(AVSClientImpl client) { + LocationsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientLocations to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientLocations to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientLocations") + @ServiceInterface(name = "AvsClientLocations") public interface LocationsService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java index c2f18313f3fea..c48bdb504b5f3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java @@ -42,25 +42,25 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AVSClientImpl client) { + OperationsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientOperations to be used by the proxy service to perform REST + * The interface defining all the services for AvsClientOperations to be used by the proxy service to perform REST * calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientOperations") + @ServiceInterface(name = "AvsClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AVS/operations") 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 df7b4ef14bb39..8518d9a16dc01 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 @@ -52,25 +52,25 @@ public final class PlacementPoliciesClientImpl implements PlacementPoliciesClien /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of PlacementPoliciesClientImpl. * * @param client the instance of the service client containing this operation class. */ - PlacementPoliciesClientImpl(AVSClientImpl client) { + PlacementPoliciesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(PlacementPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientPlacementPolicies to be used by the proxy service to perform + * The interface defining all the services for AvsClientPlacementPolicies to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientPlacementPo") + @ServiceInterface(name = "AvsClientPlacementPo") public interface PlacementPoliciesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies") 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 4b4c2e01fd346..436c9285d38d5 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 @@ -54,25 +54,25 @@ public final class PrivateCloudsClientImpl implements PrivateCloudsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of PrivateCloudsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateCloudsClientImpl(AVSClientImpl client) { + PrivateCloudsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(PrivateCloudsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientPrivateClouds to be used by the proxy service to perform + * The interface defining all the services for AvsClientPrivateClouds to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientPrivateClou") + @ServiceInterface(name = "AvsClientPrivateClou") public interface PrivateCloudsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java index e62ed3d40d743..1b612936bcf0a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java @@ -42,25 +42,25 @@ public final class ScriptCmdletsClientImpl implements ScriptCmdletsClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of ScriptCmdletsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ScriptCmdletsClientImpl(AVSClientImpl client) { + ScriptCmdletsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(ScriptCmdletsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientScriptCmdlets to be used by the proxy service to perform + * The interface defining all the services for AvsClientScriptCmdlets to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientScriptCmdle") + @ServiceInterface(name = "AvsClientScriptCmdle") public interface ScriptCmdletsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java index 09dc22e925027..7ebf69bdc28e3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java @@ -53,25 +53,25 @@ public final class ScriptExecutionsClientImpl implements ScriptExecutionsClient /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of ScriptExecutionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ScriptExecutionsClientImpl(AVSClientImpl client) { + ScriptExecutionsClientImpl(AvsClientImpl client) { this.service = RestProxy.create(ScriptExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientScriptExecutions to be used by the proxy service to perform + * The interface defining all the services for AvsClientScriptExecutions to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientScriptExecu") + @ServiceInterface(name = "AvsClientScriptExecu") public interface ScriptExecutionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java index 7c5d8b6bfcf72..6f7196cadc8ee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java @@ -42,25 +42,25 @@ public final class ScriptPackagesClientImpl implements ScriptPackagesClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of ScriptPackagesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ScriptPackagesClientImpl(AVSClientImpl client) { + ScriptPackagesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(ScriptPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientScriptPackages to be used by the proxy service to perform + * The interface defining all the services for AvsClientScriptPackages to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientScriptPacka") + @ServiceInterface(name = "AvsClientScriptPacka") public interface ScriptPackagesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages") 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 6f6ba090acab2..e66ab15ab59f0 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 @@ -50,25 +50,25 @@ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of VirtualMachinesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualMachinesClientImpl(AVSClientImpl client) { + VirtualMachinesClientImpl(AvsClientImpl client) { this.service = RestProxy.create(VirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientVirtualMachines to be used by the proxy service to perform + * The interface defining all the services for AvsClientVirtualMachines to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientVirtualMach") + @ServiceInterface(name = "AvsClientVirtualMach") public interface VirtualMachinesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines") diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java index 925014918166a..bd50b77cd1ce3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java @@ -52,25 +52,30 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String dhcpId; - public WorkloadNetworkDhcpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkDhcpImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkDhcp create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); + .createDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDhcp create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); + .createDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), context); return this; } @@ -87,14 +92,15 @@ public WorkloadNetworkDhcpImpl update() { public WorkloadNetworkDhcp apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); + .updateDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDhcp apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); + .updateDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, this.innerModel(), context); return this; } @@ -104,25 +110,10 @@ public WorkloadNetworkDhcp apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.dhcpId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dhcpConfigurations"); } - public WorkloadNetworkDhcp refresh() { - this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworks() - .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE) - .getValue(); - return this; - } - - public WorkloadNetworkDhcp refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getWorkloadNetworks() - .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context) - .getValue(); - return this; - } - public WorkloadNetworkDhcpImpl withProperties(WorkloadNetworkDhcpEntity properties) { this.innerModel().withProperties(properties); return this; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java index 9bf2e56e5390c..0ed5214d08bdb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java @@ -89,25 +89,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String dnsServiceId; - public WorkloadNetworkDnsServiceImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkDnsServiceImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkDnsService create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); + .createDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDnsService create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); + .createDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), + context); return this; } @@ -124,14 +130,16 @@ public WorkloadNetworkDnsServiceImpl update() { public WorkloadNetworkDnsService apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); + .updateDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDnsService apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); + .updateDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, this.innerModel(), + context); return this; } @@ -141,13 +149,15 @@ public WorkloadNetworkDnsService apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.dnsServiceId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsServices"); } public WorkloadNetworkDnsService refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + Context.NONE) .getValue(); return this; } @@ -155,7 +165,7 @@ public WorkloadNetworkDnsService refresh() { public WorkloadNetworkDnsService refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context) + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java index d645a8af6328d..68163d3050111 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java @@ -88,25 +88,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String dnsZoneId; - public WorkloadNetworkDnsZoneImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkDnsZoneImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkDnsZone create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); + .createDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDnsZone create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); + .createDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), + context); return this; } @@ -123,14 +129,16 @@ public WorkloadNetworkDnsZoneImpl update() { public WorkloadNetworkDnsZone apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); + .updateDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkDnsZone apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); + .updateDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, this.innerModel(), + context); return this; } @@ -140,13 +148,14 @@ public WorkloadNetworkDnsZone apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.dnsZoneId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsZones"); } public WorkloadNetworkDnsZone refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE) + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, Context.NONE) .getValue(); return this; } @@ -154,7 +163,7 @@ public WorkloadNetworkDnsZone refresh() { public WorkloadNetworkDnsZone refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context) + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java index a3a8b7c97becc..b4b785887b02a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java @@ -78,26 +78,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String portMirroringId; - public WorkloadNetworkPortMirroringImpl withExistingPrivateCloud(String resourceGroupName, - String privateCloudName) { + public WorkloadNetworkPortMirroringImpl withExistingWorkloadNetwork(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkPortMirroring create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createPortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); + .createPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPortMirroring create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createPortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); + .createPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + this.innerModel(), context); return this; } @@ -114,14 +119,16 @@ public WorkloadNetworkPortMirroringImpl update() { public WorkloadNetworkPortMirroring apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updatePortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); + .updatePortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPortMirroring apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updatePortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); + .updatePortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + this.innerModel(), context); return this; } @@ -131,13 +138,15 @@ public WorkloadNetworkPortMirroring apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.portMirroringId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "portMirroringProfiles"); } public WorkloadNetworkPortMirroring refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + Context.NONE) .getValue(); return this; } @@ -145,7 +154,8 @@ public WorkloadNetworkPortMirroring refresh() { public WorkloadNetworkPortMirroring refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context) + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java index fbd68133928ab..5427d74470341 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java @@ -65,25 +65,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String publicIPId; - public WorkloadNetworkPublicIpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkPublicIpImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkPublicIp create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createPublicIP(resourceGroupName, privateCloudName, publicIPId, this.innerModel(), Context.NONE); + .createPublicIp(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkPublicIp create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createPublicIP(resourceGroupName, privateCloudName, publicIPId, this.innerModel(), context); + .createPublicIp(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, this.innerModel(), + context); return this; } @@ -96,7 +102,7 @@ public WorkloadNetworkPublicIp create(Context context) { public WorkloadNetworkPublicIp refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE) + .getPublicIpWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, Context.NONE) .getValue(); return this; } @@ -104,7 +110,7 @@ public WorkloadNetworkPublicIp refresh() { public WorkloadNetworkPublicIp refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, context) + .getPublicIpWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java index dc7abea2fa511..bc4b4883f6607 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java @@ -86,25 +86,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String segmentId; - public WorkloadNetworkSegmentImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkSegmentImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkSegment create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createSegment(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); + .createSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkSegment create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createSegment(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); + .createSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), + context); return this; } @@ -121,14 +127,16 @@ public WorkloadNetworkSegmentImpl update() { public WorkloadNetworkSegment apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateSegment(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); + .updateSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkSegment apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateSegment(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); + .updateSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, this.innerModel(), + context); return this; } @@ -138,13 +146,14 @@ public WorkloadNetworkSegment apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.segmentId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "segments"); } public WorkloadNetworkSegment refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE) + .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE) .getValue(); return this; } @@ -152,7 +161,7 @@ public WorkloadNetworkSegment refresh() { public WorkloadNetworkSegment refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context) + .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) .getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java index d91f01e0480c4..ab9f001dd137c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java @@ -76,25 +76,31 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String privateCloudName; + private String workloadNetworkName; + private String vmGroupId; - public WorkloadNetworkVMGroupImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + public WorkloadNetworkVMGroupImpl withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; + this.workloadNetworkName = workloadNetworkName; return this; } public WorkloadNetworkVMGroup create() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); + .createVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkVMGroup create(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .createVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); + .createVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), + context); return this; } @@ -111,14 +117,16 @@ public WorkloadNetworkVMGroupImpl update() { public WorkloadNetworkVMGroup apply() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); + .updateVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), + Context.NONE); return this; } public WorkloadNetworkVMGroup apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .updateVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); + .updateVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, this.innerModel(), + context); return this; } @@ -128,13 +136,14 @@ public WorkloadNetworkVMGroup apply(Context context) { this.serviceManager = serviceManager; this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workloadNetworks"); this.vmGroupId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vmGroups"); } public WorkloadNetworkVMGroup refresh() { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE) + .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, Context.NONE) .getValue(); return this; } @@ -142,7 +151,7 @@ public WorkloadNetworkVMGroup refresh() { public WorkloadNetworkVMGroup refresh(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkloadNetworks() - .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context) + .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, context) .getValue(); return this; } 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 6eac66261ea2c..a1616ab280be8 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 @@ -69,106 +69,113 @@ public final class WorkloadNetworksClientImpl implements WorkloadNetworksClient /** * The service client containing this operation class. */ - private final AVSClientImpl client; + private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworksClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkloadNetworksClientImpl(AVSClientImpl client) { + WorkloadNetworksClientImpl(AvsClientImpl client) { this.service = RestProxy.create(WorkloadNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AVSClientWorkloadNetworks to be used by the proxy service to perform + * The interface defining all the services for AvsClientWorkloadNetworks to be used by the proxy service to perform * REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AVSClientWorkloadNet") + @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworksService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("endpoint") 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}/workloadNetworks") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSegments(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getSegment(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createSegment(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateSegment(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkSegmentInner properties, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/segments/{segmentId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteSegment(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("segmentId") String segmentId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDhcp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -182,98 +189,107 @@ Mono> getDhcp(@HostParam("endpoint") String e Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createDhcp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dhcpId") String dhcpId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateDhcp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dhcpId") String dhcpId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dhcpConfigurations/{dhcpId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> deleteDhcp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dhcpId") String dhcpId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/gateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listGateways(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/gateways/{gatewayId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getGateway(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("gatewayId") String gatewayId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("gatewayId") String gatewayId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listPortMirroring(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getPortMirroring(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createPortMirroring(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/portMirroringProfiles/{portMirroringId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updatePortMirroring(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("portMirroringId") String portMirroringId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); @@ -290,44 +306,48 @@ Mono>> deletePortMirroring(@HostParam("endpoint") Stri Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listVMGroups(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getVMGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("vmGroupId") String vmGroupId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createVMGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("vmGroupId") String vmGroupId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkVMGroupInner resource, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/vmGroups/{vmGroupId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateVMGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("vmGroupId") String vmGroupId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); @@ -342,66 +362,72 @@ Mono>> deleteVMGroup(@HostParam("endpoint") String end Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/virtualMachines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listVirtualMachines(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/virtualMachines/{virtualMachineId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getVirtualMachine(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("virtualMachineId") String virtualMachineId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDnsServices(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDnsService(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, - @HeaderParam("accept") String accept, Context context); + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createDnsService(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, - @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsServices/{dnsServiceId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateDnsService(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, - @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, + @PathParam("dnsServiceId") String dnsServiceId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); @Headers({ "Content-Type: application/json" }) @@ -415,44 +441,48 @@ Mono>> deleteDnsService(@HostParam("endpoint") String Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDnsZones(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDnsZone(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dnsZoneId") String dnsZoneId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createDnsZone(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dnsZoneId") String dnsZoneId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/dnsZones/{dnsZoneId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateDnsZone(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("dnsZoneId") String dnsZoneId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); @@ -467,33 +497,36 @@ Mono>> deleteDnsZone(@HostParam("endpoint") String end Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPublicIPs(@HostParam("endpoint") String endpoint, + Mono> listPublicIps(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs/{publicIPId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPublicIP(@HostParam("endpoint") String endpoint, + Mono> getPublicIp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIPId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("publicIPId") String publicIPId, @HeaderParam("accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}/publicIPs/{publicIPId}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createPublicIP(@HostParam("endpoint") String endpoint, + Mono>> createPublicIp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIPId, + @PathParam("privateCloudName") String privateCloudName, + @PathParam("workloadNetworkName") String workloadNetworkName, @PathParam("publicIPId") String publicIPId, @HeaderParam("accept") String accept, @BodyParam("application/json") WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context); @@ -501,7 +534,7 @@ Mono>> createPublicIP(@HostParam("endpoint") String en @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deletePublicIP(@HostParam("endpoint") String endpoint, + Mono>> deletePublicIp(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("publicIPId") String publicIPId, @PathParam("privateCloudName") String privateCloudName, @HeaderParam("accept") String accept, @@ -582,23 +615,24 @@ Mono> listDnsZonesNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPublicIPsNext( + Mono> listPublicIpsNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("accept") String accept, Context context); } /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -618,13 +652,15 @@ private Mono> getWithResponseAsync(String resourc } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. @@ -632,11 +668,12 @@ private Mono> getWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -655,28 +692,31 @@ private Mono> getWithResponseAsync(String resourc } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context); + 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)); } /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String privateCloudName) { - return getWithResponseAsync(resourceGroupName, privateCloudName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. @@ -684,27 +724,28 @@ private Mono getAsync(String resourceGroupName, String pri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String privateCloudName, + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, context).block(); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkInner get(String resourceGroupName, String privateCloudName) { - return getWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); } /** @@ -712,15 +753,32 @@ public WorkloadNetworkInner get(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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String privateCloudName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -737,30 +795,31 @@ private Mono> listSinglePageAsync(String res return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.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)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -777,79 +836,66 @@ private Mono> listSinglePageAsync(String res return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .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)); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. + * @return a WorkloadNetwork on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork 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 WorkloadNetwork 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 WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, context).block(); } /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkInner get(String resourceGroupName, String privateCloudName, String workloadNetworkName) { + return getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, Context.NONE).getValue(); } /** @@ -857,6 +903,7 @@ public PagedIterable list(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -865,7 +912,7 @@ public PagedIterable list(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSegmentsSinglePageAsync(String resourceGroupName, - String privateCloudName) { + String privateCloudName, String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -882,10 +929,15 @@ private Mono> listSegmentsSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listSegments(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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())); @@ -896,6 +948,7 @@ private Mono> listSegmentsSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -905,7 +958,7 @@ private Mono> listSegmentsSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSegmentsSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + String privateCloudName, String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -922,11 +975,15 @@ private Mono> listSegmentsSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listSegments(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context) + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -936,15 +993,17 @@ private Mono> listSegmentsSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSegmentsAsync(String resourceGroupName, - String privateCloudName) { - return new PagedFlux<>(() -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName), + private PagedFlux listSegmentsAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>( + () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), nextLink -> listSegmentsNextSinglePageAsync(nextLink)); } @@ -953,6 +1012,7 @@ private PagedFlux listSegmentsAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -961,8 +1021,9 @@ private PagedFlux listSegmentsAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSegmentsAsync(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedFlux<>(() -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, context), + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), nextLink -> listSegmentsNextSinglePageAsync(nextLink, context)); } @@ -971,14 +1032,16 @@ private PagedFlux listSegmentsAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName)); + public PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName, workloadNetworkName)); } /** @@ -986,6 +1049,7 @@ public PagedIterable listSegments(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -994,8 +1058,9 @@ public PagedIterable listSegments(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSegments(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName, context)); + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listSegmentsAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); } /** @@ -1003,6 +1068,7 @@ public PagedIterable listSegments(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1011,7 +1077,7 @@ public PagedIterable listSegments(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId) { + String privateCloudName, String workloadNetworkName, String segmentId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1028,13 +1094,18 @@ private Mono> getSegmentWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1043,6 +1114,7 @@ private Mono> getSegmentWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1052,7 +1124,7 @@ private Mono> getSegmentWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId, Context context) { + String privateCloudName, String workloadNetworkName, String segmentId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1069,13 +1141,18 @@ private Mono> getSegmentWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, context); } /** @@ -1083,6 +1160,7 @@ private Mono> getSegmentWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1091,8 +1169,8 @@ private Mono> getSegmentWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getSegmentAsync(String resourceGroupName, String privateCloudName, - String segmentId) { - return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId) + String workloadNetworkName, String segmentId) { + return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1101,6 +1179,7 @@ private Mono getSegmentAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1110,8 +1189,9 @@ private Mono getSegmentAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getSegmentWithResponse(String resourceGroupName, - String privateCloudName, String segmentId, Context context) { - return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context).block(); + String privateCloudName, String workloadNetworkName, String segmentId, Context context) { + return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) + .block(); } /** @@ -1119,6 +1199,7 @@ public Response getSegmentWithResponse(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1126,8 +1207,10 @@ public Response getSegmentWithResponse(String resou * @return a WorkloadNetworkSegment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId) { - return getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); + public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId) { + return getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE) + .getValue(); } /** @@ -1135,6 +1218,7 @@ public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1144,7 +1228,8 @@ public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String p */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1161,6 +1246,10 @@ private Mono>> createSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } @@ -1173,8 +1262,8 @@ private Mono>> createSegmentWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.createSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, - workloadNetworkSegment, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, workloadNetworkSegment, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1183,6 +1272,7 @@ private Mono>> createSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1193,8 +1283,8 @@ private Mono>> createSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { + String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1211,6 +1301,10 @@ private Mono>> createSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } @@ -1223,8 +1317,8 @@ private Mono>> createSegmentWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.createSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, - workloadNetworkSegment, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, workloadNetworkSegment, context); } /** @@ -1232,6 +1326,7 @@ private Mono>> createSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1241,10 +1336,10 @@ private Mono>> createSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - Mono>> mono - = createSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); + Mono>> mono = createSegmentWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, segmentId, workloadNetworkSegment); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, this.client.getContext()); @@ -1255,6 +1350,7 @@ private PollerFlux, WorkloadNetworkSegme * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1265,11 +1361,11 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { context = this.client.mergeContext(context); Mono>> mono = createSegmentWithResponseAsync(resourceGroupName, privateCloudName, - segmentId, workloadNetworkSegment, context); + workloadNetworkName, segmentId, workloadNetworkSegment, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, context); @@ -1280,6 +1376,7 @@ private PollerFlux, WorkloadNetworkSegme * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1289,9 +1386,11 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( - String resourceGroupName, String privateCloudName, String segmentId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - return this.beginCreateSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) + return this + .beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment) .getSyncPoller(); } @@ -1300,6 +1399,7 @@ public SyncPoller, WorkloadNetworkSegmen * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1310,10 +1410,11 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegment( - String resourceGroupName, String privateCloudName, String segmentId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { return this - .beginCreateSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + .beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment, context) .getSyncPoller(); } @@ -1322,6 +1423,7 @@ public SyncPoller, WorkloadNetworkSegmen * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1331,9 +1433,9 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createSegmentAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - return beginCreateSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + return beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -1341,6 +1443,7 @@ private Mono createSegmentAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1351,10 +1454,10 @@ private Mono createSegmentAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createSegmentAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { - return beginCreateSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, + Context context) { + return beginCreateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -1362,6 +1465,7 @@ private Mono createSegmentAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1371,8 +1475,9 @@ private Mono createSegmentAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { - return createSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + return createSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment).block(); } /** @@ -1380,6 +1485,7 @@ public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param workloadNetworkSegment Resource create parameters. * @param context The context to associate with this operation. @@ -1390,9 +1496,10 @@ public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { - return createSegmentAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .block(); + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, + Context context) { + return createSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + workloadNetworkSegment, context).block(); } /** @@ -1400,6 +1507,7 @@ public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1409,7 +1517,7 @@ public WorkloadNetworkSegmentInner createSegment(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { + String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1426,6 +1534,10 @@ private Mono>> updateSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } @@ -1437,8 +1549,8 @@ private Mono>> updateSegmentWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, properties, - context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1447,6 +1559,7 @@ private Mono>> updateSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1457,7 +1570,8 @@ private Mono>> updateSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { + String privateCloudName, String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1474,6 +1588,10 @@ private Mono>> updateSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } @@ -1485,8 +1603,8 @@ private Mono>> updateSegmentWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, properties, - context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, properties, context); } /** @@ -1494,6 +1612,7 @@ private Mono>> updateSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1503,9 +1622,10 @@ private Mono>> updateSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { - Mono>> mono - = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, properties); + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties) { + Mono>> mono = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, segmentId, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, this.client.getContext()); @@ -1516,6 +1636,7 @@ private PollerFlux, WorkloadNetworkSegme * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1526,11 +1647,11 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, - Context context) { + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties, Context context) { context = this.client.mergeContext(context); - Mono>> mono - = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, properties, context); + Mono>> mono = updateSegmentWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, segmentId, properties, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, context); @@ -1541,6 +1662,7 @@ private PollerFlux, WorkloadNetworkSegme * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1550,8 +1672,11 @@ private PollerFlux, WorkloadNetworkSegme */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties) { - return this.beginUpdateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties).getSyncPoller(); + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties) { + return this + .beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties) + .getSyncPoller(); } /** @@ -1559,6 +1684,7 @@ public SyncPoller, WorkloadNetworkSegmen * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1569,9 +1695,11 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegment( - String resourceGroupName, String privateCloudName, String segmentId, WorkloadNetworkSegmentInner properties, - Context context) { - return this.beginUpdateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties, context) + String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + WorkloadNetworkSegmentInner properties, Context context) { + return this + .beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties, + context) .getSyncPoller(); } @@ -1580,6 +1708,7 @@ public SyncPoller, WorkloadNetworkSegmen * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1589,8 +1718,9 @@ public SyncPoller, WorkloadNetworkSegmen */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateSegmentAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner properties) { - return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties).last() + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties) { + return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties) + .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1599,6 +1729,7 @@ private Mono updateSegmentAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1609,9 +1740,9 @@ private Mono updateSegmentAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateSegmentAsync(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner properties, Context context) { - return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties, context).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { + return beginUpdateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -1619,6 +1750,7 @@ private Mono updateSegmentAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1628,8 +1760,9 @@ private Mono updateSegmentAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner properties) { - return updateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties).block(); + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties) { + return updateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties) + .block(); } /** @@ -1637,6 +1770,7 @@ public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param properties The resource properties to be updated. * @param context The context to associate with this operation. @@ -1647,8 +1781,9 @@ public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, String privateCloudName, - String segmentId, WorkloadNetworkSegmentInner properties, Context context) { - return updateSegmentAsync(resourceGroupName, privateCloudName, segmentId, properties, context).block(); + String workloadNetworkName, String segmentId, WorkloadNetworkSegmentInner properties, Context context) { + return updateSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, properties, + context).block(); } /** @@ -1656,6 +1791,7 @@ public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1664,7 +1800,7 @@ public WorkloadNetworkSegmentInner updateSegment(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId) { + String privateCloudName, String workloadNetworkName, String segmentId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1681,13 +1817,18 @@ private Mono>> deleteSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1696,6 +1837,7 @@ private Mono>> deleteSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1705,7 +1847,7 @@ private Mono>> deleteSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, - String privateCloudName, String segmentId, Context context) { + String privateCloudName, String workloadNetworkName, String segmentId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1722,13 +1864,18 @@ private Mono>> deleteSegmentWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (segmentId == null) { return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + accept, context); } /** @@ -1736,6 +1883,7 @@ private Mono>> deleteSegmentWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1744,9 +1892,9 @@ private Mono>> deleteSegmentWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, - String privateCloudName, String segmentId) { + String privateCloudName, String workloadNetworkName, String segmentId) { Mono>> mono - = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId); + = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -1756,6 +1904,7 @@ private PollerFlux, Void> beginDeleteSegmentAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1765,10 +1914,10 @@ private PollerFlux, Void> beginDeleteSegmentAsync(String resour */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, - String privateCloudName, String segmentId, Context context) { + String privateCloudName, String workloadNetworkName, String segmentId, Context context) { context = this.client.mergeContext(context); - Mono>> mono - = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context); + Mono>> mono = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, segmentId, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -1778,6 +1927,7 @@ private PollerFlux, Void> beginDeleteSegmentAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1786,8 +1936,9 @@ private PollerFlux, Void> beginDeleteSegmentAsync(String resour */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String segmentId) { - return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).getSyncPoller(); + String workloadNetworkName, String segmentId) { + return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId) + .getSyncPoller(); } /** @@ -1795,6 +1946,7 @@ public SyncPoller, Void> beginDeleteSegment(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1804,8 +1956,10 @@ public SyncPoller, Void> beginDeleteSegment(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, - String segmentId, Context context) { - return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).getSyncPoller(); + String workloadNetworkName, String segmentId, Context context) { + return this + .beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) + .getSyncPoller(); } /** @@ -1813,6 +1967,7 @@ public SyncPoller, Void> beginDeleteSegment(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1820,8 +1975,9 @@ public SyncPoller, Void> beginDeleteSegment(String resourceGrou * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).last() + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId) { + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1830,6 +1986,7 @@ private Mono deleteSegmentAsync(String resourceGroupName, String privateCl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1838,9 +1995,10 @@ private Mono deleteSegmentAsync(String resourceGroupName, String privateCl * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, - Context context) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).last() + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId, Context context) { + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context) + .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1849,14 +2007,16 @@ private Mono deleteSegmentAsync(String resourceGroupName, String privateCl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { - deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).block(); + public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId) { + deleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId).block(); } /** @@ -1864,6 +2024,7 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1871,8 +2032,9 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { - deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).block(); + public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId, Context context) { + deleteSegmentAsync(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context).block(); } /** @@ -1880,6 +2042,7 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1888,7 +2051,7 @@ public void deleteSegment(String resourceGroupName, String privateCloudName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDhcpSinglePageAsync(String resourceGroupName, - String privateCloudName) { + String privateCloudName, String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1905,10 +2068,13 @@ private Mono> listDhcpSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + return FluxUtil.withContext(context -> service.listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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())); @@ -1919,6 +2085,7 @@ private Mono> listDhcpSinglePageAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1928,7 +2095,7 @@ private Mono> listDhcpSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDhcpSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + String privateCloudName, String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1945,11 +2112,15 @@ private Mono> listDhcpSinglePageAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context) + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -1959,14 +2130,16 @@ private Mono> listDhcpSinglePageAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>(() -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName), + private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>(() -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), nextLink -> listDhcpNextSinglePageAsync(nextLink)); } @@ -1975,6 +2148,7 @@ private PagedFlux listDhcpAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1983,8 +2157,9 @@ private PagedFlux listDhcpAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedFlux<>(() -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, context), + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), nextLink -> listDhcpNextSinglePageAsync(nextLink, context)); } @@ -1993,14 +2168,16 @@ private PagedFlux listDhcpAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName)); + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName)); } /** @@ -2008,6 +2185,7 @@ public PagedIterable listDhcp(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2016,8 +2194,8 @@ public PagedIterable listDhcp(String resourceGroupName */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, context)); + String workloadNetworkName, Context context) { + return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); } /** @@ -2157,6 +2335,7 @@ public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2166,7 +2345,8 @@ public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2183,6 +2363,10 @@ private Mono>> createDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } @@ -2195,8 +2379,8 @@ private Mono>> createDhcpWithResponseAsync(String reso final String accept = "application/json"; return FluxUtil .withContext(context -> service.createDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, - workloadNetworkDhcp, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + accept, workloadNetworkDhcp, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2205,6 +2389,7 @@ private Mono>> createDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2215,7 +2400,8 @@ private Mono>> createDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2232,6 +2418,10 @@ private Mono>> createDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } @@ -2244,8 +2434,8 @@ private Mono>> createDhcpWithResponseAsync(String reso final String accept = "application/json"; context = this.client.mergeContext(context); return service.createDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, workloadNetworkDhcp, - context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, accept, + workloadNetworkDhcp, context); } /** @@ -2253,6 +2443,7 @@ private Mono>> createDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2262,10 +2453,10 @@ private Mono>> createDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono - = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); + Mono>> mono = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dhcpId, workloadNetworkDhcp); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, this.client.getContext()); @@ -2276,6 +2467,7 @@ private PollerFlux, WorkloadNetworkDhcpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2286,11 +2478,11 @@ private PollerFlux, WorkloadNetworkDhcpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { context = this.client.mergeContext(context); - Mono>> mono - = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); + Mono>> mono = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dhcpId, workloadNetworkDhcp, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); } @@ -2300,6 +2492,7 @@ private PollerFlux, WorkloadNetworkDhcpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2309,9 +2502,10 @@ private PollerFlux, WorkloadNetworkDhcpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return this.beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) + return this + .beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) .getSyncPoller(); } @@ -2320,6 +2514,7 @@ public SyncPoller, WorkloadNetworkDhcpInner * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2330,9 +2525,11 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return this.beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return this + .beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, + context) .getSyncPoller(); } @@ -2341,6 +2538,7 @@ public SyncPoller, WorkloadNetworkDhcpInner * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2350,9 +2548,9 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDhcpAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + workloadNetworkDhcp).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -2360,6 +2558,7 @@ private Mono createDhcpAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2370,9 +2569,9 @@ private Mono createDhcpAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDhcpAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return beginCreateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + workloadNetworkDhcp, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -2380,6 +2579,7 @@ private Mono createDhcpAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2388,9 +2588,10 @@ private Mono createDhcpAsync(String resourceGroupName, * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); + public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return createDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) + .block(); } /** @@ -2398,6 +2599,7 @@ public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String priv * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp Resource create parameters. * @param context The context to associate with this operation. @@ -2407,9 +2609,10 @@ public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String priv * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); + public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return createDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, + context).block(); } /** @@ -2417,6 +2620,7 @@ public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String priv * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2426,7 +2630,8 @@ public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String priv */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2443,6 +2648,10 @@ private Mono>> updateDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } @@ -2455,8 +2664,8 @@ private Mono>> updateDhcpWithResponseAsync(String reso final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, - workloadNetworkDhcp, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + accept, workloadNetworkDhcp, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2465,6 +2674,7 @@ private Mono>> updateDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2475,7 +2685,8 @@ private Mono>> updateDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2492,6 +2703,10 @@ private Mono>> updateDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } @@ -2504,8 +2719,8 @@ private Mono>> updateDhcpWithResponseAsync(String reso final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, workloadNetworkDhcp, - context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, accept, + workloadNetworkDhcp, context); } /** @@ -2513,6 +2728,7 @@ private Mono>> updateDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2522,10 +2738,10 @@ private Mono>> updateDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono - = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); + Mono>> mono = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dhcpId, workloadNetworkDhcp); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, this.client.getContext()); @@ -2536,6 +2752,7 @@ private PollerFlux, WorkloadNetworkDhcpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2546,11 +2763,11 @@ private PollerFlux, WorkloadNetworkDhcpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { context = this.client.mergeContext(context); - Mono>> mono - = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); + Mono>> mono = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dhcpId, workloadNetworkDhcp, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); } @@ -2560,6 +2777,7 @@ private PollerFlux, WorkloadNetworkDhcpInne * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2569,9 +2787,10 @@ private PollerFlux, WorkloadNetworkDhcpInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return this.beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) + return this + .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) .getSyncPoller(); } @@ -2580,6 +2799,7 @@ public SyncPoller, WorkloadNetworkDhcpInner * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2590,9 +2810,11 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return this.beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return this + .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, + context) .getSyncPoller(); } @@ -2601,6 +2823,7 @@ public SyncPoller, WorkloadNetworkDhcpInner * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2610,9 +2833,9 @@ public SyncPoller, WorkloadNetworkDhcpInner */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDhcpAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + workloadNetworkDhcp).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -2620,6 +2843,7 @@ private Mono updateDhcpAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2630,9 +2854,9 @@ private Mono updateDhcpAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDhcpAsync(String resourceGroupName, String privateCloudName, - String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + workloadNetworkDhcp, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -2640,6 +2864,7 @@ private Mono updateDhcpAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2648,9 +2873,10 @@ private Mono updateDhcpAsync(String resourceGroupName, * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); + public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return updateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp) + .block(); } /** @@ -2658,6 +2884,7 @@ public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String priv * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param workloadNetworkDhcp The resource properties to be updated. * @param context The context to associate with this operation. @@ -2667,9 +2894,10 @@ public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String priv * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); + public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return updateDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, workloadNetworkDhcp, + context).block(); } /** @@ -2677,6 +2905,7 @@ public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String priv * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2685,7 +2914,7 @@ public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String priv */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String dhcpId) { + String privateCloudName, String workloadNetworkName, String dhcpId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2702,13 +2931,18 @@ private Mono>> deleteDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.deleteDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2717,6 +2951,7 @@ private Mono>> deleteDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2726,7 +2961,7 @@ private Mono>> deleteDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteDhcpWithResponseAsync(String resourceGroupName, - String privateCloudName, String dhcpId, Context context) { + String privateCloudName, String workloadNetworkName, String dhcpId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2743,13 +2978,18 @@ private Mono>> deleteDhcpWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dhcpId == null) { return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteDhcp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, accept, + context); } /** @@ -2757,6 +2997,7 @@ private Mono>> deleteDhcpWithResponseAsync(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2765,9 +3006,9 @@ private Mono>> deleteDhcpWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, - String dhcpId) { + String workloadNetworkName, String dhcpId) { Mono>> mono - = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId); + = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -2777,6 +3018,7 @@ private PollerFlux, Void> beginDeleteDhcpAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2786,10 +3028,10 @@ private PollerFlux, Void> beginDeleteDhcpAsync(String resourceG */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, - String dhcpId, Context context) { + String workloadNetworkName, String dhcpId, Context context) { context = this.client.mergeContext(context); Mono>> mono - = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, context); + = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -2799,6 +3041,7 @@ private PollerFlux, Void> beginDeleteDhcpAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2807,8 +3050,9 @@ private PollerFlux, Void> beginDeleteDhcpAsync(String resourceG */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, - String dhcpId) { - return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).getSyncPoller(); + String workloadNetworkName, String dhcpId) { + return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId) + .getSyncPoller(); } /** @@ -2816,6 +3060,7 @@ public SyncPoller, Void> beginDeleteDhcp(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2825,8 +3070,9 @@ public SyncPoller, Void> beginDeleteDhcp(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, - String dhcpId, Context context) { - return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).getSyncPoller(); + String workloadNetworkName, String dhcpId, Context context) { + return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context) + .getSyncPoller(); } /** @@ -2834,6 +3080,7 @@ public SyncPoller, Void> beginDeleteDhcp(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2841,8 +3088,9 @@ public SyncPoller, Void> beginDeleteDhcp(String resourceGroupNa * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId) { - return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).last() + private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId) { + return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2851,6 +3099,7 @@ private Mono deleteDhcpAsync(String resourceGroupName, String privateCloud * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2859,9 +3108,9 @@ private Mono deleteDhcpAsync(String resourceGroupName, String privateCloud * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, - Context context) { - return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).last() + private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId, Context context) { + return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2870,14 +3119,16 @@ private Mono deleteDhcpAsync(String resourceGroupName, String privateCloud * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { - deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).block(); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId) { + deleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId).block(); } /** @@ -2885,6 +3136,7 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2892,8 +3144,9 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).block(); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + Context context) { + deleteDhcpAsync(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context).block(); } /** @@ -2901,6 +3154,7 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2909,7 +3163,7 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listGatewaysSinglePageAsync(String resourceGroupName, - String privateCloudName) { + String privateCloudName, String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2926,10 +3180,15 @@ private Mono> listGatewaysSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listGateways(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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())); @@ -2940,6 +3199,7 @@ private Mono> listGatewaysSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2949,7 +3209,7 @@ private Mono> listGatewaysSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listGatewaysSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + String privateCloudName, String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2966,11 +3226,15 @@ private Mono> listGatewaysSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listGateways(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context) + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -2980,15 +3244,17 @@ private Mono> listGatewaysSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGatewaysAsync(String resourceGroupName, - String privateCloudName) { - return new PagedFlux<>(() -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName), + private PagedFlux listGatewaysAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>( + () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), nextLink -> listGatewaysNextSinglePageAsync(nextLink)); } @@ -2997,6 +3263,7 @@ private PagedFlux listGatewaysAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3005,8 +3272,9 @@ private PagedFlux listGatewaysAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listGatewaysAsync(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedFlux<>(() -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, context), + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), nextLink -> listGatewaysNextSinglePageAsync(nextLink, context)); } @@ -3015,14 +3283,16 @@ private PagedFlux listGatewaysAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName)); + public PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName, workloadNetworkName)); } /** @@ -3030,6 +3300,7 @@ public PagedIterable listGateways(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3038,8 +3309,9 @@ public PagedIterable listGateways(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listGateways(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName, context)); + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listGatewaysAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); } /** @@ -3047,6 +3319,7 @@ public PagedIterable listGateways(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3055,7 +3328,7 @@ public PagedIterable listGateways(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getGatewayWithResponseAsync(String resourceGroupName, - String privateCloudName, String gatewayId) { + String privateCloudName, String workloadNetworkName, String gatewayId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3072,13 +3345,18 @@ private Mono> getGatewayWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (gatewayId == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getGateway(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, gatewayId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3087,6 +3365,7 @@ private Mono> getGatewayWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3096,7 +3375,7 @@ private Mono> getGatewayWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getGatewayWithResponseAsync(String resourceGroupName, - String privateCloudName, String gatewayId, Context context) { + String privateCloudName, String workloadNetworkName, String gatewayId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3113,13 +3392,18 @@ private Mono> getGatewayWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (gatewayId == null) { return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getGateway(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, gatewayId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, + accept, context); } /** @@ -3127,6 +3411,7 @@ private Mono> getGatewayWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3135,8 +3420,8 @@ private Mono> getGatewayWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getGatewayAsync(String resourceGroupName, String privateCloudName, - String gatewayId) { - return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId) + String workloadNetworkName, String gatewayId) { + return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -3145,6 +3430,7 @@ private Mono getGatewayAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3154,8 +3440,9 @@ private Mono getGatewayAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getGatewayWithResponse(String resourceGroupName, - String privateCloudName, String gatewayId, Context context) { - return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId, context).block(); + String privateCloudName, String workloadNetworkName, String gatewayId, Context context) { + return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, context) + .block(); } /** @@ -3163,6 +3450,7 @@ public Response getGatewayWithResponse(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3170,8 +3458,10 @@ public Response getGatewayWithResponse(String resou * @return a WorkloadNetworkGateway. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { - return getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, Context.NONE).getValue(); + public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId) { + return getGatewayWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, Context.NONE) + .getValue(); } /** @@ -3179,6 +3469,7 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3186,8 +3477,8 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listPortMirroringSinglePageAsync(String resourceGroupName, String privateCloudName) { + private Mono> listPortMirroringSinglePageAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3204,10 +3495,15 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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())); @@ -3218,6 +3514,7 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3226,8 +3523,8 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listPortMirroringSinglePageAsync(String resourceGroupName, String privateCloudName, Context context) { + private Mono> listPortMirroringSinglePageAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3244,11 +3541,15 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context) + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -3258,6 +3559,7 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3266,8 +3568,9 @@ public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String p */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPortMirroringAsync(String resourceGroupName, - String privateCloudName) { - return new PagedFlux<>(() -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName), + String privateCloudName, String workloadNetworkName) { + return new PagedFlux<>( + () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), nextLink -> listPortMirroringNextSinglePageAsync(nextLink)); } @@ -3276,6 +3579,7 @@ private PagedFlux listPortMirroringAsync(Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3285,8 +3589,9 @@ private PagedFlux listPortMirroringAsync(Stri */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listPortMirroringAsync(String resourceGroupName, - String privateCloudName, Context context) { - return new PagedFlux<>(() -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, context), + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), nextLink -> listPortMirroringNextSinglePageAsync(nextLink, context)); } @@ -3295,6 +3600,7 @@ private PagedFlux listPortMirroringAsync(Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -3303,8 +3609,8 @@ private PagedFlux listPortMirroringAsync(Stri */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName) { - return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName)); + String privateCloudName, String workloadNetworkName) { + return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName)); } /** @@ -3312,6 +3618,7 @@ public PagedIterable listPortMirroring(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3321,8 +3628,9 @@ public PagedIterable listPortMirroring(String */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName, Context context) { - return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName, context)); + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedIterable<>( + listPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); } /** @@ -3330,6 +3638,7 @@ public PagedIterable listPortMirroring(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3337,8 +3646,8 @@ public PagedIterable listPortMirroring(String * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getPortMirroringWithResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId) { + private Mono> getPortMirroringWithResponseAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String portMirroringId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3355,6 +3664,10 @@ public PagedIterable listPortMirroring(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3362,7 +3675,8 @@ public PagedIterable listPortMirroring(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.getPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3371,6 +3685,7 @@ public PagedIterable listPortMirroring(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3380,7 +3695,8 @@ public PagedIterable listPortMirroring(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getPortMirroringWithResponseAsync( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { + String resourceGroupName, String privateCloudName, String workloadNetworkName, String portMirroringId, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3397,6 +3713,10 @@ private Mono> getPortMirroringWithRe return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3404,7 +3724,8 @@ private Mono> getPortMirroringWithRe final String accept = "application/json"; context = this.client.mergeContext(context); return service.getPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + accept, context); } /** @@ -3412,6 +3733,7 @@ private Mono> getPortMirroringWithRe * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3420,9 +3742,9 @@ private Mono> getPortMirroringWithRe */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getPortMirroringAsync(String resourceGroupName, - String privateCloudName, String portMirroringId) { - return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + String privateCloudName, String workloadNetworkName, String portMirroringId) { + return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3430,6 +3752,7 @@ private Mono getPortMirroringAsync(String res * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3439,8 +3762,9 @@ private Mono getPortMirroringAsync(String res */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getPortMirroringWithResponse(String resourceGroupName, - String privateCloudName, String portMirroringId, Context context) { - return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, context).block(); + String privateCloudName, String workloadNetworkName, String portMirroringId, Context context) { + return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, context).block(); } /** @@ -3448,6 +3772,7 @@ public Response getPortMirroringWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -3456,9 +3781,9 @@ public Response getPortMirroringWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId) { - return getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) - .getValue(); + String workloadNetworkName, String portMirroringId) { + return getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + Context.NONE).getValue(); } /** @@ -3466,6 +3791,7 @@ public WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3475,7 +3801,7 @@ public WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPortMirroringWithResponseAsync(String resourceGroupName, - String privateCloudName, String portMirroringId, + String privateCloudName, String workloadNetworkName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3493,6 +3819,10 @@ private Mono>> createPortMirroringWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3506,8 +3836,8 @@ private Mono>> createPortMirroringWithResponseAsync(St final String accept = "application/json"; return FluxUtil .withContext(context -> service.createPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, - workloadNetworkPortMirroring, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, accept, workloadNetworkPortMirroring, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3516,6 +3846,7 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -3526,8 +3857,8 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createPortMirroringWithResponseAsync(String resourceGroupName, - String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3544,6 +3875,10 @@ private Mono>> createPortMirroringWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3557,8 +3892,8 @@ private Mono>> createPortMirroringWithResponseAsync(St final String accept = "application/json"; context = this.client.mergeContext(context); return service.createPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, - workloadNetworkPortMirroring, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + accept, workloadNetworkPortMirroring, context); } /** @@ -3566,6 +3901,7 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3575,10 +3911,10 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { Mono>> mono = createPortMirroringWithResponseAsync(resourceGroupName, - privateCloudName, portMirroringId, workloadNetworkPortMirroring); + privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, this.client.getContext()); @@ -3589,6 +3925,7 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -3599,11 +3936,11 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { context = this.client.mergeContext(context); Mono>> mono = createPortMirroringWithResponseAsync(resourceGroupName, - privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); + privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, context); @@ -3614,6 +3951,7 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3623,10 +3961,10 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { return this - .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring) .getSyncPoller(); } @@ -3636,6 +3974,7 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -3646,10 +3985,10 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { return this - .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + .beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context) .getSyncPoller(); } @@ -3659,6 +3998,7 @@ private Mono>> createPortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3668,9 +4008,9 @@ private Mono>> createPortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPortMirroringAsync(String resourceGroupName, - String privateCloudName, String portMirroringId, + String privateCloudName, String workloadNetworkName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring).last().flatMap(this.client::getLroFinalResultOrError); } @@ -3679,6 +4019,7 @@ private Mono createPortMirroringAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -3689,9 +4030,9 @@ private Mono createPortMirroringAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createPortMirroringAsync(String resourceGroupName, - String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context).last().flatMap(this.client::getLroFinalResultOrError); } @@ -3700,6 +4041,7 @@ private Mono createPortMirroringAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3709,8 +4051,9 @@ private Mono createPortMirroringAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return createPortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return createPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring).block(); } @@ -3719,6 +4062,7 @@ public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring Resource create parameters. * @param context The context to associate with this operation. @@ -3729,8 +4073,9 @@ public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return createPortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return createPortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context).block(); } @@ -3739,6 +4084,7 @@ public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3748,7 +4094,7 @@ public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updatePortMirroringWithResponseAsync(String resourceGroupName, - String privateCloudName, String portMirroringId, + String privateCloudName, String workloadNetworkName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -3766,6 +4112,10 @@ private Mono>> updatePortMirroringWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3779,8 +4129,8 @@ private Mono>> updatePortMirroringWithResponseAsync(St final String accept = "application/json"; return FluxUtil .withContext(context -> service.updatePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, - workloadNetworkPortMirroring, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, accept, workloadNetworkPortMirroring, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3789,6 +4139,7 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -3799,8 +4150,8 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updatePortMirroringWithResponseAsync(String resourceGroupName, - String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -3817,6 +4168,10 @@ private Mono>> updatePortMirroringWithResponseAsync(St return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (portMirroringId == null) { return Mono .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); @@ -3830,8 +4185,8 @@ private Mono>> updatePortMirroringWithResponseAsync(St final String accept = "application/json"; context = this.client.mergeContext(context); return service.updatePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, - workloadNetworkPortMirroring, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + accept, workloadNetworkPortMirroring, context); } /** @@ -3839,6 +4194,7 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3848,10 +4204,10 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { Mono>> mono = updatePortMirroringWithResponseAsync(resourceGroupName, - privateCloudName, portMirroringId, workloadNetworkPortMirroring); + privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, this.client.getContext()); @@ -3862,6 +4218,7 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -3872,11 +4229,11 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { context = this.client.mergeContext(context); Mono>> mono = updatePortMirroringWithResponseAsync(resourceGroupName, - privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); + privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, WorkloadNetworkPortMirroringInner.class, context); @@ -3887,6 +4244,7 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3896,10 +4254,10 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { return this - .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring) .getSyncPoller(); } @@ -3909,6 +4267,7 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -3919,10 +4278,10 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { return this - .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + .beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context) .getSyncPoller(); } @@ -3932,6 +4291,7 @@ private Mono>> updatePortMirroringWithResponseAsync(St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3941,9 +4301,9 @@ private Mono>> updatePortMirroringWithResponseAsync(St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updatePortMirroringAsync(String resourceGroupName, - String privateCloudName, String portMirroringId, + String privateCloudName, String workloadNetworkName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring).last().flatMap(this.client::getLroFinalResultOrError); } @@ -3952,6 +4312,7 @@ private Mono updatePortMirroringAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -3962,9 +4323,9 @@ private Mono updatePortMirroringAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updatePortMirroringAsync(String resourceGroupName, - String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + String privateCloudName, String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context).last().flatMap(this.client::getLroFinalResultOrError); } @@ -3973,6 +4334,7 @@ private Mono updatePortMirroringAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -3982,8 +4344,9 @@ private Mono updatePortMirroringAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return updatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return updatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring).block(); } @@ -3992,6 +4355,7 @@ public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param workloadNetworkPortMirroring The resource properties to be updated. * @param context The context to associate with this operation. @@ -4002,8 +4366,9 @@ public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return updatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + String workloadNetworkName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return updatePortMirroringAsync(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, workloadNetworkPortMirroring, context).block(); } @@ -4241,6 +4606,7 @@ public void deletePortMirroring(String resourceGroupName, String portMirroringId * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4249,7 +4615,7 @@ public void deletePortMirroring(String resourceGroupName, String portMirroringId */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMGroupsSinglePageAsync(String resourceGroupName, - String privateCloudName) { + String privateCloudName, String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4266,10 +4632,15 @@ private Mono> listVMGroupsSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVMGroups(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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())); @@ -4280,6 +4651,7 @@ private Mono> listVMGroupsSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4289,7 +4661,7 @@ private Mono> listVMGroupsSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMGroupsSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + String privateCloudName, String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4306,11 +4678,15 @@ private Mono> listVMGroupsSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listVMGroups(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context) + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -4320,15 +4696,17 @@ private Mono> listVMGroupsSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVMGroupsAsync(String resourceGroupName, - String privateCloudName) { - return new PagedFlux<>(() -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName), + private PagedFlux listVMGroupsAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>( + () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), nextLink -> listVMGroupsNextSinglePageAsync(nextLink)); } @@ -4337,6 +4715,7 @@ private PagedFlux listVMGroupsAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4345,8 +4724,9 @@ private PagedFlux listVMGroupsAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVMGroupsAsync(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedFlux<>(() -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, context), + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), nextLink -> listVMGroupsNextSinglePageAsync(nextLink, context)); } @@ -4355,14 +4735,16 @@ private PagedFlux listVMGroupsAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName)); + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName, workloadNetworkName)); } /** @@ -4370,6 +4752,7 @@ public PagedIterable listVMGroups(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4378,8 +4761,9 @@ public PagedIterable listVMGroups(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName, context)); + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listVMGroupsAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); } /** @@ -4387,6 +4771,7 @@ public PagedIterable listVMGroups(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4395,7 +4780,7 @@ public PagedIterable listVMGroups(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String vmGroupId) { + String privateCloudName, String workloadNetworkName, String vmGroupId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4412,13 +4797,18 @@ private Mono> getVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -4427,6 +4817,7 @@ private Mono> getVMGroupWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4436,7 +4827,7 @@ private Mono> getVMGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String vmGroupId, Context context) { + String privateCloudName, String workloadNetworkName, String vmGroupId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4453,13 +4844,18 @@ private Mono> getVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, context); } /** @@ -4467,6 +4863,7 @@ private Mono> getVMGroupWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4475,8 +4872,8 @@ private Mono> getVMGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getVMGroupAsync(String resourceGroupName, String privateCloudName, - String vmGroupId) { - return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId) + String workloadNetworkName, String vmGroupId) { + return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -4485,6 +4882,7 @@ private Mono getVMGroupAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4494,8 +4892,9 @@ private Mono getVMGroupAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getVMGroupWithResponse(String resourceGroupName, - String privateCloudName, String vmGroupId, Context context) { - return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, context).block(); + String privateCloudName, String workloadNetworkName, String vmGroupId, Context context) { + return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, context) + .block(); } /** @@ -4503,6 +4902,7 @@ public Response getVMGroupWithResponse(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4510,8 +4910,10 @@ public Response getVMGroupWithResponse(String resou * @return a WorkloadNetworkVMGroup. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { - return getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); + public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId) { + return getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, Context.NONE) + .getValue(); } /** @@ -4519,6 +4921,7 @@ public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4528,7 +4931,7 @@ public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String p */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4545,6 +4948,10 @@ private Mono>> createVMGroupWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } @@ -4556,8 +4963,8 @@ private Mono>> createVMGroupWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.createVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, resource, - context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -4566,6 +4973,7 @@ private Mono>> createVMGroupWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -4576,7 +4984,8 @@ private Mono>> createVMGroupWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { + String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4593,6 +5002,10 @@ private Mono>> createVMGroupWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } @@ -4604,7 +5017,8 @@ private Mono>> createVMGroupWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.createVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, resource, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, resource, context); } /** @@ -4612,6 +5026,7 @@ private Mono>> createVMGroupWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4621,9 +5036,10 @@ private Mono>> createVMGroupWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { - Mono>> mono - = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, resource); + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource) { + Mono>> mono = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, vmGroupId, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, this.client.getContext()); @@ -4634,6 +5050,7 @@ private PollerFlux, WorkloadNetworkVMGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -4644,11 +5061,11 @@ private PollerFlux, WorkloadNetworkVMGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, - Context context) { + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource, Context context) { context = this.client.mergeContext(context); - Mono>> mono - = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context); + Mono>> mono = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, vmGroupId, resource, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, context); @@ -4659,6 +5076,7 @@ private PollerFlux, WorkloadNetworkVMGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4668,8 +5086,11 @@ private PollerFlux, WorkloadNetworkVMGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { - return this.beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource).getSyncPoller(); + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource) { + return this + .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource) + .getSyncPoller(); } /** @@ -4677,6 +5098,7 @@ public SyncPoller, WorkloadNetworkVMGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -4687,9 +5109,11 @@ public SyncPoller, WorkloadNetworkVMGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner resource, - Context context) { - return this.beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context) + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner resource, Context context) { + return this + .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource, + context) .getSyncPoller(); } @@ -4698,6 +5122,7 @@ public SyncPoller, WorkloadNetworkVMGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4707,8 +5132,9 @@ public SyncPoller, WorkloadNetworkVMGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createVMGroupAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner resource) { - return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource).last() + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource) + .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -4717,6 +5143,7 @@ private Mono createVMGroupAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -4727,9 +5154,9 @@ private Mono createVMGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createVMGroupAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { - return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { + return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -4737,6 +5164,7 @@ private Mono createVMGroupAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4746,8 +5174,9 @@ private Mono createVMGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner resource) { - return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource).block(); + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource) { + return createVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource) + .block(); } /** @@ -4755,6 +5184,7 @@ public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param resource Resource create parameters. * @param context The context to associate with this operation. @@ -4765,8 +5195,9 @@ public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { - return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, resource, context).block(); + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner resource, Context context) { + return createVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, resource, + context).block(); } /** @@ -4774,6 +5205,7 @@ public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4783,7 +5215,8 @@ public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4800,6 +5233,10 @@ private Mono>> updateVMGroupWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } @@ -4812,8 +5249,8 @@ private Mono>> updateVMGroupWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, - workloadNetworkVMGroup, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, workloadNetworkVMGroup, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -4822,6 +5259,7 @@ private Mono>> updateVMGroupWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -4832,8 +5270,8 @@ private Mono>> updateVMGroupWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateVMGroupWithResponseAsync(String resourceGroupName, - String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { + String privateCloudName, String workloadNetworkName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4850,6 +5288,10 @@ private Mono>> updateVMGroupWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (vmGroupId == null) { return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } @@ -4862,8 +5304,8 @@ private Mono>> updateVMGroupWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, - workloadNetworkVMGroup, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + accept, workloadNetworkVMGroup, context); } /** @@ -4871,6 +5313,7 @@ private Mono>> updateVMGroupWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4880,10 +5323,10 @@ private Mono>> updateVMGroupWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - Mono>> mono - = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); + Mono>> mono = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, vmGroupId, workloadNetworkVMGroup); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, this.client.getContext()); @@ -4894,6 +5337,7 @@ private PollerFlux, WorkloadNetworkVMGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -4904,11 +5348,11 @@ private PollerFlux, WorkloadNetworkVMGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, - vmGroupId, workloadNetworkVMGroup, context); + workloadNetworkName, vmGroupId, workloadNetworkVMGroup, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, context); @@ -4919,6 +5363,7 @@ private PollerFlux, WorkloadNetworkVMGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4928,9 +5373,11 @@ private PollerFlux, WorkloadNetworkVMGro */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, String privateCloudName, String vmGroupId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return this.beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) + return this + .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup) .getSyncPoller(); } @@ -4939,6 +5386,7 @@ public SyncPoller, WorkloadNetworkVMGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -4949,10 +5397,11 @@ public SyncPoller, WorkloadNetworkVMGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, String privateCloudName, String vmGroupId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { return this - .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) + .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup, context) .getSyncPoller(); } @@ -4961,6 +5410,7 @@ public SyncPoller, WorkloadNetworkVMGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -4970,9 +5420,9 @@ public SyncPoller, WorkloadNetworkVMGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateVMGroupAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -4980,6 +5430,7 @@ private Mono updateVMGroupAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -4990,10 +5441,10 @@ private Mono updateVMGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateVMGroupAsync(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { - return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + Context context) { + return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -5001,6 +5452,7 @@ private Mono updateVMGroupAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5010,8 +5462,9 @@ private Mono updateVMGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return updateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup).block(); } /** @@ -5019,6 +5472,7 @@ public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param workloadNetworkVMGroup The resource properties to be updated. * @param context The context to associate with this operation. @@ -5029,9 +5483,10 @@ public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, - String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { - return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .block(); + String workloadNetworkName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + Context context) { + return updateVMGroupAsync(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + workloadNetworkVMGroup, context).block(); } /** @@ -5263,6 +5718,7 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5270,8 +5726,8 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listVirtualMachinesSinglePageAsync(String resourceGroupName, String privateCloudName) { + private Mono> listVirtualMachinesSinglePageAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5288,10 +5744,15 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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())); @@ -5302,6 +5763,7 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5310,8 +5772,8 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listVirtualMachinesSinglePageAsync(String resourceGroupName, String privateCloudName, Context context) { + private Mono> listVirtualMachinesSinglePageAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5328,11 +5790,14 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context) + return service.listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -5342,6 +5807,7 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5350,8 +5816,9 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVirtualMachinesAsync(String resourceGroupName, - String privateCloudName) { - return new PagedFlux<>(() -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName), + String privateCloudName, String workloadNetworkName) { + return new PagedFlux<>( + () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink)); } @@ -5360,6 +5827,7 @@ private PagedFlux listVirtualMachinesAsync(S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5369,8 +5837,9 @@ private PagedFlux listVirtualMachinesAsync(S */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVirtualMachinesAsync(String resourceGroupName, - String privateCloudName, Context context) { - return new PagedFlux<>(() -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, context), + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink, context)); } @@ -5379,6 +5848,7 @@ private PagedFlux listVirtualMachinesAsync(S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5387,8 +5857,8 @@ private PagedFlux listVirtualMachinesAsync(S */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName) { - return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName)); + String privateCloudName, String workloadNetworkName) { + return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName, workloadNetworkName)); } /** @@ -5396,6 +5866,7 @@ public PagedIterable listVirtualMachines(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5405,8 +5876,9 @@ public PagedIterable listVirtualMachines(Str */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName, Context context) { - return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName, context)); + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedIterable<>( + listVirtualMachinesAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); } /** @@ -5414,6 +5886,7 @@ public PagedIterable listVirtualMachines(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5421,8 +5894,8 @@ public PagedIterable listVirtualMachines(Str * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getVirtualMachineWithResponseAsync(String resourceGroupName, String privateCloudName, String virtualMachineId) { + private Mono> getVirtualMachineWithResponseAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String virtualMachineId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5439,6 +5912,10 @@ public PagedIterable listVirtualMachines(Str return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (virtualMachineId == null) { return Mono .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); @@ -5446,8 +5923,8 @@ public PagedIterable listVirtualMachines(Str final String accept = "application/json"; return FluxUtil .withContext(context -> service.getVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, + virtualMachineId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -5456,6 +5933,7 @@ public PagedIterable listVirtualMachines(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5465,7 +5943,8 @@ public PagedIterable listVirtualMachines(Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getVirtualMachineWithResponseAsync( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { + String resourceGroupName, String privateCloudName, String workloadNetworkName, String virtualMachineId, + Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5482,6 +5961,10 @@ private Mono> getVirtualMachineWith return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (virtualMachineId == null) { return Mono .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); @@ -5489,7 +5972,8 @@ private Mono> getVirtualMachineWith final String accept = "application/json"; context = this.client.mergeContext(context); return service.getVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId, + accept, context); } /** @@ -5497,6 +5981,7 @@ private Mono> getVirtualMachineWith * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5505,9 +5990,9 @@ private Mono> getVirtualMachineWith */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getVirtualMachineAsync(String resourceGroupName, - String privateCloudName, String virtualMachineId) { - return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + String privateCloudName, String workloadNetworkName, String virtualMachineId) { + return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, + virtualMachineId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -5515,6 +6000,7 @@ private Mono getVirtualMachineAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5524,9 +6010,9 @@ private Mono getVirtualMachineAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getVirtualMachineWithResponse(String resourceGroupName, - String privateCloudName, String virtualMachineId, Context context) { - return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId, context) - .block(); + String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context) { + return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, + virtualMachineId, context).block(); } /** @@ -5534,6 +6020,7 @@ public Response getVirtualMachineWithRespons * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5542,9 +6029,9 @@ public Response getVirtualMachineWithRespons */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, String privateCloudName, - String virtualMachineId) { - return getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, Context.NONE) - .getValue(); + String workloadNetworkName, String virtualMachineId) { + return getVirtualMachineWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId, + Context.NONE).getValue(); } /** @@ -5552,6 +6039,7 @@ public WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5560,7 +6048,7 @@ public WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsServicesSinglePageAsync(String resourceGroupName, - String privateCloudName) { + String privateCloudName, String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5577,10 +6065,15 @@ private Mono> listDnsServicesSingl return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listDnsServices(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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())); @@ -5591,6 +6084,7 @@ private Mono> listDnsServicesSingl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5600,7 +6094,7 @@ private Mono> listDnsServicesSingl */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsServicesSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + String privateCloudName, String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5617,11 +6111,15 @@ private Mono> listDnsServicesSingl return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listDnsServices(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context) + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -5631,6 +6129,7 @@ private Mono> listDnsServicesSingl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5638,8 +6137,9 @@ private Mono> listDnsServicesSingl */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsServicesAsync(String resourceGroupName, - String privateCloudName) { - return new PagedFlux<>(() -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName), + String privateCloudName, String workloadNetworkName) { + return new PagedFlux<>( + () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), nextLink -> listDnsServicesNextSinglePageAsync(nextLink)); } @@ -5648,6 +6148,7 @@ private PagedFlux listDnsServicesAsync(String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5656,8 +6157,9 @@ private PagedFlux listDnsServicesAsync(String re */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsServicesAsync(String resourceGroupName, - String privateCloudName, Context context) { - return new PagedFlux<>(() -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, context), + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), nextLink -> listDnsServicesNextSinglePageAsync(nextLink, context)); } @@ -5666,6 +6168,7 @@ private PagedFlux listDnsServicesAsync(String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -5674,8 +6177,8 @@ private PagedFlux listDnsServicesAsync(String re */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsServices(String resourceGroupName, - String privateCloudName) { - return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName)); + String privateCloudName, String workloadNetworkName) { + return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName, workloadNetworkName)); } /** @@ -5683,6 +6186,7 @@ public PagedIterable listDnsServices(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5692,8 +6196,9 @@ public PagedIterable listDnsServices(String reso */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsServices(String resourceGroupName, - String privateCloudName, Context context) { - return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName, context)); + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedIterable<>( + listDnsServicesAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); } /** @@ -5701,6 +6206,7 @@ public PagedIterable listDnsServices(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5709,7 +6215,7 @@ public PagedIterable listDnsServices(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId) { + String privateCloudName, String workloadNetworkName, String dnsServiceId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5726,13 +6232,18 @@ private Mono> getDnsServiceWithResponse return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -5741,6 +6252,7 @@ private Mono> getDnsServiceWithResponse * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5750,7 +6262,7 @@ private Mono> getDnsServiceWithResponse */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, Context context) { + String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5767,13 +6279,18 @@ private Mono> getDnsServiceWithResponse return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, context); } /** @@ -5781,6 +6298,7 @@ private Mono> getDnsServiceWithResponse * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5789,8 +6307,8 @@ private Mono> getDnsServiceWithResponse */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDnsServiceAsync(String resourceGroupName, String privateCloudName, - String dnsServiceId) { - return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId) + String workloadNetworkName, String dnsServiceId) { + return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -5799,6 +6317,7 @@ private Mono getDnsServiceAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5808,8 +6327,9 @@ private Mono getDnsServiceAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDnsServiceWithResponse(String resourceGroupName, - String privateCloudName, String dnsServiceId, Context context) { - return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, context).block(); + String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context) { + return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + context).block(); } /** @@ -5817,6 +6337,7 @@ public Response getDnsServiceWithResponse(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -5825,8 +6346,9 @@ public Response getDnsServiceWithResponse(String */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId) { - return getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE).getValue(); + String workloadNetworkName, String dnsServiceId) { + return getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + Context.NONE).getValue(); } /** @@ -5834,6 +6356,7 @@ public WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5843,7 +6366,8 @@ public WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5860,6 +6384,10 @@ private Mono>> createDnsServiceWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } @@ -5872,8 +6400,8 @@ private Mono>> createDnsServiceWithResponseAsync(Strin final String accept = "application/json"; return FluxUtil .withContext(context -> service.createDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, - workloadNetworkDnsService, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, workloadNetworkDnsService, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -5882,6 +6410,7 @@ private Mono>> createDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -5892,8 +6421,8 @@ private Mono>> createDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5910,6 +6439,10 @@ private Mono>> createDnsServiceWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } @@ -5922,8 +6455,8 @@ private Mono>> createDnsServiceWithResponseAsync(Strin final String accept = "application/json"; context = this.client.mergeContext(context); return service.createDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, - workloadNetworkDnsService, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, workloadNetworkDnsService, context); } /** @@ -5931,6 +6464,7 @@ private Mono>> createDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5940,10 +6474,10 @@ private Mono>> createDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> - beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { Mono>> mono = createDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, - dnsServiceId, workloadNetworkDnsService); + workloadNetworkName, dnsServiceId, workloadNetworkDnsService); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, this.client.getContext()); @@ -5954,6 +6488,7 @@ private Mono>> createDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -5964,11 +6499,11 @@ private Mono>> createDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> - beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { context = this.client.mergeContext(context); Mono>> mono = createDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, - dnsServiceId, workloadNetworkDnsService, context); + workloadNetworkName, dnsServiceId, workloadNetworkDnsService, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, context); @@ -5979,6 +6514,7 @@ private Mono>> createDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -5988,10 +6524,11 @@ private Mono>> createDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { return this - .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService) .getSyncPoller(); } @@ -6000,6 +6537,7 @@ public SyncPoller, WorkloadNetworkDns * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -6010,11 +6548,11 @@ public SyncPoller, WorkloadNetworkDns */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { return this - .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, - context) + .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context) .getSyncPoller(); } @@ -6023,6 +6561,7 @@ public SyncPoller, WorkloadNetworkDns * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6032,10 +6571,10 @@ public SyncPoller, WorkloadNetworkDns */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsServiceAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .last() - .flatMap(this.client::getLroFinalResultOrError); + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -6043,6 +6582,7 @@ private Mono createDnsServiceAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -6053,10 +6593,10 @@ private Mono createDnsServiceAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsServiceAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, - context).last().flatMap(this.client::getLroFinalResultOrError); + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -6064,6 +6604,7 @@ private Mono createDnsServiceAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6073,9 +6614,9 @@ private Mono createDnsServiceAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return createDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .block(); + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return createDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService).block(); } /** @@ -6083,6 +6624,7 @@ public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService Resource create parameters. * @param context The context to associate with this operation. @@ -6093,9 +6635,10 @@ public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return createDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, - context).block(); + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context) { + return createDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context).block(); } /** @@ -6103,6 +6646,7 @@ public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6112,7 +6656,8 @@ public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6129,6 +6674,10 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } @@ -6141,8 +6690,8 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, - workloadNetworkDnsService, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, workloadNetworkDnsService, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -6151,6 +6700,7 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6161,8 +6711,8 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsServiceWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6179,6 +6729,10 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsServiceId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } @@ -6191,8 +6745,8 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateDnsService(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, - workloadNetworkDnsService, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + accept, workloadNetworkDnsService, context); } /** @@ -6200,6 +6754,7 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6209,10 +6764,10 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> - beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { Mono>> mono = updateDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, - dnsServiceId, workloadNetworkDnsService); + workloadNetworkName, dnsServiceId, workloadNetworkDnsService); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, this.client.getContext()); @@ -6223,6 +6778,7 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6233,11 +6789,11 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsServiceInner> - beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, - dnsServiceId, workloadNetworkDnsService, context); + workloadNetworkName, dnsServiceId, workloadNetworkDnsService, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, context); @@ -6248,6 +6804,7 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6257,10 +6814,11 @@ private Mono>> updateDnsServiceWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { return this - .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService) .getSyncPoller(); } @@ -6269,6 +6827,7 @@ public SyncPoller, WorkloadNetworkDns * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6279,11 +6838,11 @@ public SyncPoller, WorkloadNetworkDns */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { return this - .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, - context) + .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context) .getSyncPoller(); } @@ -6292,6 +6851,7 @@ public SyncPoller, WorkloadNetworkDns * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6301,10 +6861,10 @@ public SyncPoller, WorkloadNetworkDns */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsServiceAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .last() - .flatMap(this.client::getLroFinalResultOrError); + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -6312,6 +6872,7 @@ private Mono updateDnsServiceAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6322,10 +6883,10 @@ private Mono updateDnsServiceAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsServiceAsync(String resourceGroupName, - String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, - context).last().flatMap(this.client::getLroFinalResultOrError); + String privateCloudName, String workloadNetworkName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -6333,6 +6894,7 @@ private Mono updateDnsServiceAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6342,9 +6904,9 @@ private Mono updateDnsServiceAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return updateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .block(); + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return updateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService).block(); } /** @@ -6352,6 +6914,7 @@ public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param workloadNetworkDnsService The resource properties to be updated. * @param context The context to associate with this operation. @@ -6362,9 +6925,10 @@ public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return updateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, - context).block(); + String workloadNetworkName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + Context context) { + return updateDnsServiceAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + workloadNetworkDnsService, context).block(); } /** @@ -6598,6 +7162,7 @@ public void deleteDnsService(String resourceGroupName, String dnsServiceId, Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -6606,7 +7171,7 @@ public void deleteDnsService(String resourceGroupName, String dnsServiceId, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsZonesSinglePageAsync(String resourceGroupName, - String privateCloudName) { + String privateCloudName, String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6623,10 +7188,15 @@ private Mono> listDnsZonesSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listDnsZones(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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())); @@ -6637,6 +7207,7 @@ private Mono> listDnsZonesSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6646,7 +7217,7 @@ private Mono> listDnsZonesSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDnsZonesSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + String privateCloudName, String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6663,11 +7234,15 @@ private Mono> listDnsZonesSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service .listDnsZones(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context) + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -6677,15 +7252,17 @@ private Mono> listDnsZonesSinglePageA * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsZonesAsync(String resourceGroupName, - String privateCloudName) { - return new PagedFlux<>(() -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName), + private PagedFlux listDnsZonesAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedFlux<>( + () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), nextLink -> listDnsZonesNextSinglePageAsync(nextLink)); } @@ -6694,6 +7271,7 @@ private PagedFlux listDnsZonesAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6702,8 +7280,9 @@ private PagedFlux listDnsZonesAsync(String resource */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDnsZonesAsync(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedFlux<>(() -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, context), + String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), nextLink -> listDnsZonesNextSinglePageAsync(nextLink, context)); } @@ -6712,14 +7291,16 @@ private PagedFlux listDnsZonesAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName)); + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName, workloadNetworkName)); } /** @@ -6727,6 +7308,7 @@ public PagedIterable listDnsZones(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6735,8 +7317,9 @@ public PagedIterable listDnsZones(String resourceGr */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName, context)); + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listDnsZonesAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); } /** @@ -6744,6 +7327,7 @@ public PagedIterable listDnsZones(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6752,7 +7336,7 @@ public PagedIterable listDnsZones(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsZoneId) { + String privateCloudName, String workloadNetworkName, String dnsZoneId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6769,13 +7353,18 @@ private Mono> getDnsZoneWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -6784,6 +7373,7 @@ private Mono> getDnsZoneWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6793,7 +7383,7 @@ private Mono> getDnsZoneWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsZoneId, Context context) { + String privateCloudName, String workloadNetworkName, String dnsZoneId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6810,13 +7400,18 @@ private Mono> getDnsZoneWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service.getDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, context); } /** @@ -6824,6 +7419,7 @@ private Mono> getDnsZoneWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6832,8 +7428,8 @@ private Mono> getDnsZoneWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDnsZoneAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId) { - return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId) + String workloadNetworkName, String dnsZoneId) { + return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -6842,6 +7438,7 @@ private Mono getDnsZoneAsync(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6851,8 +7448,9 @@ private Mono getDnsZoneAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDnsZoneWithResponse(String resourceGroupName, - String privateCloudName, String dnsZoneId, Context context) { - return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, context).block(); + String privateCloudName, String workloadNetworkName, String dnsZoneId, Context context) { + return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, context) + .block(); } /** @@ -6860,6 +7458,7 @@ public Response getDnsZoneWithResponse(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6867,8 +7466,10 @@ public Response getDnsZoneWithResponse(String resou * @return a WorkloadNetworkDnsZone. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { - return getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); + public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId) { + return getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, Context.NONE) + .getValue(); } /** @@ -6876,6 +7477,7 @@ public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String p * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6885,7 +7487,8 @@ public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String p */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6902,6 +7505,10 @@ private Mono>> createDnsZoneWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } @@ -6914,8 +7521,8 @@ private Mono>> createDnsZoneWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.createDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, - workloadNetworkDnsZone, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, workloadNetworkDnsZone, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -6924,6 +7531,7 @@ private Mono>> createDnsZoneWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -6934,8 +7542,8 @@ private Mono>> createDnsZoneWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { + String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -6952,6 +7560,10 @@ private Mono>> createDnsZoneWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } @@ -6964,8 +7576,8 @@ private Mono>> createDnsZoneWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.createDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, - workloadNetworkDnsZone, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, workloadNetworkDnsZone, context); } /** @@ -6973,6 +7585,7 @@ private Mono>> createDnsZoneWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6982,10 +7595,10 @@ private Mono>> createDnsZoneWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono - = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); + Mono>> mono = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsZoneId, workloadNetworkDnsZone); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, this.client.getContext()); @@ -6996,6 +7609,7 @@ private PollerFlux, WorkloadNetworkDnsZo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -7006,11 +7620,11 @@ private PollerFlux, WorkloadNetworkDnsZo */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { context = this.client.mergeContext(context); Mono>> mono = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, - dnsZoneId, workloadNetworkDnsZone, context); + workloadNetworkName, dnsZoneId, workloadNetworkDnsZone, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, context); @@ -7021,6 +7635,7 @@ private PollerFlux, WorkloadNetworkDnsZo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7030,9 +7645,11 @@ private PollerFlux, WorkloadNetworkDnsZo */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this.beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) + return this + .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone) .getSyncPoller(); } @@ -7041,6 +7658,7 @@ public SyncPoller, WorkloadNetworkDnsZon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -7051,10 +7669,11 @@ public SyncPoller, WorkloadNetworkDnsZon */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { return this - .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context) .getSyncPoller(); } @@ -7063,6 +7682,7 @@ public SyncPoller, WorkloadNetworkDnsZon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7072,9 +7692,9 @@ public SyncPoller, WorkloadNetworkDnsZon */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsZoneAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -7082,6 +7702,7 @@ private Mono createDnsZoneAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -7092,10 +7713,10 @@ private Mono createDnsZoneAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createDnsZoneAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { + return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -7103,6 +7724,7 @@ private Mono createDnsZoneAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7112,8 +7734,9 @@ private Mono createDnsZoneAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return createDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone).block(); } /** @@ -7121,6 +7744,7 @@ public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone Resource create parameters. * @param context The context to associate with this operation. @@ -7131,9 +7755,10 @@ public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .block(); + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { + return createDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context).block(); } /** @@ -7141,6 +7766,7 @@ public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7150,7 +7776,8 @@ public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7167,6 +7794,10 @@ private Mono>> updateDnsZoneWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } @@ -7179,8 +7810,8 @@ private Mono>> updateDnsZoneWithResponseAsync(String r final String accept = "application/json"; return FluxUtil .withContext(context -> service.updateDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, - workloadNetworkDnsZone, context)) + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, workloadNetworkDnsZone, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -7189,6 +7820,7 @@ private Mono>> updateDnsZoneWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -7199,8 +7831,8 @@ private Mono>> updateDnsZoneWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateDnsZoneWithResponseAsync(String resourceGroupName, - String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { + String privateCloudName, String workloadNetworkName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7217,6 +7849,10 @@ private Mono>> updateDnsZoneWithResponseAsync(String r return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (dnsZoneId == null) { return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } @@ -7229,8 +7865,8 @@ private Mono>> updateDnsZoneWithResponseAsync(String r final String accept = "application/json"; context = this.client.mergeContext(context); return service.updateDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, - workloadNetworkDnsZone, context); + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + accept, workloadNetworkDnsZone, context); } /** @@ -7238,6 +7874,7 @@ private Mono>> updateDnsZoneWithResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7247,10 +7884,10 @@ private Mono>> updateDnsZoneWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono - = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); + Mono>> mono = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, dnsZoneId, workloadNetworkDnsZone); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, this.client.getContext()); @@ -7261,6 +7898,7 @@ private PollerFlux, WorkloadNetworkDnsZo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -7271,11 +7909,11 @@ private PollerFlux, WorkloadNetworkDnsZo */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, - dnsZoneId, workloadNetworkDnsZone, context); + workloadNetworkName, dnsZoneId, workloadNetworkDnsZone, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, context); @@ -7286,6 +7924,7 @@ private PollerFlux, WorkloadNetworkDnsZo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7295,9 +7934,11 @@ private PollerFlux, WorkloadNetworkDnsZo */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this.beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) + return this + .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone) .getSyncPoller(); } @@ -7306,6 +7947,7 @@ public SyncPoller, WorkloadNetworkDnsZon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -7316,10 +7958,11 @@ public SyncPoller, WorkloadNetworkDnsZon */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, String privateCloudName, String dnsZoneId, + String resourceGroupName, String privateCloudName, String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { return this - .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context) .getSyncPoller(); } @@ -7328,6 +7971,7 @@ public SyncPoller, WorkloadNetworkDnsZon * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7337,9 +7981,9 @@ public SyncPoller, WorkloadNetworkDnsZon */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsZoneAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -7347,6 +7991,7 @@ private Mono updateDnsZoneAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -7357,10 +8002,10 @@ private Mono updateDnsZoneAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateDnsZoneAsync(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { + return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -7368,6 +8013,7 @@ private Mono updateDnsZoneAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7377,8 +8023,9 @@ private Mono updateDnsZoneAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return updateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone).block(); } /** @@ -7386,6 +8033,7 @@ public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param workloadNetworkDnsZone The resource properties to be updated. * @param context The context to associate with this operation. @@ -7396,9 +8044,10 @@ public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, - String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { - return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .block(); + String workloadNetworkName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { + return updateDnsZoneAsync(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + workloadNetworkDnsZone, context).block(); } /** @@ -7630,6 +8279,7 @@ public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String pri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7637,8 +8287,8 @@ public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String pri * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsSinglePageAsync(String resourceGroupName, - String privateCloudName) { + private Mono> listPublicIpsSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7655,10 +8305,15 @@ private Mono> listPublicIPsSinglePag return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listPublicIPs(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .withContext(context -> service.listPublicIps(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, 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())); @@ -7669,6 +8324,7 @@ private Mono> listPublicIPsSinglePag * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7677,8 +8333,8 @@ private Mono> listPublicIPsSinglePag * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsSinglePageAsync(String resourceGroupName, - String privateCloudName, Context context) { + private Mono> listPublicIpsSinglePageAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7695,11 +8351,15 @@ private Mono> listPublicIPsSinglePag return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listPublicIPs(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, privateCloudName, accept, context) + .listPublicIps(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, workloadNetworkName, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } @@ -7709,16 +8369,18 @@ private Mono> listPublicIPsSinglePag * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPublicIPsAsync(String resourceGroupName, - String privateCloudName) { - return new PagedFlux<>(() -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listPublicIPsNextSinglePageAsync(nextLink)); + private PagedFlux listPublicIpsAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName) { + return new PagedFlux<>( + () -> listPublicIpsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName), + nextLink -> listPublicIpsNextSinglePageAsync(nextLink)); } /** @@ -7726,6 +8388,7 @@ private PagedFlux listPublicIPsAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7733,10 +8396,11 @@ private PagedFlux listPublicIPsAsync(String resour * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPublicIPsAsync(String resourceGroupName, - String privateCloudName, Context context) { - return new PagedFlux<>(() -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listPublicIPsNextSinglePageAsync(nextLink, context)); + private PagedFlux listPublicIpsAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, Context context) { + return new PagedFlux<>( + () -> listPublicIpsSinglePageAsync(resourceGroupName, privateCloudName, workloadNetworkName, context), + nextLink -> listPublicIpsNextSinglePageAsync(nextLink, context)); } /** @@ -7744,6 +8408,7 @@ private PagedFlux listPublicIPsAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -7751,9 +8416,9 @@ private PagedFlux listPublicIPsAsync(String resour * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPublicIPs(String resourceGroupName, - String privateCloudName) { - return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName)); + public PagedIterable listPublicIps(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { + return new PagedIterable<>(listPublicIpsAsync(resourceGroupName, privateCloudName, workloadNetworkName)); } /** @@ -7761,6 +8426,7 @@ public PagedIterable listPublicIPs(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7769,9 +8435,10 @@ public PagedIterable listPublicIPs(String resource * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - Context context) { - return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName, context)); + public PagedIterable listPublicIps(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { + return new PagedIterable<>( + listPublicIpsAsync(resourceGroupName, privateCloudName, workloadNetworkName, context)); } /** @@ -7779,6 +8446,7 @@ public PagedIterable listPublicIPs(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7786,8 +8454,8 @@ public PagedIterable listPublicIPs(String resource * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPublicIPWithResponseAsync(String resourceGroupName, - String privateCloudName, String publicIPId) { + private Mono> getPublicIpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7804,13 +8472,18 @@ private Mono> getPublicIPWithResponseAsyn return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (publicIPId == null) { return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, context)) + .withContext(context -> service.getPublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -7819,6 +8492,7 @@ private Mono> getPublicIPWithResponseAsyn * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7827,8 +8501,8 @@ private Mono> getPublicIPWithResponseAsyn * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPublicIPWithResponseAsync(String resourceGroupName, - String privateCloudName, String publicIPId, Context context) { + private Mono> getPublicIpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7845,13 +8519,18 @@ private Mono> getPublicIPWithResponseAsyn return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (publicIPId == null) { return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, context); + return service.getPublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + accept, context); } /** @@ -7859,6 +8538,7 @@ private Mono> getPublicIPWithResponseAsyn * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7866,9 +8546,9 @@ private Mono> getPublicIPWithResponseAsyn * @return a WorkloadNetworkPublicIP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getPublicIPAsync(String resourceGroupName, String privateCloudName, - String publicIPId) { - return getPublicIPWithResponseAsync(resourceGroupName, privateCloudName, publicIPId) + private Mono getPublicIpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId) { + return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -7877,6 +8557,7 @@ private Mono getPublicIPAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7885,9 +8566,10 @@ private Mono getPublicIPAsync(String resourceGroup * @return a WorkloadNetworkPublicIP along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPublicIPWithResponse(String resourceGroupName, - String privateCloudName, String publicIPId, Context context) { - return getPublicIPWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, context).block(); + public Response getPublicIpWithResponse(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId, Context context) { + return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + context).block(); } /** @@ -7895,6 +8577,7 @@ public Response getPublicIPWithResponse(String res * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -7902,9 +8585,10 @@ public Response getPublicIPWithResponse(String res * @return a WorkloadNetworkPublicIP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String privateCloudName, - String publicIPId) { - return getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE).getValue(); + public WorkloadNetworkPublicIpInner getPublicIp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId) { + return getPublicIpWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + Context.NONE).getValue(); } /** @@ -7912,6 +8596,7 @@ public WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -7920,8 +8605,9 @@ public WorkloadNetworkPublicIpInner getPublicIP(String resourceGroupName, String * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPublicIPWithResponseAsync(String resourceGroupName, - String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + private Mono>> createPublicIpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7938,6 +8624,10 @@ private Mono>> createPublicIPWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (publicIPId == null) { return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); } @@ -7949,9 +8639,9 @@ private Mono>> createPublicIPWithResponseAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, - workloadNetworkPublicIP, context)) + .withContext(context -> service.createPublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + accept, workloadNetworkPublicIP, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -7960,6 +8650,7 @@ private Mono>> createPublicIPWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -7969,9 +8660,9 @@ private Mono>> createPublicIPWithResponseAsync(String * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPublicIPWithResponseAsync(String resourceGroupName, - String privateCloudName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, - Context context) { + private Mono>> createPublicIpWithResponseAsync(String resourceGroupName, + String privateCloudName, String workloadNetworkName, String publicIPId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -7988,6 +8679,10 @@ private Mono>> createPublicIPWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (workloadNetworkName == null) { + return Mono + .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); + } if (publicIPId == null) { return Mono.error(new IllegalArgumentException("Parameter publicIPId is required and cannot be null.")); } @@ -7999,9 +8694,9 @@ private Mono>> createPublicIPWithResponseAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.createPublicIP(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIPId, accept, - workloadNetworkPublicIP, context); + return service.createPublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + accept, workloadNetworkPublicIP, context); } /** @@ -8009,6 +8704,7 @@ private Mono>> createPublicIPWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8017,11 +8713,11 @@ private Mono>> createPublicIPWithResponseAsync(String * @return the {@link PollerFlux} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIPAsync( - String resourceGroupName, String privateCloudName, String publicIPId, + private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - Mono>> mono - = createPublicIPWithResponseAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP); + Mono>> mono = createPublicIpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, publicIPId, workloadNetworkPublicIP); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, this.client.getContext()); @@ -8032,6 +8728,7 @@ private PollerFlux, WorkloadNetworkPubl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -8041,12 +8738,12 @@ private PollerFlux, WorkloadNetworkPubl * @return the {@link PollerFlux} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIPAsync( - String resourceGroupName, String privateCloudName, String publicIPId, + private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { context = this.client.mergeContext(context); - Mono>> mono = createPublicIPWithResponseAsync(resourceGroupName, privateCloudName, - publicIPId, workloadNetworkPublicIP, context); + Mono>> mono = createPublicIpWithResponseAsync(resourceGroupName, privateCloudName, + workloadNetworkName, publicIPId, workloadNetworkPublicIP, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, context); @@ -8057,6 +8754,7 @@ private PollerFlux, WorkloadNetworkPubl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8065,10 +8763,12 @@ private PollerFlux, WorkloadNetworkPubl * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( - String resourceGroupName, String privateCloudName, String publicIPId, + public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - return this.beginCreatePublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP) + return this + .beginCreatePublicIpAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP) .getSyncPoller(); } @@ -8077,6 +8777,7 @@ public SyncPoller, WorkloadNetworkPubli * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -8086,11 +8787,12 @@ public SyncPoller, WorkloadNetworkPubli * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIP( - String resourceGroupName, String privateCloudName, String publicIPId, + public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( + String resourceGroupName, String privateCloudName, String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { return this - .beginCreatePublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context) + .beginCreatePublicIpAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP, context) .getSyncPoller(); } @@ -8099,6 +8801,7 @@ public SyncPoller, WorkloadNetworkPubli * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8107,10 +8810,10 @@ public SyncPoller, WorkloadNetworkPubli * @return nSX Public IP Block on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPublicIPAsync(String resourceGroupName, String privateCloudName, - String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - return beginCreatePublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createPublicIpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return beginCreatePublicIpAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -8118,6 +8821,7 @@ private Mono createPublicIPAsync(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -8127,10 +8831,11 @@ private Mono createPublicIPAsync(String resourceGr * @return nSX Public IP Block on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPublicIPAsync(String resourceGroupName, String privateCloudName, - String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { - return beginCreatePublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, - context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono createPublicIpAsync(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, + Context context) { + return beginCreatePublicIpAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP, context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -8138,6 +8843,7 @@ private Mono createPublicIPAsync(String resourceGr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -8146,9 +8852,10 @@ private Mono createPublicIPAsync(String resourceGr * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, - String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { - return createPublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP).block(); + public WorkloadNetworkPublicIpInner createPublicIp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP) { + return createPublicIpAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP).block(); } /** @@ -8156,6 +8863,7 @@ public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param workloadNetworkPublicIP Resource create parameters. * @param context The context to associate with this operation. @@ -8165,10 +8873,11 @@ public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, Str * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, String privateCloudName, - String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, Context context) { - return createPublicIPAsync(resourceGroupName, privateCloudName, publicIPId, workloadNetworkPublicIP, context) - .block(); + public WorkloadNetworkPublicIpInner createPublicIp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, WorkloadNetworkPublicIpInner workloadNetworkPublicIP, + Context context) { + return createPublicIpAsync(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + workloadNetworkPublicIP, context).block(); } /** @@ -8183,7 +8892,7 @@ public WorkloadNetworkPublicIpInner createPublicIP(String resourceGroupName, Str * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePublicIPWithResponseAsync(String resourceGroupName, + private Mono>> deletePublicIpWithResponseAsync(String resourceGroupName, String publicIPId, String privateCloudName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -8206,7 +8915,7 @@ private Mono>> deletePublicIPWithResponseAsync(String } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.deletePublicIP(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.deletePublicIp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, publicIPId, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -8224,7 +8933,7 @@ private Mono>> deletePublicIPWithResponseAsync(String * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePublicIPWithResponseAsync(String resourceGroupName, + private Mono>> deletePublicIpWithResponseAsync(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -8247,7 +8956,7 @@ private Mono>> deletePublicIPWithResponseAsync(String } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.deletePublicIP(this.client.getEndpoint(), this.client.getApiVersion(), + return service.deletePublicIp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, publicIPId, privateCloudName, accept, context); } @@ -8263,10 +8972,10 @@ private Mono>> deletePublicIPWithResponseAsync(String * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePublicIPAsync(String resourceGroupName, String publicIPId, + private PollerFlux, Void> beginDeletePublicIpAsync(String resourceGroupName, String publicIPId, String privateCloudName) { Mono>> mono - = deletePublicIPWithResponseAsync(resourceGroupName, publicIPId, privateCloudName); + = deletePublicIpWithResponseAsync(resourceGroupName, publicIPId, privateCloudName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -8284,11 +8993,11 @@ private PollerFlux, Void> beginDeletePublicIPAsync(String resou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePublicIPAsync(String resourceGroupName, String publicIPId, + private PollerFlux, Void> beginDeletePublicIpAsync(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { context = this.client.mergeContext(context); Mono>> mono - = deletePublicIPWithResponseAsync(resourceGroupName, publicIPId, privateCloudName, context); + = deletePublicIpWithResponseAsync(resourceGroupName, publicIPId, privateCloudName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -8305,9 +9014,9 @@ private PollerFlux, Void> beginDeletePublicIPAsync(String resou * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePublicIP(String resourceGroupName, String publicIPId, + public SyncPoller, Void> beginDeletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName) { - return this.beginDeletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName).getSyncPoller(); + return this.beginDeletePublicIpAsync(resourceGroupName, publicIPId, privateCloudName).getSyncPoller(); } /** @@ -8323,9 +9032,9 @@ public SyncPoller, Void> beginDeletePublicIP(String resourceGro * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePublicIP(String resourceGroupName, String publicIPId, + public SyncPoller, Void> beginDeletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { - return this.beginDeletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName, context).getSyncPoller(); + return this.beginDeletePublicIpAsync(resourceGroupName, publicIPId, privateCloudName, context).getSyncPoller(); } /** @@ -8340,8 +9049,8 @@ public SyncPoller, Void> beginDeletePublicIP(String resourceGro * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePublicIPAsync(String resourceGroupName, String publicIPId, String privateCloudName) { - return beginDeletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName).last() + private Mono deletePublicIpAsync(String resourceGroupName, String publicIPId, String privateCloudName) { + return beginDeletePublicIpAsync(resourceGroupName, publicIPId, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -8358,9 +9067,9 @@ private Mono deletePublicIPAsync(String resourceGroupName, String publicIP * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePublicIPAsync(String resourceGroupName, String publicIPId, String privateCloudName, + private Mono deletePublicIpAsync(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { - return beginDeletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName, context).last() + return beginDeletePublicIpAsync(resourceGroupName, publicIPId, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -8375,8 +9084,8 @@ private Mono deletePublicIPAsync(String resourceGroupName, String publicIP * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName) { - deletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName).block(); + public void deletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName) { + deletePublicIpAsync(resourceGroupName, publicIPId, privateCloudName).block(); } /** @@ -8391,8 +9100,8 @@ public void deletePublicIP(String resourceGroupName, String publicIPId, String p * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { - deletePublicIPAsync(resourceGroupName, publicIPId, privateCloudName, context).block(); + public void deletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { + deletePublicIpAsync(resourceGroupName, publicIPId, privateCloudName, context).block(); } /** @@ -8902,7 +9611,7 @@ private Mono> listDnsZonesNextSingleP * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsNextSinglePageAsync(String nextLink) { + private Mono> listPublicIpsNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -8912,7 +9621,7 @@ private Mono> listPublicIPsNextSingl } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listPublicIpsNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -8930,7 +9639,7 @@ private Mono> listPublicIPsNextSingl * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsNextSinglePageAsync(String nextLink, + private Mono> listPublicIpsNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -8941,7 +9650,7 @@ private Mono> listPublicIPsNextSingl } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context) + return service.listPublicIpsNext(nextLink, this.client.getEndpoint(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } 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 fd8ce26bdd7fe..f546d44d1f412 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 @@ -45,10 +45,21 @@ public WorkloadNetworksImpl(WorkloadNetworksClient innerClient, this.serviceManager = serviceManager; } + public PagedIterable list(String resourceGroupName, String privateCloudName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + } + public Response getWithResponse(String resourceGroupName, String privateCloudName, - Context context) { + String workloadNetworkName, Context context) { Response inner - = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, context); + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkImpl(inner.getValue(), this.manager())); @@ -57,8 +68,8 @@ public Response getWithResponse(String resourceGroupName, Strin } } - public WorkloadNetwork get(String resourceGroupName, String privateCloudName) { - WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName); + public WorkloadNetwork get(String resourceGroupName, String privateCloudName, String workloadNetworkName) { + WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, workloadNetworkName); if (inner != null) { return new WorkloadNetworkImpl(inner, this.manager()); } else { @@ -66,34 +77,24 @@ public WorkloadNetwork get(String resourceGroupName, String privateCloudName) { } } - public PagedIterable list(String resourceGroupName, String privateCloudName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, privateCloudName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); - } - - public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { + public PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { PagedIterable inner - = this.serviceClient().listSegments(resourceGroupName, privateCloudName); + = this.serviceClient().listSegments(resourceGroupName, privateCloudName, workloadNetworkName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); } public PagedIterable listSegments(String resourceGroupName, String privateCloudName, - Context context) { + String workloadNetworkName, Context context) { PagedIterable inner - = this.serviceClient().listSegments(resourceGroupName, privateCloudName, context); + = this.serviceClient().listSegments(resourceGroupName, privateCloudName, workloadNetworkName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); } public Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, - String segmentId, Context context) { - Response inner - = this.serviceClient().getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); + String workloadNetworkName, String segmentId, Context context) { + Response inner = this.serviceClient() + .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkSegmentImpl(inner.getValue(), this.manager())); @@ -102,9 +103,10 @@ public Response getSegmentWithResponse(String resourceGr } } - public WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId) { + public WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String segmentId) { WorkloadNetworkSegmentInner inner - = this.serviceClient().getSegment(resourceGroupName, privateCloudName, segmentId); + = this.serviceClient().getSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId); if (inner != null) { return new WorkloadNetworkSegmentImpl(inner, this.manager()); } else { @@ -112,24 +114,28 @@ public WorkloadNetworkSegment getSegment(String resourceGroupName, String privat } } - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { - this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId); + public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId) { + this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId); } - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { - this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId, context); + public void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId, Context context) { + this.serviceClient() + .deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context); } - public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { PagedIterable inner - = this.serviceClient().listDhcp(resourceGroupName, privateCloudName); + = this.serviceClient().listDhcp(resourceGroupName, privateCloudName, workloadNetworkName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); } public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, - Context context) { + String workloadNetworkName, Context context) { PagedIterable inner - = this.serviceClient().listDhcp(resourceGroupName, privateCloudName, context); + = this.serviceClient().listDhcp(resourceGroupName, privateCloudName, workloadNetworkName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); } @@ -154,31 +160,34 @@ public WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, Stri } } - public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { - this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, dhcpId); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dhcpId) { + this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId); } - public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, dhcpId, context); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + Context context) { + this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context); } - public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { + public PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { PagedIterable inner - = this.serviceClient().listGateways(resourceGroupName, privateCloudName); + = this.serviceClient().listGateways(resourceGroupName, privateCloudName, workloadNetworkName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); } public PagedIterable listGateways(String resourceGroupName, String privateCloudName, - Context context) { + String workloadNetworkName, Context context) { PagedIterable inner - = this.serviceClient().listGateways(resourceGroupName, privateCloudName, context); + = this.serviceClient().listGateways(resourceGroupName, privateCloudName, workloadNetworkName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); } public Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, - String gatewayId, Context context) { - Response inner - = this.serviceClient().getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, context); + String workloadNetworkName, String gatewayId, Context context) { + Response inner = this.serviceClient() + .getGatewayWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkGatewayImpl(inner.getValue(), this.manager())); @@ -187,9 +196,10 @@ public Response getGatewayWithResponse(String resourceGr } } - public WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { + public WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String gatewayId) { WorkloadNetworkGatewayInner inner - = this.serviceClient().getGateway(resourceGroupName, privateCloudName, gatewayId); + = this.serviceClient().getGateway(resourceGroupName, privateCloudName, workloadNetworkName, gatewayId); if (inner != null) { return new WorkloadNetworkGatewayImpl(inner, this.manager()); } else { @@ -198,25 +208,26 @@ public WorkloadNetworkGateway getGateway(String resourceGroupName, String privat } public PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName) { + String privateCloudName, String workloadNetworkName) { PagedIterable inner - = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName); + = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); } public PagedIterable listPortMirroring(String resourceGroupName, - String privateCloudName, Context context) { + String privateCloudName, String workloadNetworkName, Context context) { PagedIterable inner - = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, context); + = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); } public Response getPortMirroringWithResponse(String resourceGroupName, - String privateCloudName, String portMirroringId, Context context) { + String privateCloudName, String workloadNetworkName, String portMirroringId, Context context) { Response inner = this.serviceClient() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkPortMirroringImpl(inner.getValue(), this.manager())); @@ -226,9 +237,9 @@ public Response getPortMirroringWithResponse(Strin } public WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId) { - WorkloadNetworkPortMirroringInner inner - = this.serviceClient().getPortMirroring(resourceGroupName, privateCloudName, portMirroringId); + String workloadNetworkName, String portMirroringId) { + WorkloadNetworkPortMirroringInner inner = this.serviceClient() + .getPortMirroring(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId); if (inner != null) { return new WorkloadNetworkPortMirroringImpl(inner, this.manager()); } else { @@ -245,23 +256,24 @@ public void deletePortMirroring(String resourceGroupName, String portMirroringId this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); } - public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { PagedIterable inner - = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName); + = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, workloadNetworkName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); } public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - Context context) { + String workloadNetworkName, Context context) { PagedIterable inner - = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, context); + = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, workloadNetworkName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); } public Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, - String vmGroupId, Context context) { - Response inner - = this.serviceClient().getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); + String workloadNetworkName, String vmGroupId, Context context) { + Response inner = this.serviceClient() + .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkVMGroupImpl(inner.getValue(), this.manager())); @@ -270,9 +282,10 @@ public Response getVMGroupWithResponse(String resourceGr } } - public WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { + public WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String vmGroupId) { WorkloadNetworkVMGroupInner inner - = this.serviceClient().getVMGroup(resourceGroupName, privateCloudName, vmGroupId); + = this.serviceClient().getVMGroup(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId); if (inner != null) { return new WorkloadNetworkVMGroupImpl(inner, this.manager()); } else { @@ -289,25 +302,26 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri } public PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName) { + String privateCloudName, String workloadNetworkName) { PagedIterable inner - = this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName); + = this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName, workloadNetworkName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); } public PagedIterable listVirtualMachines(String resourceGroupName, - String privateCloudName, Context context) { - PagedIterable inner - = this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName, context); + String privateCloudName, String workloadNetworkName, Context context) { + PagedIterable inner = this.serviceClient() + .listVirtualMachines(resourceGroupName, privateCloudName, workloadNetworkName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); } public Response getVirtualMachineWithResponse(String resourceGroupName, - String privateCloudName, String virtualMachineId, Context context) { + String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context) { Response inner = this.serviceClient() - .getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, context); + .getVirtualMachineWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId, + context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkVirtualMachineImpl(inner.getValue(), this.manager())); @@ -317,9 +331,9 @@ public Response getVirtualMachineWithResponse(Str } public WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, - String virtualMachineId) { - WorkloadNetworkVirtualMachineInner inner - = this.serviceClient().getVirtualMachine(resourceGroupName, privateCloudName, virtualMachineId); + String workloadNetworkName, String virtualMachineId) { + WorkloadNetworkVirtualMachineInner inner = this.serviceClient() + .getVirtualMachine(resourceGroupName, privateCloudName, workloadNetworkName, virtualMachineId); if (inner != null) { return new WorkloadNetworkVirtualMachineImpl(inner, this.manager()); } else { @@ -327,23 +341,24 @@ public WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, } } - public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName) { + public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { PagedIterable inner - = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName); + = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, workloadNetworkName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); } public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, - Context context) { + String workloadNetworkName, Context context) { PagedIterable inner - = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, context); + = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, workloadNetworkName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); } public Response getDnsServiceWithResponse(String resourceGroupName, - String privateCloudName, String dnsServiceId, Context context) { + String privateCloudName, String workloadNetworkName, String dnsServiceId, Context context) { Response inner = this.serviceClient() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkDnsServiceImpl(inner.getValue(), this.manager())); @@ -353,9 +368,9 @@ public Response getDnsServiceWithResponse(String reso } public WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, - String dnsServiceId) { - WorkloadNetworkDnsServiceInner inner - = this.serviceClient().getDnsService(resourceGroupName, privateCloudName, dnsServiceId); + String workloadNetworkName, String dnsServiceId) { + WorkloadNetworkDnsServiceInner inner = this.serviceClient() + .getDnsService(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId); if (inner != null) { return new WorkloadNetworkDnsServiceImpl(inner, this.manager()); } else { @@ -372,23 +387,24 @@ public void deleteDnsService(String resourceGroupName, String dnsServiceId, Stri this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); } - public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { PagedIterable inner - = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName); + = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, workloadNetworkName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); } public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - Context context) { + String workloadNetworkName, Context context) { PagedIterable inner - = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, context); + = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, workloadNetworkName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); } public Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, - String dnsZoneId, Context context) { - Response inner - = this.serviceClient().getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); + String workloadNetworkName, String dnsZoneId, Context context) { + Response inner = this.serviceClient() + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkDnsZoneImpl(inner.getValue(), this.manager())); @@ -397,9 +413,10 @@ public Response getDnsZoneWithResponse(String resourceGr } } - public WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { + public WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsZoneId) { WorkloadNetworkDnsZoneInner inner - = this.serviceClient().getDnsZone(resourceGroupName, privateCloudName, dnsZoneId); + = this.serviceClient().getDnsZone(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId); if (inner != null) { return new WorkloadNetworkDnsZoneImpl(inner, this.manager()); } else { @@ -415,23 +432,24 @@ public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String pri this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); } - public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName) { + public PagedIterable listPublicIps(String resourceGroupName, String privateCloudName, + String workloadNetworkName) { PagedIterable inner - = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName); + = this.serviceClient().listPublicIps(resourceGroupName, privateCloudName, workloadNetworkName); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); } - public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - Context context) { + public PagedIterable listPublicIps(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context) { PagedIterable inner - = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName, context); + = this.serviceClient().listPublicIps(resourceGroupName, privateCloudName, workloadNetworkName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); } - public Response getPublicIPWithResponse(String resourceGroupName, String privateCloudName, - String publicIPId, Context context) { - Response inner - = this.serviceClient().getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, context); + public Response getPublicIpWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, Context context) { + Response inner = this.serviceClient() + .getPublicIpWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkPublicIpImpl(inner.getValue(), this.manager())); @@ -440,9 +458,10 @@ public Response getPublicIPWithResponse(String resource } } - public WorkloadNetworkPublicIp getPublicIP(String resourceGroupName, String privateCloudName, String publicIPId) { + public WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId) { WorkloadNetworkPublicIpInner inner - = this.serviceClient().getPublicIP(resourceGroupName, privateCloudName, publicIPId); + = this.serviceClient().getPublicIp(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId); if (inner != null) { return new WorkloadNetworkPublicIpImpl(inner, this.manager()); } else { @@ -450,12 +469,12 @@ public WorkloadNetworkPublicIp getPublicIP(String resourceGroupName, String priv } } - public void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName) { - this.serviceClient().deletePublicIP(resourceGroupName, publicIPId, privateCloudName); + public void deletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName) { + this.serviceClient().deletePublicIp(resourceGroupName, publicIPId, privateCloudName); } - public void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { - this.serviceClient().deletePublicIP(resourceGroupName, publicIPId, privateCloudName, context); + public void deletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName, Context context) { + this.serviceClient().deletePublicIp(resourceGroupName, publicIPId, privateCloudName, context); } public WorkloadNetworkSegment getSegmentById(String id) { @@ -469,12 +488,19 @@ public WorkloadNetworkSegment getSegmentById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); if (segmentId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); + return this + .getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE) + .getValue(); } public Response getSegmentByIdWithResponse(String id, Context context) { @@ -488,69 +514,44 @@ public Response getSegmentByIdWithResponse(String id, Co throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); if (segmentId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); + return this.getSegmentWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, + context); } - public WorkloadNetworkDhcp getDhcpById(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 dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - String privateCloudName = 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))); - } - return this.getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); - } - - public Response getDhcpByIdWithResponse(String id, Context context) { + public WorkloadNetworkPortMirroring getPortMirroringById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } String privateCloudName = 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))); } - return this.getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context); - } - - public WorkloadNetworkPortMirroring getPortMirroringById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); } String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); if (portMirroringId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); } - return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) + return this + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, portMirroringId, + Context.NONE) .getValue(); } @@ -565,12 +566,18 @@ public Response getPortMirroringByIdWithResponse(S throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); if (portMirroringId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); } - return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); + return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, + portMirroringId, context); } public WorkloadNetworkVMGroup getVMGroupById(String id) { @@ -584,12 +591,19 @@ public WorkloadNetworkVMGroup getVMGroupById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); if (vmGroupId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); } - return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); + return this + .getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, Context.NONE) + .getValue(); } public Response getVMGroupByIdWithResponse(String id, Context context) { @@ -603,12 +617,18 @@ public Response getVMGroupByIdWithResponse(String id, Co throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); if (vmGroupId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); } - return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); + return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, vmGroupId, + context); } public WorkloadNetworkDnsService getDnsServiceById(String id) { @@ -622,12 +642,19 @@ public WorkloadNetworkDnsService getDnsServiceById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); if (dnsServiceId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); } - return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) + return this + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + Context.NONE) .getValue(); } @@ -642,12 +669,18 @@ public Response getDnsServiceByIdWithResponse(String throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); if (dnsServiceId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); } - return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); + return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsServiceId, + context); } public WorkloadNetworkDnsZone getDnsZoneById(String id) { @@ -661,12 +694,19 @@ public WorkloadNetworkDnsZone getDnsZoneById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); if (dnsZoneId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); } - return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); + return this + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, Context.NONE) + .getValue(); } public Response getDnsZoneByIdWithResponse(String id, Context context) { @@ -680,15 +720,21 @@ public Response getDnsZoneByIdWithResponse(String id, Co throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); if (dnsZoneId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); } - return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); + return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, dnsZoneId, + context); } - public WorkloadNetworkPublicIp getPublicIPById(String id) { + public WorkloadNetworkPublicIp getPublicIpById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -699,15 +745,22 @@ public WorkloadNetworkPublicIp getPublicIPById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); if (publicIPId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); } - return this.getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, Context.NONE).getValue(); + return this + .getPublicIpWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, Context.NONE) + .getValue(); } - public Response getPublicIPByIdWithResponse(String id, Context context) { + public Response getPublicIpByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -718,12 +771,18 @@ public Response getPublicIPByIdWithResponse(String id, throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); if (publicIPId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); } - return this.getPublicIPWithResponse(resourceGroupName, privateCloudName, publicIPId, context); + return this.getPublicIpWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, publicIPId, + context); } public void deleteSegmentById(String id) { @@ -737,12 +796,17 @@ public void deleteSegmentById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); if (segmentId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - this.deleteSegment(resourceGroupName, privateCloudName, segmentId, Context.NONE); + this.deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, Context.NONE); } public void deleteSegmentByIdWithResponse(String id, Context context) { @@ -756,12 +820,17 @@ public void deleteSegmentByIdWithResponse(String id, Context context) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); + } String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); if (segmentId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - this.deleteSegment(resourceGroupName, privateCloudName, segmentId, context); + this.deleteSegment(resourceGroupName, privateCloudName, workloadNetworkName, segmentId, context); } public void deleteDhcpById(String id) { @@ -775,221 +844,41 @@ public void deleteDhcpById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); - if (dhcpId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - this.deleteDhcp(resourceGroupName, privateCloudName, dhcpId, Context.NONE); - } - - public void deleteDhcpByIdWithResponse(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) { + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); } String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); if (dhcpId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); } - this.deleteDhcp(resourceGroupName, privateCloudName, dhcpId, context); - } - - public void deletePortMirroringById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, Context.NONE); - } - - public void deletePortMirroringByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); - } - - public void deleteVMGroupById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, Context.NONE); - } - - public void deleteVMGroupByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, context); - } - - public void deleteDnsServiceById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, Context.NONE); - } - - public void deleteDnsServiceByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); - } - - public void deleteDnsZoneById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, Context.NONE); - } - - public void deleteDnsZoneByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); + this.deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, Context.NONE); } - public void deletePublicIPById(String id) { + public void deleteDhcpByIdWithResponse(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 publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); - if (publicIPId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deletePublicIP(resourceGroupName, publicIPId, privateCloudName, Context.NONE); - } - - public void deletePublicIPByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { + String workloadNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "workloadNetworks"); + if (workloadNetworkName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'workloadNetworks'.", id))); } - String publicIPId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); - if (publicIPId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); - } - String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { + String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); + if (dhcpId == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); } - this.deletePublicIP(resourceGroupName, publicIPId, privateCloudName, context); + this.deleteDhcp(resourceGroupName, privateCloudName, workloadNetworkName, dhcpId, context); } private WorkloadNetworksClient serviceClient() { @@ -1024,7 +913,7 @@ public WorkloadNetworkDnsZoneImpl defineDnsZone(String name) { return new WorkloadNetworkDnsZoneImpl(name, this.manager()); } - public WorkloadNetworkPublicIpImpl definePublicIP(String name) { + public WorkloadNetworkPublicIpImpl definePublicIp(String name) { return new WorkloadNetworkPublicIpImpl(name, this.manager()); } } 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 04599dbf8543d..be3c45e47abb4 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 @@ -83,7 +83,6 @@ public AddonProvisioningState provisioningState() { */ @Override public void validate() { - super.validate(); } /** 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 f2a981b779e64..31ecea9573328 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 @@ -84,7 +84,6 @@ public AddonProvisioningState provisioningState() { */ @Override public void validate() { - super.validate(); if (offer() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property offer in model AddonHcxProperties")); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java index a31a2bca88646..ae9697f2c0895 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 @@ -83,7 +83,6 @@ public AddonProvisioningState provisioningState() { */ @Override public void validate() { - super.validate(); } /** 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 1fa733b29ffb2..7bbaeffd48e31 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 @@ -83,7 +83,6 @@ public AddonProvisioningState provisioningState() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java index 5f993e09c4f10..dcf8ca9ba2050 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java @@ -5,6 +5,7 @@ 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.IscsiPathInner; /** @@ -53,10 +54,131 @@ public interface IscsiPath { */ String networkBlock(); + /** + * 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.IscsiPathInner object. * * @return the inner object. */ IscsiPathInner innerModel(); + + /** + * The entirety of the IscsiPath definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The IscsiPath definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the IscsiPath definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the IscsiPath 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 IscsiPath 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.WithNetworkBlock { + /** + * Executes the create request. + * + * @return the created resource. + */ + IscsiPath create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + IscsiPath create(Context context); + } + + /** + * The stage of the IscsiPath definition allowing to specify networkBlock. + */ + interface WithNetworkBlock { + /** + * Specifies the networkBlock property: CIDR Block for iSCSI path.. + * + * @param networkBlock CIDR Block for iSCSI path. + * @return the next definition stage. + */ + WithCreate withNetworkBlock(String networkBlock); + } + } + + /** + * Begins update for the IscsiPath resource. + * + * @return the stage of resource update. + */ + IscsiPath.Update update(); + + /** + * The template for IscsiPath update. + */ + interface Update { + /** + * Executes the update request. + * + * @return the updated resource. + */ + IscsiPath apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + IscsiPath apply(Context context); + } + + /** + * The IscsiPath update stages. + */ + interface UpdateStages { + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + IscsiPath refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + IscsiPath refresh(Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java index f73c348581079..99731a7191ff1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; /** * Resource collection API of IscsiPaths. @@ -43,74 +42,103 @@ public interface IscsiPaths { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String iscsiPathName, + Context context); /** * Get a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a IscsiPath. */ - IscsiPath get(String resourceGroupName, String privateCloudName); + IscsiPath get(String resourceGroupName, String privateCloudName, String iscsiPathName); /** - * Create a IscsiPath. + * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param resource Resource create parameters. + * @param iscsiPathName Name of the iSCSI path resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an iSCSI path resource. */ - IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); + void delete(String resourceGroupName, String privateCloudName, String iscsiPathName); /** - * Create a IscsiPath. + * Delete a IscsiPath. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param resource Resource create parameters. + * @param iscsiPathName Name of the iSCSI path resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an iSCSI path resource. */ - IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, - Context context); + void delete(String resourceGroupName, String privateCloudName, String iscsiPathName, Context context); + + /** + * Get a IscsiPath. + * + * @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 IscsiPath along with {@link Response}. + */ + IscsiPath getById(String id); + + /** + * Get a IscsiPath. + * + * @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 IscsiPath along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); /** * Delete a IscsiPath. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 deleteByResourceGroup(String resourceGroupName, String privateCloudName); + void deleteById(String id); /** * Delete a IscsiPath. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. + * @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 delete(String resourceGroupName, String privateCloudName, Context context); + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new IscsiPath resource. + * + * @param name resource name. + * @return the first stage of the new IscsiPath definition. + */ + IscsiPath.DefinitionStages.Blank define(String name); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java index 3bed16e484c12..e247a66552c75 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java @@ -5,6 +5,7 @@ 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.JsonToken; import com.azure.json.JsonWriter; @@ -102,9 +103,15 @@ public PSCredentialExecutionParameter withName(String name) { */ @Override public void validate() { - super.validate(); + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model PSCredentialExecutionParameter")); + } } + private static final ClientLogger LOGGER = new ClientLogger(PSCredentialExecutionParameter.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java index 463da8ee5d634..107e3af026980 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java @@ -5,6 +5,7 @@ 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.JsonToken; import com.azure.json.JsonWriter; @@ -77,9 +78,15 @@ public ScriptSecureStringExecutionParameter withName(String name) { */ @Override public void validate() { - super.validate(); + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model ScriptSecureStringExecutionParameter")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ScriptSecureStringExecutionParameter.class); + /** * {@inheritDoc} */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java index d960180ba1c52..ff4a7444e24ff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java @@ -5,6 +5,7 @@ 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.JsonToken; import com.azure.json.JsonWriter; @@ -77,9 +78,15 @@ public ScriptStringExecutionParameter withName(String name) { */ @Override public void validate() { - super.validate(); + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model ScriptStringExecutionParameter")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ScriptStringExecutionParameter.class); + /** * {@inheritDoc} */ 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 f0074a9c0aff8..bb5e56a0366a5 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 @@ -203,7 +203,6 @@ public VmHostPlacementPolicyProperties withDisplayName(String displayName) { */ @Override public void validate() { - super.validate(); if (vmMembers() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( 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 f0c46c0c4db1d..9a3967299e16b 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 @@ -128,7 +128,6 @@ public VmPlacementPolicyProperties withDisplayName(String displayName) { */ @Override public void validate() { - super.validate(); if (vmMembers() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java index adad0ea38981f..c3b35ecd53f8f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java @@ -83,13 +83,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** @@ -171,19 +173,4 @@ interface WithProperties { Update withProperties(WorkloadNetworkDhcpEntity properties); } } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - WorkloadNetworkDhcp refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - WorkloadNetworkDhcp refresh(Context context); } 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 455cd083ce9a3..3464adc06543e 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 @@ -27,14 +27,14 @@ public final class WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { private List serverAddresses; /* - * NSX Segments consuming DHCP. + * The provisioning state */ - private List segments; + private WorkloadNetworkDhcpProvisioningState provisioningState; /* - * The provisioning state + * NSX Segments consuming DHCP. */ - private WorkloadNetworkDhcpProvisioningState provisioningState; + private List segments; /** * Creates an instance of WorkloadNetworkDhcpRelay class. @@ -73,23 +73,23 @@ public WorkloadNetworkDhcpRelay withServerAddresses(List serverAddresses } /** - * Get the segments property: NSX Segments consuming DHCP. + * Get the provisioningState property: The provisioning state. * - * @return the segments value. + * @return the provisioningState value. */ @Override - public List segments() { - return this.segments; + public WorkloadNetworkDhcpProvisioningState provisioningState() { + return this.provisioningState; } /** - * Get the provisioningState property: The provisioning state. + * Get the segments property: NSX Segments consuming DHCP. * - * @return the provisioningState value. + * @return the segments value. */ @Override - public WorkloadNetworkDhcpProvisioningState provisioningState() { - return this.provisioningState; + public List segments() { + return this.segments; } /** @@ -117,7 +117,6 @@ public WorkloadNetworkDhcpRelay withRevision(Long revision) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java index f1593985e73a0..1cb4a0e847f20 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 @@ -32,14 +32,14 @@ public final class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { private Long leaseTime; /* - * NSX Segments consuming DHCP. + * The provisioning state */ - private List segments; + private WorkloadNetworkDhcpProvisioningState provisioningState; /* - * The provisioning state + * NSX Segments consuming DHCP. */ - private WorkloadNetworkDhcpProvisioningState provisioningState; + private List segments; /** * Creates an instance of WorkloadNetworkDhcpServer class. @@ -98,23 +98,23 @@ public WorkloadNetworkDhcpServer withLeaseTime(Long leaseTime) { } /** - * Get the segments property: NSX Segments consuming DHCP. + * Get the provisioningState property: The provisioning state. * - * @return the segments value. + * @return the provisioningState value. */ @Override - public List segments() { - return this.segments; + public WorkloadNetworkDhcpProvisioningState provisioningState() { + return this.provisioningState; } /** - * Get the provisioningState property: The provisioning state. + * Get the segments property: NSX Segments consuming DHCP. * - * @return the provisioningState value. + * @return the segments value. */ @Override - public WorkloadNetworkDhcpProvisioningState provisioningState() { - return this.provisioningState; + public List segments() { + return this.segments; } /** @@ -142,7 +142,6 @@ public WorkloadNetworkDhcpServer withRevision(Long revision) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java index 02b5b76dac316..ba1164bea099f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java @@ -133,13 +133,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java index 7fc1a1f4f7960..e10c06df311e2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java @@ -126,13 +126,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java index e9fe2eadd5cd2..d6e9cbc05a437 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java @@ -125,13 +125,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java index 13b6a50c67f19..e78c192d71988 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java @@ -97,13 +97,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java index 5d92d9259dd11..03d139ad909df 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java @@ -126,13 +126,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java index 5da5fa4d3d880..f1e4a4345df5e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java @@ -112,13 +112,15 @@ interface Blank extends WithParentResource { */ interface WithParentResource { /** - * Specifies resourceGroupName, privateCloudName. + * Specifies resourceGroupName, privateCloudName, workloadNetworkName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @return the next definition stage. */ - WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + WithCreate withExistingWorkloadNetwork(String resourceGroupName, String privateCloudName, + String workloadNetworkName); } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java index 3a10764e9607e..f38224fa60633 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java @@ -13,72 +13,78 @@ */ public interface WorkloadNetworks { /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork along with {@link Response}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName); /** - * Get a WorkloadNetwork. + * List WorkloadNetwork resources by PrivateCloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetwork. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - WorkloadNetwork get(String resourceGroupName, String privateCloudName); + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String privateCloudName); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); /** - * List WorkloadNetwork resources by PrivateCloud. + * Get a WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork. */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + WorkloadNetwork get(String resourceGroupName, String privateCloudName, String workloadNetworkName); /** * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listSegments(String resourceGroupName, String privateCloudName); + PagedIterable listSegments(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkSegment resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -86,13 +92,14 @@ public interface WorkloadNetworks { * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ PagedIterable listSegments(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,70 +108,79 @@ PagedIterable listSegments(String resourceGroupName, Str * @return a WorkloadNetworkSegment along with {@link Response}. */ Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, - String segmentId, Context context); + String workloadNetworkName, String segmentId, Context context); /** * Get a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkSegment. */ - WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId); + WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String segmentId); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); + void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId); /** * Delete a WorkloadNetworkSegment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param segmentId The ID of the NSX Segment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); + void deleteSegment(String resourceGroupName, String privateCloudName, String workloadNetworkName, String segmentId, + Context context); /** * List WorkloadNetworkDhcp resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDhcp(String resourceGroupName, String privateCloudName); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkDhcp resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDhcp(String resourceGroupName, String privateCloudName, Context context); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkDhcp. @@ -199,43 +215,49 @@ Response getDhcpWithResponse(String resourceGroupName, Stri * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); + void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId); /** * Delete a WorkloadNetworkDhcp. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dhcpId The ID of the DHCP configuration. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); + void deleteDhcp(String resourceGroupName, String privateCloudName, String workloadNetworkName, String dhcpId, + Context context); /** * List WorkloadNetworkGateway resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listGateways(String resourceGroupName, String privateCloudName); + PagedIterable listGateways(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkGateway resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -243,13 +265,14 @@ Response getDhcpWithResponse(String resourceGroupName, Stri * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ PagedIterable listGateways(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkGateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -258,39 +281,44 @@ PagedIterable listGateways(String resourceGroupName, Str * @return a WorkloadNetworkGateway along with {@link Response}. */ Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, - String gatewayId, Context context); + String workloadNetworkName, String gatewayId, Context context); /** * Get a WorkloadNetworkGateway. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param gatewayId The ID of the NSX Gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkGateway. */ - WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId); + WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String gatewayId); /** * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName); + PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -299,13 +327,14 @@ Response getGatewayWithResponse(String resourceGroupName * {@link PagedIterable}. */ PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -314,13 +343,14 @@ PagedIterable listPortMirroring(String resourceGro * @return a WorkloadNetworkPortMirroring along with {@link Response}. */ Response getPortMirroringWithResponse(String resourceGroupName, - String privateCloudName, String portMirroringId, Context context); + String privateCloudName, String workloadNetworkName, String portMirroringId, Context context); /** * Get a WorkloadNetworkPortMirroring. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param portMirroringId ID of the NSX port mirroring profile. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -328,7 +358,7 @@ Response getPortMirroringWithResponse(String resou * @return a WorkloadNetworkPortMirroring. */ WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, - String portMirroringId); + String workloadNetworkName, String portMirroringId); /** * Delete a WorkloadNetworkPortMirroring. @@ -361,18 +391,21 @@ void deletePortMirroring(String resourceGroupName, String portMirroringId, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkVMGroup resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -380,13 +413,14 @@ void deletePortMirroring(String resourceGroupName, String portMirroringId, Strin * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -395,20 +429,22 @@ PagedIterable listVMGroups(String resourceGroupName, Str * @return a WorkloadNetworkVMGroup along with {@link Response}. */ Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, - String vmGroupId, Context context); + String workloadNetworkName, String vmGroupId, Context context); /** * Get a WorkloadNetworkVMGroup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param vmGroupId ID of the VM group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkVMGroup. */ - WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); + WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String vmGroupId); /** * Delete a WorkloadNetworkVMGroup. @@ -440,19 +476,22 @@ Response getVMGroupWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName); + PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -461,13 +500,14 @@ Response getVMGroupWithResponse(String resourceGroupName * {@link PagedIterable}. */ PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkVirtualMachine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -476,13 +516,14 @@ PagedIterable listVirtualMachines(String resource * @return a WorkloadNetworkVirtualMachine along with {@link Response}. */ Response getVirtualMachineWithResponse(String resourceGroupName, - String privateCloudName, String virtualMachineId, Context context); + String privateCloudName, String workloadNetworkName, String virtualMachineId, Context context); /** * Get a WorkloadNetworkVirtualMachine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param virtualMachineId ID of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -490,26 +531,29 @@ Response getVirtualMachineWithResponse(String res * @return a WorkloadNetworkVirtualMachine. */ WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, - String virtualMachineId); + String workloadNetworkName, String virtualMachineId); /** * List WorkloadNetworkDnsService resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsService list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkDnsService resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -518,13 +562,14 @@ WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String * {@link PagedIterable}. */ PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -533,20 +578,22 @@ PagedIterable listDnsServices(String resourceGroupNam * @return a WorkloadNetworkDnsService along with {@link Response}. */ Response getDnsServiceWithResponse(String resourceGroupName, String privateCloudName, - String dnsServiceId, Context context); + String workloadNetworkName, String dnsServiceId, Context context); /** * Get a WorkloadNetworkDnsService. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsServiceId ID of the DNS service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkDnsService. */ - WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, String dnsServiceId); + WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String dnsServiceId); /** * Delete a WorkloadNetworkDnsService. @@ -578,18 +625,21 @@ Response getDnsServiceWithResponse(String resourceGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkDnsZone resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -597,13 +647,14 @@ Response getDnsServiceWithResponse(String resourceGro * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, - Context context); + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -612,20 +663,22 @@ PagedIterable listDnsZones(String resourceGroupName, Str * @return a WorkloadNetworkDnsZone along with {@link Response}. */ Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, - String dnsZoneId, Context context); + String workloadNetworkName, String dnsZoneId, Context context); /** * Get a WorkloadNetworkDnsZone. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param dnsZoneId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkDnsZone. */ - WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); + WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String dnsZoneId); /** * Delete a WorkloadNetworkDnsZone. @@ -657,19 +710,22 @@ Response getDnsZoneWithResponse(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); + PagedIterable listPublicIps(String resourceGroupName, String privateCloudName, + String workloadNetworkName); /** * List WorkloadNetworkPublicIP resources by WorkloadNetwork. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -677,14 +733,15 @@ Response getDnsZoneWithResponse(String resourceGroupName * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, - Context context); + PagedIterable listPublicIps(String resourceGroupName, String privateCloudName, + String workloadNetworkName, Context context); /** * Get a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -692,21 +749,23 @@ PagedIterable listPublicIPs(String resourceGroupName, S * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkPublicIP along with {@link Response}. */ - Response getPublicIPWithResponse(String resourceGroupName, String privateCloudName, - String publicIPId, Context context); + Response getPublicIpWithResponse(String resourceGroupName, String privateCloudName, + String workloadNetworkName, String publicIPId, Context context); /** * Get a WorkloadNetworkPublicIP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param workloadNetworkName Name of the global reach connection. * @param publicIPId ID of the DNS zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkPublicIP. */ - WorkloadNetworkPublicIp getPublicIP(String resourceGroupName, String privateCloudName, String publicIPId); + WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, String workloadNetworkName, + String publicIPId); /** * Delete a WorkloadNetworkPublicIP. @@ -718,7 +777,7 @@ Response getPublicIPWithResponse(String resourceGroupNa * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName); + void deletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName); /** * Delete a WorkloadNetworkPublicIP. @@ -731,7 +790,7 @@ Response getPublicIPWithResponse(String resourceGroupNa * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deletePublicIP(String resourceGroupName, String publicIPId, String privateCloudName, Context context); + void deletePublicIp(String resourceGroupName, String publicIPId, String privateCloudName, Context context); /** * Get a WorkloadNetworkSegment. @@ -756,29 +815,6 @@ Response getPublicIPWithResponse(String resourceGroupNa */ Response getSegmentByIdWithResponse(String id, Context context); - /** - * Get a WorkloadNetworkDhcp. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp along with {@link Response}. - */ - WorkloadNetworkDhcp getDhcpById(String id); - - /** - * Get a WorkloadNetworkDhcp. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a WorkloadNetworkDhcp along with {@link Response}. - */ - Response getDhcpByIdWithResponse(String id, Context context); - /** * Get a WorkloadNetworkPortMirroring. * @@ -880,7 +916,7 @@ Response getPublicIPWithResponse(String resourceGroupNa * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkPublicIP along with {@link Response}. */ - WorkloadNetworkPublicIp getPublicIPById(String id); + WorkloadNetworkPublicIp getPublicIpById(String id); /** * Get a WorkloadNetworkPublicIP. @@ -892,7 +928,7 @@ Response getPublicIPWithResponse(String resourceGroupNa * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a WorkloadNetworkPublicIP along with {@link Response}. */ - Response getPublicIPByIdWithResponse(String id, Context context); + Response getPublicIpByIdWithResponse(String id, Context context); /** * Delete a WorkloadNetworkSegment. @@ -936,111 +972,6 @@ Response getPublicIPWithResponse(String resourceGroupNa */ void deleteDhcpByIdWithResponse(String id, Context context); - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePortMirroringById(String id); - - /** - * Delete a WorkloadNetworkPortMirroring. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePortMirroringByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteVMGroupById(String id); - - /** - * Delete a WorkloadNetworkVMGroup. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteVMGroupByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsServiceById(String id); - - /** - * Delete a WorkloadNetworkDnsService. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsServiceByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsZoneById(String id); - - /** - * Delete a WorkloadNetworkDnsZone. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteDnsZoneByIdWithResponse(String id, Context context); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePublicIPById(String id); - - /** - * Delete a WorkloadNetworkPublicIP. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deletePublicIPByIdWithResponse(String id, Context context); - /** * Begins definition for a new WorkloadNetworkSegment resource. * @@ -1095,5 +1026,5 @@ Response getPublicIPWithResponse(String resourceGroupNa * @param name resource name. * @return the first stage of the new WorkloadNetworkPublicIp definition. */ - WorkloadNetworkPublicIp.DefinitionStages.Blank definePublicIP(String name); + WorkloadNetworkPublicIp.DefinitionStages.Blank definePublicIp(String name); } 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 b92f135b8da27..4c04471a4cd30 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.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 diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json index 8878e547a7984..0637a088a01e8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json @@ -1 +1 @@ -[ ] \ No newline at end of file +[] \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java index c859a728e850c..99c218d7df9ac 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 @@ -5,14 +5,48 @@ package com.azure.resourcemanager.avs.generated; 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. */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_CreateOrUpdate_ArcReg.json + * x-ms-original-file: 2023-09-01/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: 2023-09-01/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: 2023-09-01/Addons_CreateOrUpdate_ArcReg.json */ /** * Sample code: Addons_CreateOrUpdate_ArcReg. @@ -27,4 +61,20 @@ public static void addonsCreateOrUpdateArcReg(com.azure.resourcemanager.avs.AvsM "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) .create(); } + + /* + * x-ms-original-file: 2023-09-01/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(); + } } 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 b63c1d7f322ca..38af8a525e771 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 @@ -9,7 +9,7 @@ */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Delete.json + * x-ms-original-file: 2023-09-01/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 d3b46acc022c6..4b36e1f78c2b2 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 @@ -9,7 +9,43 @@ */ public final class AddonsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_Get_ArcReg.json + * x-ms-original-file: 2023-09-01/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: 2023-09-01/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: 2023-09-01/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); + } + + /* + * x-ms-original-file: 2023-09-01/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 a553d0a24d38e..4fe53707f4b89 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 @@ -9,7 +9,7 @@ */ public final class AddonsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Addons_List.json + * x-ms-original-file: 2023-09-01/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 47cc84eb230cb..d855c150654fa 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 @@ -9,8 +9,7 @@ */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/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 9ef256db374c2..826a796e7f51b 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 @@ -9,7 +9,7 @@ */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_Delete.json + * x-ms-original-file: 2023-09-01/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 1df19a8b67764..48e6cbd2d6956 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 @@ -9,7 +9,7 @@ */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_Get.json + * x-ms-original-file: 2023-09-01/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 5f784198d6c02..4fe1f0ce8c4a4 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 @@ -9,7 +9,7 @@ */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Authorizations_List.json + * x-ms-original-file: 2023-09-01/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 0b863b3e831bf..5b441269bdfbb 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 @@ -9,8 +9,7 @@ */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/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 b7bb30199007d..dd290f68a12a3 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 @@ -9,7 +9,7 @@ */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Delete.json + * x-ms-original-file: 2023-09-01/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 9034f188e6a45..119cdccaba230 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 @@ -9,7 +9,7 @@ */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_Get.json + * x-ms-original-file: 2023-09-01/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 386347cbbb0af..8218784c8d913 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 @@ -9,7 +9,7 @@ */ public final class CloudLinksListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/CloudLinks_List.json + * x-ms-original-file: 2023-09-01/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 9fc41ed6e5219..3bdb04e22c853 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 @@ -11,8 +11,7 @@ */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/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 78e982a65841e..447d846b4dd29 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 @@ -9,7 +9,7 @@ */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Delete.json + * x-ms-original-file: 2023-09-01/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 0e20645b0e5c4..d9978e9ada05e 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 @@ -9,7 +9,7 @@ */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Get.json + * x-ms-original-file: 2023-09-01/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 12dd55afb08c0..152dbdfe4dbb6 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 @@ -9,7 +9,7 @@ */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_List.json + * x-ms-original-file: 2023-09-01/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 4d23f537a684a..1a3d4971d678d 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 @@ -9,7 +9,7 @@ */ public final class ClustersListZonesSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_ListZones.json + * x-ms-original-file: 2023-09-01/Clusters_ListZones.json */ /** * Sample code: Clusters_ListZones. @@ -19,4 +19,16 @@ public final class ClustersListZonesSamples { 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: 2023-09-01/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); + } } 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 ab51b287c3a9c..3a35b645dc5a4 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 @@ -11,7 +11,7 @@ */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Clusters_Update.json + * x-ms-original-file: 2023-09-01/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 ef1a2be5e9247..fdcd7cb681b7e 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 @@ -11,8 +11,7 @@ */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/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 b45dad3ae403a..d4bdc9b393972 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 @@ -9,7 +9,7 @@ */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Delete.json + * x-ms-original-file: 2023-09-01/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 2c5247f2f96c3..cdedc047a1693 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 @@ -9,7 +9,7 @@ */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_Get.json + * x-ms-original-file: 2023-09-01/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 58045a6f322fd..e4f593ee080d5 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 @@ -9,7 +9,7 @@ */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Datastores_List.json + * x-ms-original-file: 2023-09-01/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 5aecbd81a48c4..af9bdab17c9d0 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,8 +9,7 @@ */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. 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 06f1615a7ee29..d0d32f674d7a5 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 @@ -9,8 +9,7 @@ */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_Delete.json + * x-ms-original-file: 2023-09-01/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 b1f7b81354758..244ae79e617c0 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 @@ -9,8 +9,7 @@ */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_Get.json + * x-ms-original-file: 2023-09-01/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 5f0e4f082a6df..526bcf1dc6c80 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 @@ -9,8 +9,7 @@ */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/GlobalReachConnections_List.json + * x-ms-original-file: 2023-09-01/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 a849f8bcecd47..54b2916e32c0b 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 @@ -9,8 +9,7 @@ */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/HcxEnterpriseSites_CreateOrUpdate.json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. 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 2b06e2096f613..e1775f255ed32 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 @@ -9,8 +9,7 @@ */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Delete.json + * x-ms-original-file: 2023-09-01/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 1eddf2c336155..4bbba06b1c95e 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 @@ -9,7 +9,7 @@ */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_Get.json + * x-ms-original-file: 2023-09-01/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 05ca3e74c74c1..2361969998599 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 @@ -9,8 +9,7 @@ */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/HcxEnterpriseSites_List.json + * x-ms-original-file: 2023-09-01/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. 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 1d9cc088d027e..42811d10f5688 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 @@ -4,15 +4,12 @@ package com.azure.resourcemanager.avs.generated; -import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; - /** * Samples for IscsiPaths CreateOrUpdate. */ public final class IscsiPathsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/IscsiPaths_CreateOrUpdate.json */ /** * Sample code: IscsiPaths_CreateOrUpdate. @@ -21,7 +18,9 @@ public final class IscsiPathsCreateOrUpdateSamples { */ 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); + .define("default") + .withExistingPrivateCloud("group1", "cloud1") + .withNetworkBlock("192.168.0.0/24") + .create(); } } 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 f708583471a04..c58d0df671c7d 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 @@ -9,7 +9,7 @@ */ public final class IscsiPathsDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Delete.json + * x-ms-original-file: 2023-09-01/IscsiPaths_Delete.json */ /** * Sample code: IscsiPaths_Delete. @@ -17,6 +17,6 @@ public final class IscsiPathsDeleteSamples { * @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); + manager.iscsiPaths().delete("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java index f9cd3dd1ace64..ada3aaca2eb44 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 @@ -9,7 +9,7 @@ */ public final class IscsiPathsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_Get.json + * x-ms-original-file: 2023-09-01/IscsiPaths_Get.json */ /** * Sample code: IscsiPaths_Get. @@ -17,6 +17,6 @@ public final class IscsiPathsGetSamples { * @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); + manager.iscsiPaths().getWithResponse("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java index b899da4906bad..615d3491ee536 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 @@ -9,7 +9,7 @@ */ public final class IscsiPathsListByPrivateCloudSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/IscsiPaths_List.json + * x-ms-original-file: 2023-09-01/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 299af5e659fbf..859d6a7a24e1a 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 @@ -9,8 +9,7 @@ */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckQuotaAvailability.json + * x-ms-original-file: 2023-09-01/Locations_CheckQuotaAvailability.json */ /** * Sample code: Locations_CheckQuotaAvailability. 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 e1a9a86f9cfd3..33afcb0f6e121 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 @@ -4,13 +4,14 @@ package com.azure.resourcemanager.avs.generated; +import com.azure.resourcemanager.avs.models.Sku; + /** * Samples for Locations CheckTrialAvailability. */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Locations_CheckTrialAvailability.json + * x-ms-original-file: 2023-09-01/Locations_CheckTrialAvailability.json */ /** * Sample code: Locations_CheckTrialAvailability. @@ -20,4 +21,18 @@ public final class LocationsCheckTrialAvailabilitySamples { public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs.AvsManager manager) { manager.locations().checkTrialAvailabilityWithResponse("eastus", null, com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2023-09-01/Locations_CheckTrialAvailabilityWithSku.json + */ + /** + * Sample code: Locations_CheckTrialAvailabilityWithSku. + * + * @param manager Entry point to AvsManager. + */ + public static void locationsCheckTrialAvailabilityWithSku(com.azure.resourcemanager.avs.AvsManager manager) { + manager.locations() + .checkTrialAvailabilityWithResponse("eastus", new Sku().withName("avs52t"), + com.azure.core.util.Context.NONE); + } } 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 b845b9ddbba5f..0de704a244661 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 @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/Operations_List.json + * x-ms-original-file: 2023-09-01/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 9938adc789f6f..9852dd85c61c4 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 @@ -15,8 +15,7 @@ */ public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/PlacementPolicies_CreateOrUpdate.json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. 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 0db89e1afb8de..4c3650a02edc2 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 @@ -9,8 +9,7 @@ */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Delete.json + * x-ms-original-file: 2023-09-01/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 85f3661839764..2c7bd809c49ba 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 @@ -9,7 +9,7 @@ */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Get.json + * x-ms-original-file: 2023-09-01/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 ccb6906c45cfa..2e9840f7ba7b4 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 @@ -9,7 +9,7 @@ */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_List.json + * x-ms-original-file: 2023-09-01/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 2aa70ada3c2e2..36fb4cbcd554e 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 @@ -15,8 +15,7 @@ */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PlacementPolicies_Update.json + * x-ms-original-file: 2023-09-01/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 735c044008b30..1f408cf052281 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 @@ -4,6 +4,8 @@ package com.azure.resourcemanager.avs.generated; +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.Sku; @@ -16,8 +18,7 @@ */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. @@ -37,6 +38,29 @@ public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.Avs .create(); } + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_CreateOrUpdate_Stretched.json + */ + /** + * Sample code: PrivateClouds_CreateOrUpdate_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsCreateOrUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds() + .define("cloud1") + .withRegion("eastus2") + .withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")) + .withTags(mapOf()) + .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) { 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 e8298c35a8001..f74012d575712 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 @@ -9,7 +9,7 @@ */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Delete.json + * x-ms-original-file: 2023-09-01/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 711c342163e6c..422068808cd73 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 @@ -9,7 +9,7 @@ */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Get.json + * x-ms-original-file: 2023-09-01/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. @@ -19,4 +19,16 @@ public final class PrivateCloudsGetByResourceGroupSamples { public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager manager) { manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_Get_Stretched.json + */ + /** + * Sample code: PrivateClouds_Get_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsGetStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } } 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 ce4ac12400ab2..912647f5371c3 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 @@ -9,8 +9,7 @@ */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: 2023-09-01/PrivateClouds_ListAdminCredentials.json */ /** * Sample code: PrivateClouds_ListAdminCredentials. 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 79301dacaabe2..f4888704a40e0 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 @@ -9,7 +9,7 @@ */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_List.json + * x-ms-original-file: 2023-09-01/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. @@ -19,4 +19,16 @@ public final class PrivateCloudsListByResourceGroupSamples { public static void privateCloudsList(com.azure.resourcemanager.avs.AvsManager manager) { manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_List_Stretched.json + */ + /** + * Sample code: PrivateClouds_List_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsListStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); + } } 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 ce4eeaeff954e..fe504809a978b 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 @@ -9,8 +9,7 @@ */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_ListInSubscription.json + * x-ms-original-file: 2023-09-01/PrivateClouds_ListInSubscription.json */ /** * Sample code: PrivateClouds_ListInSubscription. @@ -20,4 +19,16 @@ public final class PrivateCloudsListSamples { public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { manager.privateClouds().list(com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_ListInSubscription_Stretched.json + */ + /** + * Sample code: PrivateClouds_ListInSubscription_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsListInSubscriptionStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().list(com.azure.core.util.Context.NONE); + } } 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 516dd157deb4e..8164f1b0e498d 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 @@ -9,8 +9,7 @@ */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: 2023-09-01/PrivateClouds_RotateNsxtPassword.json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. 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 37e9f2c2e2c49..0bf05f7fb4bae 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,8 +9,7 @@ */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: 2023-09-01/PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. 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 d9855b0745b5e..3ef6fdf94d56a 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 @@ -17,7 +17,7 @@ */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/PrivateClouds_Update.json + * x-ms-original-file: 2023-09-01/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. @@ -37,4 +37,19 @@ public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager .withKeyVaultUrl("fakeTokenPlaceholder"))) .apply(); } + + /* + * x-ms-original-file: 2023-09-01/PrivateClouds_Update_Stretched.json + */ + /** + * Sample code: PrivateClouds_Update_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { + PrivateCloud resource = manager.privateClouds() + .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withManagementCluster(new ManagementCluster().withClusterSize(4)).apply(); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java index aa56cd829f728..679e1ee08e02b 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 @@ -9,7 +9,7 @@ */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptCmdlets_Get.json + * x-ms-original-file: 2023-09-01/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 e1766cd9f2fe0..94aa48e6ec447 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 @@ -9,7 +9,7 @@ */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptCmdlets_List.json + * x-ms-original-file: 2023-09-01/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 5c50d779a52fb..02ca2420899f5 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 @@ -13,8 +13,7 @@ */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: 2023-09-01/ScriptExecutions_CreateOrUpdate.json */ /** * Sample code: ScriptExecutions_CreateOrUpdate. 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 c590bfe9df601..e93310ceaaa2f 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 @@ -9,8 +9,7 @@ */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_Delete.json + * x-ms-original-file: 2023-09-01/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 603de6272b4a0..7af4f8aab76fa 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 @@ -12,8 +12,7 @@ */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: 2023-09-01/ScriptExecutions_GetExecutionLogs.json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. 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 bf38624b65e48..1c73dbbf16584 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 @@ -9,7 +9,7 @@ */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_Get.json + * x-ms-original-file: 2023-09-01/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 5a1d7a66607cd..62fee2a96ac79 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 @@ -9,7 +9,7 @@ */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptExecutions_List.json + * x-ms-original-file: 2023-09-01/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 98629fafecf0e..19d3459e59286 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 @@ -9,7 +9,7 @@ */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_Get.json + * x-ms-original-file: 2023-09-01/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 d49cb339e8f2a..27c0b803c92a1 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 @@ -9,7 +9,7 @@ */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/ScriptPackages_List.json + * x-ms-original-file: 2023-09-01/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. 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 784edb01eafcc..6f445a8908276 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 @@ -9,7 +9,7 @@ */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_Get.json + * x-ms-original-file: 2023-09-01/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 0a83950edafc7..1f75c5c89e6a1 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 @@ -9,7 +9,7 @@ */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_List.json + * x-ms-original-file: 2023-09-01/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 60447a8fe5dfd..390fd2255871f 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 @@ -12,8 +12,7 @@ */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/VirtualMachines_RestrictMovement.json + * x-ms-original-file: 2023-09-01/VirtualMachines_RestrictMovement.json */ /** * Sample code: VirtualMachines_RestrictMovement. 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 7942d907a1a65..5318f3540c7fa 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 @@ -11,8 +11,7 @@ */ public final class WorkloadNetworksCreateDhcpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDhcp.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateDhcp.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. @@ -22,7 +21,7 @@ public final class WorkloadNetworksCreateDhcpSamples { public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDhcp("dhcp1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1") .withRevision(1L) .withServerAddress("40.1.5.1/24") 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 db65e3183bfeb..3bca1c2055ae2 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 @@ -12,8 +12,7 @@ */ public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsService.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateDnsService.json */ /** * Sample code: WorkloadNetworks_CreateDnsService. @@ -23,7 +22,7 @@ public final class WorkloadNetworksCreateDnsServiceSamples { public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDnsService("dnsService1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("dnsService1") .withDnsServiceIp("5.5.5.5") .withDefaultDnsZone("defaultDnsZone1") 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 2ce9039aa855c..a692751dce4c0 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 @@ -11,8 +11,7 @@ */ public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateDnsZone.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateDnsZone.json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. @@ -22,7 +21,7 @@ public final class WorkloadNetworksCreateDnsZoneSamples { public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineDnsZone("dnsZone1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("dnsZone1") .withDomain(Arrays.asList()) .withDnsServerIps(Arrays.asList("1.1.1.1")) 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 254f01f339d8f..6cf645277cc96 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,8 +11,7 @@ */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreatePortMirroring.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. @@ -22,7 +21,7 @@ public final class WorkloadNetworksCreatePortMirroringSamples { public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .definePortMirroring("portMirroring1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("portMirroring1") .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) .withSource("vmGroup1") 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 614b73f06cdda..1e628f38e4b72 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 @@ -5,12 +5,11 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworks CreatePublicIP. + * Samples for WorkloadNetworks CreatePublicIp. */ -public final class WorkloadNetworksCreatePublicIPSamples { +public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreatePublicIP.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreatePublicIP.json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. @@ -19,8 +18,8 @@ public final class WorkloadNetworksCreatePublicIPSamples { */ public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .definePublicIP("publicIP1") - .withExistingPrivateCloud("group1", "cloud1") + .definePublicIp("publicIP1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("publicIP1") .withNumberOfPublicIPs(32L) .create(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java index ee83f47100613..fd24142bf8e2e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentSamples.java @@ -12,8 +12,7 @@ */ public final class WorkloadNetworksCreateSegmentSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateSegments.json */ /** * Sample code: WorkloadNetworks_CreateSegments. @@ -23,7 +22,7 @@ public final class WorkloadNetworksCreateSegmentSamples { public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() .defineSegment("segment1") - .withExistingPrivateCloud("group1", "cloud1") + .withExistingWorkloadNetwork("group1", "cloud1", null) .withDisplayName("segment1") .withConnectedGateway("/infra/tier-1s/gateway") .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) 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 76ee167004457..d680ee269e279 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_CreateVMGroup.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_CreateVMGroup.json */ /** * Sample code: WorkloadNetworks_CreateVMGroup. @@ -18,6 +17,9 @@ public final class WorkloadNetworksCreateVMGroupSamples { * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().defineVMGroup("vmGroup1").withExistingPrivateCloud("group1", "cloud1").create(); + manager.workloadNetworks() + .defineVMGroup("vmGroup1") + .withExistingWorkloadNetwork("group1", "cloud1", null) + .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java index a0136f0a77906..55f0964ae2154 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDhcp.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteDhcp.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. @@ -18,6 +17,6 @@ public final class WorkloadNetworksDeleteDhcpSamples { * @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); + manager.workloadNetworks().deleteDhcp("group1", "cloud1", null, "dhcp1", com.azure.core.util.Context.NONE); } } 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 46045808df2cc..80f911798e291 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksDeleteDnsServiceSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsService.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteDnsService.json */ /** * Sample code: WorkloadNetworks_DeleteDnsService. 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 7dd438a13588a..3aac62c89d403 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteDnsZone.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteDnsZone.json */ /** * Sample code: WorkloadNetworks_DeleteDnsZone. 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 004215f222580..27d4638ac918c 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,8 +9,7 @@ */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeletePortMirroring.json */ /** * Sample code: WorkloadNetworks_DeletePortMirroring. 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 3d99b8cfec69e..de590aaf117c7 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 @@ -5,12 +5,11 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworks DeletePublicIP. + * Samples for WorkloadNetworks DeletePublicIp. */ -public final class WorkloadNetworksDeletePublicIPSamples { +public final class WorkloadNetworksDeletePublicIpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeletePublicIP.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeletePublicIP.json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. @@ -18,6 +17,6 @@ public final class WorkloadNetworksDeletePublicIPSamples { * @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); + manager.workloadNetworks().deletePublicIp("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); } } 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 a881d250b2612..6157b021ff2e7 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksDeleteSegmentSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteSegment.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteSegment.json */ /** * Sample code: WorkloadNetworks_DeleteSegment. @@ -18,6 +17,7 @@ public final class WorkloadNetworksDeleteSegmentSamples { * @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); + manager.workloadNetworks() + .deleteSegment("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); } } 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 b37fb6c3591a7..33e96f4a784cf 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_DeleteVMGroup.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_DeleteVMGroup.json */ /** * Sample code: WorkloadNetworks_DeleteVMGroup. 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 71d91ef04f5af..af258ade33e73 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDhcp.json + * x-ms-original-file: 2023-09-01/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 a3c3bd7bcb5f4..dc96930cd9061 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsService.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetDnsService.json */ /** * Sample code: WorkloadNetworks_GetDnsService. @@ -19,6 +18,6 @@ public final class WorkloadNetworksGetDnsServiceSamples { */ public static void workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); + .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java index 7468c4b6d09c2..9119dde3a2e3b 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetDnsZone.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetDnsZone.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. @@ -19,6 +18,6 @@ public final class WorkloadNetworksGetDnsZoneSamples { */ public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); + .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java index 9764bbf374593..6ca4de6b65b9f 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksGetGatewaySamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetGateway.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. @@ -19,6 +18,6 @@ public final class WorkloadNetworksGetGatewaySamples { */ public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getGatewayWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); + .getGatewayWithResponse("group1", "cloud1", null, "gateway1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java index 7bbfab2540c2e..a4b30f8df574e 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetPortMirroring.json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. @@ -19,6 +18,6 @@ public final class WorkloadNetworksGetPortMirroringSamples { */ public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); + .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIPSamples.java index 4f8c1c88ede1c..513b3818d75f5 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 @@ -5,12 +5,11 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworks GetPublicIP. + * Samples for WorkloadNetworks GetPublicIp. */ -public final class WorkloadNetworksGetPublicIPSamples { +public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetPublicIP.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetPublicIP.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. @@ -19,6 +18,6 @@ public final class WorkloadNetworksGetPublicIPSamples { */ public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getPublicIPWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); + .getPublicIpWithResponse("group1", "cloud1", null, "publicIP1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java index 330f7c14d3f16..0618a3ec89de1 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 @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_Get.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_Get.json */ /** * Sample code: WorkloadNetworks_Get. @@ -17,6 +17,6 @@ public final class WorkloadNetworksGetSamples { * @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); + manager.workloadNetworks().getWithResponse("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java index b869e28121648..e1d5deff8e16d 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetSegment.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetSegment.json */ /** * Sample code: WorkloadNetworks_GetSegment. @@ -19,6 +18,6 @@ public final class WorkloadNetworksGetSegmentSamples { */ public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java index c5fe6c5436e11..ce403e012b265 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksGetVMGroupSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVMGroup.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetVMGroup.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. @@ -19,6 +18,6 @@ public final class WorkloadNetworksGetVMGroupSamples { */ public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); + .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java index 1ffc781982ded..704ecf6f0627a 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksGetVirtualMachineSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_GetVirtualMachine.json */ /** * Sample code: WorkloadNetworks_GetVirtualMachine. @@ -19,6 +18,6 @@ public final class WorkloadNetworksGetVirtualMachineSamples { */ public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .getVirtualMachineWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); + .getVirtualMachineWithResponse("group1", "cloud1", null, "vm1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java index d6aa6028e7b61..c6df4c634fd54 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksListDhcpSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDhcp.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListDhcp.json */ /** * Sample code: WorkloadNetworks_ListDhcp. @@ -18,6 +17,6 @@ public final class WorkloadNetworksListDhcpSamples { * @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); + manager.workloadNetworks().listDhcp("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } 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 ccc7aba5d323c..24d16711729f9 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksListDnsServicesSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListDnsServices.json */ /** * Sample code: WorkloadNetworks_ListDnsServices. @@ -18,6 +17,6 @@ public final class WorkloadNetworksListDnsServicesSamples { * @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); + manager.workloadNetworks().listDnsServices("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } 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 ae4a063c9f614..c74950bf52317 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksListDnsZonesSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. @@ -18,6 +17,6 @@ public final class WorkloadNetworksListDnsZonesSamples { * @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); + manager.workloadNetworks().listDnsZones("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } 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 0a44150ae976b..4a45358671a14 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListGateways.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. @@ -18,6 +17,6 @@ public final class WorkloadNetworksListGatewaysSamples { * @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); + manager.workloadNetworks().listGateways("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } 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 a8ff0a1586959..e928f321298a9 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksListPortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListPortMirroring.json */ /** * Sample code: WorkloadNetworks_ListPortMirroring. @@ -18,6 +17,6 @@ public final class WorkloadNetworksListPortMirroringSamples { * @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); + manager.workloadNetworks().listPortMirroring("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } 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 167687973fdb1..7ebdc21f49d5e 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 @@ -5,12 +5,11 @@ package com.azure.resourcemanager.avs.generated; /** - * Samples for WorkloadNetworks ListPublicIPs. + * Samples for WorkloadNetworks ListPublicIps. */ -public final class WorkloadNetworksListPublicIPsSamples { +public final class WorkloadNetworksListPublicIpsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListPublicIPs.json */ /** * Sample code: WorkloadNetworks_ListPublicIPs. @@ -18,6 +17,6 @@ public final class WorkloadNetworksListPublicIPsSamples { * @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); + manager.workloadNetworks().listPublicIps("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } 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 4acc7badb600f..06cd2407ed047 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 @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListSamples { /* - * x-ms-original-file: specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_List.json + * x-ms-original-file: 2023-09-01/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 0e8c5a2c73704..7eb9313d40e91 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListSegments.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. @@ -18,6 +17,6 @@ public final class WorkloadNetworksListSegmentsSamples { * @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); + manager.workloadNetworks().listSegments("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } 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 8344435748828..b833e19e6e192 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 @@ -9,8 +9,7 @@ */ public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. @@ -18,6 +17,6 @@ public final class WorkloadNetworksListVMGroupsSamples { * @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); + manager.workloadNetworks().listVMGroups("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } 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 ec6af352fa6e7..d9602593cb7d1 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,8 +9,7 @@ */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_ListVirtualMachines.json */ /** * Sample code: WorkloadNetworks_ListVirtualMachines. @@ -18,6 +17,6 @@ public final class WorkloadNetworksListVirtualMachinesSamples { * @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); + manager.workloadNetworks().listVirtualMachines("group1", "cloud1", null, com.azure.core.util.Context.NONE); } } 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 deleted file mode 100644 index 15f50b1a67704..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.avs.generated; - -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; - -/** - * Samples for WorkloadNetworks UpdateDhcp. - */ -public final class WorkloadNetworksUpdateDhcpSamples { - /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDhcp.json - */ - /** - * Sample code: WorkloadNetworks_UpdateDhcp. - * - * @param manager Entry point to AvsManager. - */ - public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDhcp resource = manager.workloadNetworks() - .getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties( - new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400L)) - .apply(); - } -} 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 dee30a4fc79d8..1eef1c4a98e3e 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 @@ -13,8 +13,7 @@ */ public final class WorkloadNetworksUpdateDnsServiceSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDnsService.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdateDnsService.json */ /** * Sample code: WorkloadNetworks_UpdateDnsService. @@ -23,7 +22,7 @@ public final class WorkloadNetworksUpdateDnsServiceSamples { */ public static void workloadNetworksUpdateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkDnsService resource = manager.workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE) + .getDnsServiceWithResponse("group1", "cloud1", null, "dnsService1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsService1") 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 58d7a4f11ca07..fec2f14848de8 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 @@ -12,8 +12,7 @@ */ public final class WorkloadNetworksUpdateDnsZoneSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateDnsZone.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdateDnsZone.json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. @@ -22,7 +21,7 @@ public final class WorkloadNetworksUpdateDnsZoneSamples { */ public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkDnsZone resource = manager.workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE) + .getDnsZoneWithResponse("group1", "cloud1", null, "dnsZone1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDisplayName("dnsZone1") 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 a104f86d757af..b86335da2b025 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,8 +12,7 @@ */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdatePortMirroring.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdatePortMirroring.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. @@ -22,7 +21,7 @@ public final class WorkloadNetworksUpdatePortMirroringSamples { */ public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkPortMirroring resource = manager.workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) + .getPortMirroringWithResponse("group1", "cloud1", null, "portMirroring1", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java index f6e23c523516a..c8c5809dba247 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentSamples.java @@ -11,8 +11,7 @@ */ public final class WorkloadNetworksUpdateSegmentSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdateSegments.json */ /** * Sample code: WorkloadNetworks_UpdateSegments. @@ -21,7 +20,7 @@ public final class WorkloadNetworksUpdateSegmentSamples { */ public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkSegment resource = manager.workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) + .getSegmentWithResponse("group1", "cloud1", null, "segment1", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java index 6bf6950349e74..6ebdd5eb0d046 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 @@ -12,8 +12,7 @@ */ public final class WorkloadNetworksUpdateVMGroupSamples { /* - * x-ms-original-file: - * specification/vmware/Microsoft.AVS.Management/examples/2023-09-01/WorkloadNetworks_UpdateVMGroup.json + * x-ms-original-file: 2023-09-01/WorkloadNetworks_UpdateVMGroup.json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup. @@ -22,7 +21,7 @@ public final class WorkloadNetworksUpdateVMGroupSamples { */ public static void workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { WorkloadNetworkVMGroup resource = manager.workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) + .getVMGroupWithResponse("group1", "cloud1", null, "vmGroup1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java index fc9ad39c0d99a..6f83330019136 100644 --- 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 @@ -12,15 +12,15 @@ public final class AddonArcPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonArcProperties model - = BinaryData.fromString("{\"addonType\":\"Arc\",\"vCenter\":\"sz\",\"provisioningState\":\"Succeeded\"}") + = BinaryData.fromString("{\"addonType\":\"Arc\",\"vCenter\":\"hxw\",\"provisioningState\":\"Succeeded\"}") .toObject(AddonArcProperties.class); - Assertions.assertEquals("sz", model.vCenter()); + Assertions.assertEquals("hxw", model.vCenter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonArcProperties model = new AddonArcProperties().withVCenter("sz"); + AddonArcProperties model = new AddonArcProperties().withVCenter("hxw"); model = BinaryData.fromObject(model).toObject(AddonArcProperties.class); - Assertions.assertEquals("sz", model.vCenter()); + Assertions.assertEquals("hxw", 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 index 9dab1f86e4f5c..b5ec19a965364 100644 --- 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 @@ -12,15 +12,15 @@ public final class AddonHcxPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonHcxProperties model - = BinaryData.fromString("{\"addonType\":\"HCX\",\"offer\":\"jervtia\",\"provisioningState\":\"Failed\"}") + = BinaryData.fromString("{\"addonType\":\"HCX\",\"offer\":\"bzpfzab\",\"provisioningState\":\"Failed\"}") .toObject(AddonHcxProperties.class); - Assertions.assertEquals("jervtia", model.offer()); + Assertions.assertEquals("bzpfzab", model.offer()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonHcxProperties model = new AddonHcxProperties().withOffer("jervtia"); + AddonHcxProperties model = new AddonHcxProperties().withOffer("bzpfzab"); model = BinaryData.fromObject(model).toObject(AddonHcxProperties.class); - Assertions.assertEquals("jervtia", model.offer()); + Assertions.assertEquals("bzpfzab", 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 index e01043bc81917..e2eecf1a228ef 100644 --- 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 @@ -12,7 +12,7 @@ public final class AddonInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonInner model = BinaryData.fromString( - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"rodtjinfwjlfl\",\"name\":\"kacjvefkdlfo\",\"type\":\"kggkfpa\"}") + "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"jancu\",\"name\":\"rhdwbavxbniw\",\"type\":\"jswztsdbpg\"}") .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 index 532901e961325..fc8929eac5850 100644 --- 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 @@ -12,8 +12,8 @@ public final class AddonListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Cancelled\"},\"id\":\"kqb\",\"name\":\"qu\",\"type\":\"paxh\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"ivpdtiir\",\"name\":\"tdqoaxoruzfgsq\",\"type\":\"yfxrx\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"ramxjezwlwnw\",\"name\":\"uqlcvydy\",\"type\":\"atdooaojkniod\"}],\"nextLink\":\"oebwnujhemms\"}") + "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"ankxmyskpbhenb\",\"name\":\"kcxywnyt\",\"type\":\"rsyn\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"by\",\"name\":\"czfc\",\"type\":\"haaxdbabphl\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Cancelled\"},\"id\":\"ktsthsucocmny\",\"name\":\"azt\",\"type\":\"bt\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"},\"id\":\"uedck\",\"name\":\"ywbiexzfeyueax\",\"type\":\"bxu\"}],\"nextLink\":\"bhqwalmuzyoxa\"}") .toObject(AddonList.class); - Assertions.assertEquals("oebwnujhemms", model.nextLink()); + Assertions.assertEquals("bhqwalmuzyoxa", 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 index 984df8afb9dad..b74cc70828d46 100644 --- 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 @@ -11,7 +11,7 @@ public final class AddonPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AddonProperties model - = BinaryData.fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"}") + = BinaryData.fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Building\"}") .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 index a83ae07bf20bf..6029f4e9f425a 100644 --- 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 @@ -11,16 +11,16 @@ public final class AddonVrPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AddonVrProperties model - = BinaryData.fromString("{\"addonType\":\"VR\",\"vrsCount\":1554130145,\"provisioningState\":\"Deleting\"}") - .toObject(AddonVrProperties.class); - Assertions.assertEquals(1554130145, model.vrsCount()); + AddonVrProperties model = BinaryData + .fromString("{\"addonType\":\"VR\",\"vrsCount\":1275335894,\"provisioningState\":\"Succeeded\"}") + .toObject(AddonVrProperties.class); + Assertions.assertEquals(1275335894, model.vrsCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AddonVrProperties model = new AddonVrProperties().withVrsCount(1554130145); + AddonVrProperties model = new AddonVrProperties().withVrsCount(1275335894); model = BinaryData.fromObject(model).toObject(AddonVrProperties.class); - Assertions.assertEquals(1554130145, model.vrsCount()); + Assertions.assertEquals(1275335894, 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 index 3ba074494e4af..325740d309225 100644 --- 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 @@ -21,7 +21,7 @@ public final class AddonsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"fifhxwrsnew\",\"name\":\"ozqvbubqmam\",\"type\":\"sycxhxzgaz\"}"; + = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"hriypoqeyhlqhy\",\"name\":\"prlpy\",\"type\":\"nuciqdsmexiit\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,8 +31,8 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Addon response = manager.addons() - .define("ogphuartvtiu") - .withExistingPrivateCloud("foiyjwpfilk", "kkholvdndvia") + .define("uyxoaf") + .withExistingPrivateCloud("qqxlajr", "wxacevehj") .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 index 04c57c6263fb4..4345543505ab6 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.addons().delete("xoe", "qinjipnwjf", "jqlafcbahhpzp", com.azure.core.util.Context.NONE); + manager.addons().delete("qgleohibetnluank", "rfxeeebtij", "acvbmqz", 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 index 40c81c46b64b6..b39facc42c5d8 100644 --- 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 @@ -20,7 +20,7 @@ public final class AddonsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"wjedmurrxxgew\",\"name\":\"ktvqylkmqpzoy\",\"type\":\"lfbcgwgcl\"}"; + = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Cancelled\"},\"id\":\"ojeevy\",\"name\":\"yhsgz\",\"type\":\"czbgomfgbeg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Addon response = manager.addons() - .getWithResponse("dkvgfabuiyjibuzp", "dugneiknp", "oxgjiuqhibt", com.azure.core.util.Context.NONE) + .getWithResponse("ctfnmdxotng", "dgug", "yzihgrkyuizabsn", 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 index 04e1a79b9d16b..52310e01b3f40 100644 --- 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 @@ -21,7 +21,7 @@ public final class AddonsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Cancelled\"},\"id\":\"swvxwlmzqwmv\",\"name\":\"xnjmxm\",\"type\":\"uqudtcvclxyn\"}]}"; + = "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"sccbiuimzd\",\"name\":\"yjdfqwmky\",\"type\":\"qufdvruzslzojh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,7 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.addons().list("vmribiat", "gplucfotangcfhny", com.azure.core.util.Context.NONE); + PagedIterable response = manager.addons().list("rjtloq", "fuojrngif", 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 index b87cca7611437..9eb6e420d7e78 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.authorizations().delete("jrajcivm", "ghfcfiwrxgkneuvy", "nzqodfvpg", com.azure.core.util.Context.NONE); + manager.authorizations().delete("mwmqtibx", "ijddtvqc", "tad", com.azure.core.util.Context.NONE); } } 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 index db8cd6890a4e4..07b525e0f8c0d 100644 --- 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 @@ -12,15 +12,15 @@ public final class CloudLinkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Deleting\",\"linkedCloud\":\"vayffimrzrt\"},\"id\":\"qogsexnevfd\",\"name\":\"wnwmewzs\",\"type\":\"yceuzsoib\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Deleting\",\"linkedCloud\":\"rgvtqag\"},\"id\":\"uynhijg\",\"name\":\"mebf\",\"type\":\"iarbutrcvpna\"}") .toObject(CloudLinkInner.class); - Assertions.assertEquals("vayffimrzrt", model.linkedCloud()); + Assertions.assertEquals("rgvtqag", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkInner model = new CloudLinkInner().withLinkedCloud("vayffimrzrt"); + CloudLinkInner model = new CloudLinkInner().withLinkedCloud("rgvtqag"); model = BinaryData.fromObject(model).toObject(CloudLinkInner.class); - Assertions.assertEquals("vayffimrzrt", model.linkedCloud()); + Assertions.assertEquals("rgvtqag", 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 index 959612d1c009c..55d540f1fdff7 100644 --- 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 @@ -12,9 +12,9 @@ public final class CloudLinkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Failed\",\"linkedCloud\":\"tcs\"},\"id\":\"cktqumiekkezzi\",\"name\":\"hlyfjhdgqgg\",\"type\":\"bdunygaeqid\"},{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Disconnected\",\"linkedCloud\":\"llrxcyjmoad\"},\"id\":\"varmywdmj\",\"name\":\"jqbjhhy\",\"type\":\"xrwlyc\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Disconnected\",\"linkedCloud\":\"kgymareqnajxqug\"},\"id\":\"ky\",\"name\":\"ubeddg\",\"type\":\"sofwqmzqalkrmnji\"}],\"nextLink\":\"xacqqudfnbyx\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Active\",\"linkedCloud\":\"mpvecxgodebfqk\"},\"id\":\"bmpukgriwflz\",\"name\":\"fbxzpuzycisp\",\"type\":\"qzahmgkbrp\"}],\"nextLink\":\"dhibnuq\"}") .toObject(CloudLinkList.class); - Assertions.assertEquals("tcs", model.value().get(0).linkedCloud()); - Assertions.assertEquals("xacqqudfnbyx", model.nextLink()); + Assertions.assertEquals("mpvecxgodebfqk", model.value().get(0).linkedCloud()); + Assertions.assertEquals("dhibnuq", 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 index b4f81c7d08f86..85e2b65b0da1c 100644 --- 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 @@ -12,15 +12,15 @@ public final class CloudLinkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CloudLinkProperties model = BinaryData - .fromString("{\"provisioningState\":\"Succeeded\",\"status\":\"Disconnected\",\"linkedCloud\":\"xtrthz\"}") + .fromString("{\"provisioningState\":\"Failed\",\"status\":\"Deleting\",\"linkedCloud\":\"unmpxttd\"}") .toObject(CloudLinkProperties.class); - Assertions.assertEquals("xtrthz", model.linkedCloud()); + Assertions.assertEquals("unmpxttd", model.linkedCloud()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("xtrthz"); + CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("unmpxttd"); model = BinaryData.fromObject(model).toObject(CloudLinkProperties.class); - Assertions.assertEquals("xtrthz", model.linkedCloud()); + Assertions.assertEquals("unmpxttd", 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 index e0632a8852e97..3785a1c3d23aa 100644 --- 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 @@ -21,7 +21,7 @@ public final class CloudLinksCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Deleting\",\"linkedCloud\":\"iibakcl\"},\"id\":\"jfrnxousxauzlwv\",\"name\":\"gmwohqfzizvu\",\"type\":\"mmkjsvthnwpztek\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Building\",\"linkedCloud\":\"gydcw\"},\"id\":\"xjumvq\",\"name\":\"olihrra\",\"type\":\"ouau\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); CloudLink response = manager.cloudLinks() - .define("vkhlggdhbemz") - .withExistingPrivateCloud("kfvxcnq", "xqpswok") - .withLinkedCloud("iwtglxxhljfpg") + .define("uxswqrntvl") + .withExistingPrivateCloud("chzyvlixqnrk", "xkjibnxmy") + .withLinkedCloud("exoqqpwcyyufm") .create(); - Assertions.assertEquals("iibakcl", response.linkedCloud()); + Assertions.assertEquals("gydcw", 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 index 1ec44341e0ed5..3fd2f64f5f430 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.cloudLinks().delete("hgovfgp", "kqmhhaowjr", "zvuporqzdfuydz", com.azure.core.util.Context.NONE); + manager.cloudLinks().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/CloudLinksGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java index e20fa18dc661f..908971421d8b0 100644 --- 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 @@ -21,7 +21,7 @@ public final class CloudLinksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Building\",\"linkedCloud\":\"ubcpzgpxti\"},\"id\":\"j\",\"name\":\"nidibgqjxg\",\"type\":\"n\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Deleting\",\"linkedCloud\":\"bbelawumuaslzk\"},\"id\":\"rwoycqucwyh\",\"name\":\"hnomdrkywuh\",\"type\":\"svfuurutlwexxwl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); CloudLink response = manager.cloudLinks() - .getWithResponse("nkvxlxpaglqi", "bgkc", "khpzvuqdflv", com.azure.core.util.Context.NONE) + .getWithResponse("oldforobw", "lvizb", "hfovvacqpbtu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ubcpzgpxti", response.linkedCloud()); + Assertions.assertEquals("bbelawumuaslzk", 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 index de9ce779b9d2d..250b2c2a48974 100644 --- 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 @@ -22,7 +22,7 @@ public final class CloudLinksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Building\",\"linkedCloud\":\"hckfkyjpmspbps\"},\"id\":\"fppyogtieyujtvcz\",\"name\":\"cnyxrxmunjd\",\"type\":\"vg\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Active\",\"linkedCloud\":\"fdgnwncypuuwwlt\"},\"id\":\"qjctzenkeif\",\"name\":\"zhmkdasvflyh\",\"type\":\"xcudchxgsr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.cloudLinks().list("xqszdtmaajquh", "xylrjvmtygjbmz", com.azure.core.util.Context.NONE); + = manager.cloudLinks().list("lpmjerb", "kelvidizozsdb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hckfkyjpmspbps", response.iterator().next().linkedCloud()); + Assertions.assertEquals("fdgnwncypuuwwlt", response.iterator().next().linkedCloud()); } } 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 index 4adc81db767ca..0407118906b9e 100644 --- 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 @@ -24,7 +24,7 @@ public final class ClustersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"clusterSize\":687861741,\"provisioningState\":\"Succeeded\",\"clusterId\":1053518025,\"hosts\":[\"vluwmncsttij\",\"y\",\"vpo\"],\"vsanDatastoreName\":\"rsg\"},\"sku\":{\"name\":\"gbdhuzqgnjdg\",\"tier\":\"Premium\",\"size\":\"cli\",\"family\":\"zvhxnk\",\"capacity\":144563900},\"id\":\"u\",\"name\":\"otppnv\",\"type\":\"xz\"}"; + = "{\"properties\":{\"clusterSize\":1623870921,\"provisioningState\":\"Succeeded\",\"clusterId\":1561642293,\"hosts\":[\"mbnpqf\",\"tqlkz\",\"egnitg\"],\"vsanDatastoreName\":\"xlzyqd\"},\"sku\":{\"name\":\"fegcea\",\"tier\":\"Free\",\"size\":\"hcans\",\"family\":\"oyqhlwig\",\"capacity\":195483853},\"id\":\"kbxgom\",\"name\":\"ajuwas\",\"type\":\"vdaeyyguxakjsq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,25 +34,25 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Cluster response = manager.clusters() - .define("mlqtmldgxob") - .withExistingPrivateCloud("gzuriglaecxndt", "cokpv") - .withSku(new Sku().withName("fvjlboxqvkjlmx") - .withTier(SkuTier.FREE) - .withSize("ynhdwdigum") - .withFamily("raauzzpt") - .withCapacity(1518095696)) - .withClusterSize(1763053171) - .withHosts(Arrays.asList("ayzri")) - .withVsanDatastoreName("hya") + .define("muvgp") + .withExistingPrivateCloud("xundxgk", "twzhhzjhfjmhv") + .withSku(new Sku().withName("tilaxh") + .withTier(SkuTier.BASIC) + .withSize("lyvijouwiv") + .withFamily("oyzunbixxr") + .withCapacity(324590076)) + .withClusterSize(1059094634) + .withHosts(Arrays.asList("fbuzjyihs", "sbhud", "pohyuemslynsqyr", "foobrlttyms")) + .withVsanDatastoreName("ygqdnfwqzdz") .create(); - Assertions.assertEquals("gbdhuzqgnjdg", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("cli", response.sku().size()); - Assertions.assertEquals("zvhxnk", response.sku().family()); - Assertions.assertEquals(144563900, response.sku().capacity()); - Assertions.assertEquals(687861741, response.clusterSize()); - Assertions.assertEquals("vluwmncsttij", response.hosts().get(0)); - Assertions.assertEquals("rsg", response.vsanDatastoreName()); + Assertions.assertEquals("fegcea", response.sku().name()); + Assertions.assertEquals(SkuTier.FREE, response.sku().tier()); + Assertions.assertEquals("hcans", response.sku().size()); + Assertions.assertEquals("oyqhlwig", response.sku().family()); + Assertions.assertEquals(195483853, response.sku().capacity()); + Assertions.assertEquals(1623870921, response.clusterSize()); + Assertions.assertEquals("mbnpqf", response.hosts().get(0)); + Assertions.assertEquals("xlzyqd", 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 index b53342f54c418..6705a89a67cda 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.clusters().delete("ril", "zapeewchpx", "ktwkuziyc", com.azure.core.util.Context.NONE); + manager.clusters().delete("hdjhlimmbcx", "h", "cporxvxcjz", 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 index cc8f6a8a6854b..c3d95b75444c2 100644 --- 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 @@ -22,7 +22,7 @@ public final class ClustersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"clusterSize\":1933240221,\"provisioningState\":\"Failed\",\"clusterId\":1386214001,\"hosts\":[\"ulapzwyrp\",\"ogtqxepnylbf\",\"ajlyjtlvofqzhv\",\"cib\"],\"vsanDatastoreName\":\"mowuxrk\"},\"sku\":{\"name\":\"pvdwxf\",\"tier\":\"Premium\",\"size\":\"vwzjbhyz\",\"family\":\"jrkambtrnegvmnv\",\"capacity\":531370640},\"id\":\"vldspa\",\"name\":\"tjb\",\"type\":\"kdmflvestmjlx\"}"; + = "{\"properties\":{\"clusterSize\":1694247660,\"provisioningState\":\"Deleting\",\"clusterId\":434289365,\"hosts\":[\"nvkcdmxzrpoa\"],\"vsanDatastoreName\":\"lnwiaaomylwe\"},\"sku\":{\"name\":\"z\",\"tier\":\"Free\",\"size\":\"ethwwnpjhlfz\",\"family\":\"pchwa\",\"capacity\":1123060599},\"id\":\"usnfepgfewet\",\"name\":\"l\",\"type\":\"xgncxyk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Cluster response = manager.clusters() - .getWithResponse("xkzb", "msgeivsiykzk", "ncj", com.azure.core.util.Context.NONE) + .getWithResponse("pimaqxzhemjyh", "hujswtwkozzwcul", "bawpfajnjwltlwt", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("pvdwxf", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("vwzjbhyz", response.sku().size()); - Assertions.assertEquals("jrkambtrnegvmnv", response.sku().family()); - Assertions.assertEquals(531370640, response.sku().capacity()); - Assertions.assertEquals(1933240221, response.clusterSize()); - Assertions.assertEquals("ulapzwyrp", response.hosts().get(0)); - Assertions.assertEquals("mowuxrk", response.vsanDatastoreName()); + Assertions.assertEquals("z", response.sku().name()); + Assertions.assertEquals(SkuTier.FREE, response.sku().tier()); + Assertions.assertEquals("ethwwnpjhlfz", response.sku().size()); + Assertions.assertEquals("pchwa", response.sku().family()); + Assertions.assertEquals(1123060599, response.sku().capacity()); + Assertions.assertEquals(1694247660, response.clusterSize()); + Assertions.assertEquals("nvkcdmxzrpoa", response.hosts().get(0)); + Assertions.assertEquals("lnwiaaomylwe", 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 index 2569bc7d8aacb..4633281c2a5cc 100644 --- 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 @@ -23,7 +23,7 @@ public final class ClustersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"clusterSize\":1426712657,\"provisioningState\":\"Cancelled\",\"clusterId\":128886656,\"hosts\":[\"l\",\"chp\",\"db\"],\"vsanDatastoreName\":\"vwrdnhfukuvsj\"},\"sku\":{\"name\":\"swsmys\",\"tier\":\"Premium\",\"size\":\"qypfcv\",\"family\":\"rchpqbmfpjbabwid\",\"capacity\":1095864620},\"id\":\"spuunnoxyhkxgq\",\"name\":\"drihpfhoqcaaewda\",\"type\":\"mdjvlpj\"}]}"; + = "{\"value\":[{\"properties\":{\"clusterSize\":418488184,\"provisioningState\":\"Cancelled\",\"clusterId\":145023209,\"hosts\":[\"xapzhyrpet\"],\"vsanDatastoreName\":\"e\"},\"sku\":{\"name\":\"joxslhvnhla\",\"tier\":\"Free\",\"size\":\"kkzjcjbtrga\",\"family\":\"vvib\",\"capacity\":279366719},\"id\":\"s\",\"name\":\"oqbeitpkxzt\",\"type\":\"oobklftidgfcwq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.clusters().list("n", "ntfpmvmemfnc", com.azure.core.util.Context.NONE); + = manager.clusters().list("metttwgd", "lqxihhrmooiz", com.azure.core.util.Context.NONE); - Assertions.assertEquals("swsmys", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); - Assertions.assertEquals("qypfcv", response.iterator().next().sku().size()); - Assertions.assertEquals("rchpqbmfpjbabwid", response.iterator().next().sku().family()); - Assertions.assertEquals(1095864620, response.iterator().next().sku().capacity()); - Assertions.assertEquals(1426712657, response.iterator().next().clusterSize()); - Assertions.assertEquals("l", response.iterator().next().hosts().get(0)); - Assertions.assertEquals("vwrdnhfukuvsj", response.iterator().next().vsanDatastoreName()); + Assertions.assertEquals("joxslhvnhla", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); + Assertions.assertEquals("kkzjcjbtrga", response.iterator().next().sku().size()); + Assertions.assertEquals("vvib", response.iterator().next().sku().family()); + Assertions.assertEquals(279366719, response.iterator().next().sku().capacity()); + Assertions.assertEquals(418488184, response.iterator().next().clusterSize()); + Assertions.assertEquals("xapzhyrpet", response.iterator().next().hosts().get(0)); + Assertions.assertEquals("e", 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 index 3578bd3d3dea5..af8b76f84f5d2 100644 --- 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 @@ -20,7 +20,7 @@ public final class ClustersListZonesWithResponseMockTests { @Test public void testListZonesWithResponse() throws Exception { String responseStr - = "{\"zones\":[{\"hosts\":[\"gl\",\"dzgkr\"],\"zone\":\"eevt\"},{\"hosts\":[\"r\"],\"zone\":\"t\"},{\"hosts\":[\"tpzdmovzvfvaawzq\"],\"zone\":\"f\"}]}"; + = "{\"zones\":[{\"hosts\":[\"m\",\"ghfcfiwrxgkneuvy\",\"nzqodfvpg\",\"hoxgsgbpf\"],\"zone\":\"djtxvzflbq\"},{\"hosts\":[\"qvlgafcqusrdvetn\",\"sdtutnwlduyc\",\"uzhyrmewipmvekdx\"],\"zone\":\"uqgsj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testListZonesWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ClusterZoneList response = manager.clusters() - .listZonesWithResponse("levufuztcktyhj", "qedcgzulwm", "rqzz", com.azure.core.util.Context.NONE) + .listZonesWithResponse("qizxfpxtgqscjavf", "juhdqazkmtgguwpi", "r", com.azure.core.util.Context.NONE) .getValue(); } 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 index 143833b2880da..cd84a2972633e 100644 --- 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 @@ -25,7 +25,7 @@ public final class DatastoresCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"t\"},\"diskPoolVolume\":{\"targetId\":\"dslqxihhrmooizqs\",\"lunName\":\"ypxiutcxap\",\"mountOption\":\"MOUNT\",\"path\":\"petogebjox\"},\"elasticSanVolume\":{\"targetId\":\"hvnh\"},\"status\":\"Unknown\"},\"id\":\"q\",\"name\":\"kkzjcjbtrga\",\"type\":\"hvv\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"jsvg\"},\"diskPoolVolume\":{\"targetId\":\"whryvycytdcl\",\"lunName\":\"gc\",\"mountOption\":\"MOUNT\",\"path\":\"nwm\"},\"elasticSanVolume\":{\"targetId\":\"mvpdvjdhttzaef\"},\"status\":\"LostCommunication\"},\"id\":\"hchrphkmcrjdqn\",\"name\":\"dfzpbgtgkylkdg\",\"type\":\"rjeuut\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,19 +35,18 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Datastore response = manager.datastores() - .define("teyowclu") - .withExistingCluster("cuplcplcwkhih", "hlhzdsqtzbsrgno", "cjhfgmvecactxmw") - .withNetAppVolume(new NetAppVolume().withId("qvgqouw")) - .withDiskPoolVolume(new DiskPoolVolume().withTargetId("zmpjwyiv") - .withLunName("ikf") - .withMountOption(MountOptionEnum.ATTACH)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("kteusqczk")) + .define("zrcxfailcfxwmdbo") + .withExistingCluster("z", "mes", "kdlpa") + .withNetAppVolume(new NetAppVolume().withId("ft")) + .withDiskPoolVolume( + new DiskPoolVolume().withTargetId("qobr").withLunName("lnacgcc").withMountOption(MountOptionEnum.MOUNT)) + .withElasticSanVolume(new ElasticSanVolume().withTargetId("rzvul")) .create(); - Assertions.assertEquals("t", response.netAppVolume().id()); - Assertions.assertEquals("dslqxihhrmooizqs", response.diskPoolVolume().targetId()); - Assertions.assertEquals("ypxiutcxap", response.diskPoolVolume().lunName()); + Assertions.assertEquals("jsvg", response.netAppVolume().id()); + Assertions.assertEquals("whryvycytdcl", response.diskPoolVolume().targetId()); + Assertions.assertEquals("gc", response.diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.MOUNT, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("hvnh", response.elasticSanVolume().targetId()); + Assertions.assertEquals("mvpdvjdhttzaef", 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 index 3be3a4c511f63..f4143a2646446 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.datastores().delete("nbtgkbugrjqctoj", "mi", "of", "eypefojyqd", com.azure.core.util.Context.NONE); + manager.datastores().delete("slhhxudbxv", "d", "tnsi", "ud", 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 index cd551340a1ee0..3338e7cf74caa 100644 --- 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 @@ -22,7 +22,7 @@ public final class DatastoresGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"netAppVolume\":{\"id\":\"hycav\"},\"diskPoolVolume\":{\"targetId\":\"ggxdb\",\"lunName\":\"esmi\",\"mountOption\":\"ATTACH\",\"path\":\"ra\"},\"elasticSanVolume\":{\"targetId\":\"aawiuagydwqfb\"},\"status\":\"Detached\"},\"id\":\"fgiagtcojocqwo\",\"name\":\"fnzjvusfzldm\",\"type\":\"zuxylfsbtkadpyso\"}"; + = "{\"properties\":{\"provisioningState\":\"Cancelled\",\"netAppVolume\":{\"id\":\"de\"},\"diskPoolVolume\":{\"targetId\":\"vecuijpx\",\"lunName\":\"xs\",\"mountOption\":\"ATTACH\",\"path\":\"tujwsawdd\"},\"elasticSanVolume\":{\"targetId\":\"babxvitit\"},\"status\":\"Unknown\"},\"id\":\"exavoxt\",\"name\":\"glecdmdqbwpypq\",\"type\":\"gsfjac\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Datastore response = manager.datastores() - .getWithResponse("fcjnaeoisrvhmgor", "fukiscvwmzhw", "lefaxvxilcbtgn", "nzeyqxtjj", - com.azure.core.util.Context.NONE) + .getWithResponse("xcktpiymerteeamm", "qiekkkzddrt", "g", "ojbmxv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hycav", response.netAppVolume().id()); - Assertions.assertEquals("ggxdb", response.diskPoolVolume().targetId()); - Assertions.assertEquals("esmi", response.diskPoolVolume().lunName()); + Assertions.assertEquals("de", response.netAppVolume().id()); + Assertions.assertEquals("vecuijpx", response.diskPoolVolume().targetId()); + Assertions.assertEquals("xs", response.diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.ATTACH, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("aawiuagydwqfb", response.elasticSanVolume().targetId()); + Assertions.assertEquals("babxvitit", 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 index aedf1e64269c0..e0c0c278d01fb 100644 --- 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 @@ -23,7 +23,7 @@ public final class DatastoresListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"netAppVolume\":{\"id\":\"nysuxmprafwgckh\"},\"diskPoolVolume\":{\"targetId\":\"xvd\",\"lunName\":\"ffwafq\",\"mountOption\":\"ATTACH\",\"path\":\"aspavehhr\"},\"elasticSanVolume\":{\"targetId\":\"bunzozudh\"},\"status\":\"DeadOrError\"},\"id\":\"moy\",\"name\":\"cdyuibhmfdnbzyd\",\"type\":\"f\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"netAppVolume\":{\"id\":\"eaahhvjhhn\"},\"diskPoolVolume\":{\"targetId\":\"zybbj\",\"lunName\":\"idjks\",\"mountOption\":\"ATTACH\",\"path\":\"xvxevblbjednljla\"},\"elasticSanVolume\":{\"targetId\":\"uaulxunsm\"},\"status\":\"Detached\"},\"id\":\"ppxynenls\",\"name\":\"xeizzg\",\"type\":\"klnsrmffey\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.datastores() - .list("hihfrbbcevqagtlt", "hlfkqojpy", "vgtrdcnifmzzs", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.datastores().list("hzbezkgi", "sidxasicdd", "vvjskgfmocwahp", com.azure.core.util.Context.NONE); - Assertions.assertEquals("nysuxmprafwgckh", response.iterator().next().netAppVolume().id()); - Assertions.assertEquals("xvd", response.iterator().next().diskPoolVolume().targetId()); - Assertions.assertEquals("ffwafq", response.iterator().next().diskPoolVolume().lunName()); + Assertions.assertEquals("eaahhvjhhn", response.iterator().next().netAppVolume().id()); + Assertions.assertEquals("zybbj", response.iterator().next().diskPoolVolume().targetId()); + Assertions.assertEquals("idjks", response.iterator().next().diskPoolVolume().lunName()); Assertions.assertEquals(MountOptionEnum.ATTACH, response.iterator().next().diskPoolVolume().mountOption()); - Assertions.assertEquals("bunzozudh", response.iterator().next().elasticSanVolume().targetId()); + Assertions.assertEquals("uaulxunsm", response.iterator().next().elasticSanVolume().targetId()); } } 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 index 47232aba946a1..ce4408e445e51 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.globalReachConnections().delete("hyuemslyn", "qyrp", "oobrlttyms", com.azure.core.util.Context.NONE); + manager.globalReachConnections().delete("khgn", "nzonzl", "piqywnc", 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 index e6d7606867a65..f2c35160b81ac 100644 --- 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 @@ -27,8 +27,7 @@ public void testDeleteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.hcxEnterpriseSites() - .deleteWithResponse("j", "uktalhsnvkcdmxz", "poaimlnwiaaomyl", com.azure.core.util.Context.NONE); + manager.hcxEnterpriseSites().deleteWithResponse("tillucbiqtg", "q", "hm", 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 index 563c4efc19b22..5582cd1018cfd 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"networkBlock\":\"kjprvk\"},\"id\":\"fz\",\"name\":\"ljyxgtczhe\",\"type\":\"dbsdshm\"}") + "{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"ufoxc\"},\"id\":\"opidoamciodh\",\"name\":\"haz\",\"type\":\"khnzbonlw\"}") .toObject(IscsiPathInner.class); - Assertions.assertEquals("kjprvk", model.networkBlock()); + Assertions.assertEquals("ufoxc", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathInner model = new IscsiPathInner().withNetworkBlock("kjprvk"); + IscsiPathInner model = new IscsiPathInner().withNetworkBlock("ufoxc"); model = BinaryData.fromObject(model).toObject(IscsiPathInner.class); - Assertions.assertEquals("kjprvk", model.networkBlock()); + Assertions.assertEquals("ufoxc", 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 index 489c2c71d2501..1a84e128943f9 100644 --- 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 @@ -12,9 +12,9 @@ public final class IscsiPathListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"mvikl\"},\"id\":\"dvk\",\"name\":\"bejdznxcv\",\"type\":\"srhnjivo\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"ovqfzge\"},\"id\":\"dftuljltduce\",\"name\":\"mtmczuome\",\"type\":\"wcw\"}],\"nextLink\":\"ioknssxmoj\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Pending\",\"networkBlock\":\"n\"},\"id\":\"rudsg\",\"name\":\"a\",\"type\":\"mkycgra\"},{\"properties\":{\"provisioningState\":\"Building\",\"networkBlock\":\"etaebu\"},\"id\":\"vdmovsmzlxwabm\",\"name\":\"oefki\",\"type\":\"rvtp\"},{\"properties\":{\"provisioningState\":\"Building\",\"networkBlock\":\"mqlgk\"},\"id\":\"tndoaongbjc\",\"name\":\"tujitcjedft\",\"type\":\"waezkojvd\"}],\"nextLink\":\"zfoqouicybxar\"}") .toObject(IscsiPathListResult.class); - Assertions.assertEquals("mvikl", model.value().get(0).networkBlock()); - Assertions.assertEquals("ioknssxmoj", model.nextLink()); + Assertions.assertEquals("n", model.value().get(0).networkBlock()); + Assertions.assertEquals("zfoqouicybxar", 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 index db8a538a1cd77..7872b097ba5ba 100644 --- 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 @@ -12,15 +12,15 @@ public final class IscsiPathPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IscsiPathProperties model - = BinaryData.fromString("{\"provisioningState\":\"Building\",\"networkBlock\":\"aehvbbxuri\"}") + = BinaryData.fromString("{\"provisioningState\":\"Canceled\",\"networkBlock\":\"egokdwbwhkszzcmr\"}") .toObject(IscsiPathProperties.class); - Assertions.assertEquals("aehvbbxuri", model.networkBlock()); + Assertions.assertEquals("egokdwbwhkszzcmr", model.networkBlock()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("aehvbbxuri"); + IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("egokdwbwhkszzcmr"); model = BinaryData.fromObject(model).toObject(IscsiPathProperties.class); - Assertions.assertEquals("aehvbbxuri", model.networkBlock()); + Assertions.assertEquals("egokdwbwhkszzcmr", 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 index b7c94847759b1..783e84f7bd670 100644 --- 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 @@ -10,7 +10,6 @@ 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; @@ -22,7 +21,7 @@ public final class IscsiPathsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"qyzqedikdfrdb\"},\"id\":\"mrjgeihfqlggwfi\",\"name\":\"zcxmjpbyep\",\"type\":\"mgtvlj\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"gyamlbnseqacjjv\"},\"id\":\"lguooqjagmd\",\"name\":\"tg\",\"type\":\"eiookjbsah\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +31,11 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); IscsiPath response = manager.iscsiPaths() - .createOrUpdate("sbbjpmcu", "kmifoxxkub", new IscsiPathInner().withNetworkBlock("v"), - com.azure.core.util.Context.NONE); + .define("cgbjbgdlfgt") + .withExistingPrivateCloud("xncnwfe", "bnwgfmxj") + .withNetworkBlock("aquflqbctqha") + .create(); - Assertions.assertEquals("qyzqedikdfrdb", response.networkBlock()); + Assertions.assertEquals("gyamlbnseqacjjv", 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 index 9f64e3eed2b27..f7c89834acbfc 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.iscsiPaths().delete("rc", "yfqi", com.azure.core.util.Context.NONE); + manager.iscsiPaths().delete("sxjb", "qehgpd", "hzjqatucoige", 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 index 3267bd12311ab..bb6c643049623 100644 --- 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 @@ -21,7 +21,7 @@ public final class IscsiPathsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"qlkccuzgygqwaho\"},\"id\":\"lwgniiprglvawu\",\"name\":\"z\",\"type\":\"ufypiv\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"networkBlock\":\"uughtuqfecjxeyg\"},\"id\":\"hxuicbuewmrs\",\"name\":\"njlx\",\"type\":\"zrhwp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,10 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - IscsiPath response - = manager.iscsiPaths().getWithResponse("e", "dptjgwdtgukranb", com.azure.core.util.Context.NONE).getValue(); + IscsiPath response = manager.iscsiPaths() + .getWithResponse("tjvidt", "gepuslvyjtc", "uwkasiz", com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("qlkccuzgygqwaho", response.networkBlock()); + Assertions.assertEquals("uughtuqfecjxeyg", 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 index a1e25d8971756..1d6fd83538cd7 100644 --- 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 @@ -22,7 +22,7 @@ public final class IscsiPathsListByPrivateCloudMockTests { @Test public void testListByPrivateCloud() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"networkBlock\":\"lrmymyincqlhri\"},\"id\":\"sl\",\"name\":\"iiiovgqcgxuugq\",\"type\":\"ctotiowlx\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"networkBlock\":\"awrtmjfjmyccxlz\"},\"id\":\"oxovnekhenlusf\",\"name\":\"rd\",\"type\":\"jxtxrdc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListByPrivateCloud() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.iscsiPaths().listByPrivateCloud("j", "emmucfxh", com.azure.core.util.Context.NONE); + = manager.iscsiPaths().listByPrivateCloud("iropionszon", "pngajin", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lrmymyincqlhri", response.iterator().next().networkBlock()); + Assertions.assertEquals("awrtmjfjmyccxlz", 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 index f617dc3425cf2..e8ea3f70361c3 100644 --- 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 @@ -19,7 +19,7 @@ public final class LocationsCheckQuotaAvailabilityWithResponseMockTests { @Test public void testCheckQuotaAvailabilityWithResponse() throws Exception { - String responseStr = "{\"hostsRemaining\":{\"vyvnqqyb\":382394727},\"quotaEnabled\":\"Enabled\"}"; + String responseStr = "{\"hostsRemaining\":{\"yutnwytpzdmov\":254109783},\"quotaEnabled\":\"Enabled\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,7 +29,7 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Quota response = manager.locations() - .checkQuotaAvailabilityWithResponse("orfmluiqt", com.azure.core.util.Context.NONE) + .checkQuotaAvailabilityWithResponse("qeevt", 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 index 313c8a65432be..09267a3cae90c 100644 --- 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 @@ -21,7 +21,7 @@ public final class LocationsCheckTrialAvailabilityWithResponseMockTests { @Test public void testCheckTrialAvailabilityWithResponse() throws Exception { - String responseStr = "{\"status\":\"TrialUsed\",\"availableHosts\":1122494487}"; + String responseStr = "{\"status\":\"TrialDisabled\",\"availableHosts\":255591451}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testCheckTrialAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); Trial response = manager.locations() - .checkTrialAvailabilityWithResponse("dlwwqfbumlkxt", - new Sku().withName("qjfsmlmbtxhw") - .withTier(SkuTier.FREE) - .withSize("rtawcoezb") - .withFamily("ubskhudygoookkq") - .withCapacity(280222728), + .checkTrialAvailabilityWithResponse("iycslevuf", + new Sku().withName("ztcktyh") + .withTier(SkuTier.STANDARD) + .withSize("dcgzul") + .withFamily("mrqzzrrjvpgl") + .withCapacity(1750112370), com.azure.core.util.Context.NONE) .getValue(); 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 index 0df2cf6cdc7a5..c939939f04c07 100644 --- 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 @@ -23,7 +23,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"tfnhtbaxkgxywr\",\"isDataAction\":true,\"display\":{\"provider\":\"lyhpluodpvruud\",\"resource\":\"zibt\",\"operation\":\"stgktst\",\"description\":\"xeclzedqbcvhzlhp\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"ambtrnegvm\",\"isDataAction\":false,\"display\":{\"provider\":\"qvldspastjbkkd\",\"resource\":\"lves\",\"operation\":\"jlxr\",\"description\":\"lozapeewchpxlk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); 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 index a144f64201283..edbde6a79750b 100644 --- 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 @@ -23,7 +23,7 @@ public final class PlacementPoliciesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"fdjktsysidfvclgl\",\"provisioningState\":\"Succeeded\"},\"id\":\"ijtk\",\"name\":\"usqogsfikayia\",\"type\":\"sharujtj\"}"; + = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"sf\",\"provisioningState\":\"Succeeded\"},\"id\":\"uik\",\"name\":\"hajqglcfh\",\"type\":\"l\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PlacementPolicy response = manager.placementPolicies() - .define("dirazf") - .withExistingCluster("tdtpdelqacslmo", "oebn", "xofvcjk") - .withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("ab")) + .define("ljgkyex") + .withExistingCluster("pud", "dabtqwp", "yawbzasqbu") + .withProperties(new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED) + .withDisplayName("aipidsdaultxi")) .create(); Assertions.assertEquals(PlacementPolicyState.DISABLED, response.properties().state()); - Assertions.assertEquals("fdjktsysidfvclgl", response.properties().displayName()); + Assertions.assertEquals("sf", 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 index 1028e52b134db..90bf6780eceb9 100644 --- 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 @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.placementPolicies() - .delete("eqacjjvpilguooq", "agmdit", "ueio", "kjbsah", com.azure.core.util.Context.NONE); + .delete("efqsfapaqtferrqw", "x", "kmfx", "pjwogqqno", 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 index 92947d11d8512..ea365105d3787 100644 --- 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 @@ -22,7 +22,7 @@ public final class PlacementPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"lqbctqhamzjrw\",\"provisioningState\":\"Canceled\"},\"id\":\"eqyj\",\"name\":\"eziunjxdfzant\",\"type\":\"wcegyamlbn\"}"; + = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"lbkpb\",\"provisioningState\":\"Failed\"},\"id\":\"iljhahz\",\"name\":\"echndbnwieholew\",\"type\":\"wiuub\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PlacementPolicy response = manager.placementPolicies() - .getWithResponse("jqatucoigebxn", "nwfepbnwg", "m", "jgcgbjbgdlfgtdys", com.azure.core.util.Context.NONE) + .getWithResponse("zelndlatutmzlbi", "jlvfhrbbpneqv", "wwyyurmoch", "prprsnmokay", + com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); - Assertions.assertEquals("lqbctqhamzjrw", response.properties().displayName()); + Assertions.assertEquals("lbkpb", 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 index 2683a265525af..7e3c0acf056b8 100644 --- 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 @@ -23,7 +23,7 @@ public final class PlacementPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"uhxu\",\"provisioningState\":\"Canceled\"},\"id\":\"ewmrswnjlxu\",\"name\":\"rhwpus\",\"type\":\"jbaqehgpdoh\"}]}"; + = "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"bzdixzmq\",\"provisioningState\":\"Updating\"},\"id\":\"awopqh\",\"name\":\"wjptm\",\"type\":\"gsbos\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.placementPolicies() - .list("vidttgepuslvyjt", "vuwkasiziesfuugh", "uqfecj", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.placementPolicies().list("czurtlei", "q", "bkwvzg", com.azure.core.util.Context.NONE); Assertions.assertEquals(PlacementPolicyState.DISABLED, response.iterator().next().properties().state()); - Assertions.assertEquals("uhxu", response.iterator().next().properties().displayName()); + Assertions.assertEquals("bzdixzmq", 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 index 812ec7103817d..3c64dba063b69 100644 --- 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 @@ -13,10 +13,10 @@ public final class PlacementPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"wyznkbyku\",\"provisioningState\":\"Deleting\"},\"id\":\"hpagm\",\"name\":\"r\",\"type\":\"kdsnfdsdoakgtdl\"}],\"nextLink\":\"kzevdlhewpusds\"}") + "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"kdeemaofmxagkvtm\",\"provisioningState\":\"Failed\"},\"id\":\"krh\",\"name\":\"hvljuahaquh\",\"type\":\"dhmdua\"}],\"nextLink\":\"exq\"}") .toObject(PlacementPoliciesList.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.value().get(0).properties().state()); - Assertions.assertEquals("wyznkbyku", model.value().get(0).properties().displayName()); - Assertions.assertEquals("kzevdlhewpusds", model.nextLink()); + Assertions.assertEquals("kdeemaofmxagkvtm", model.value().get(0).properties().displayName()); + Assertions.assertEquals("exq", 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 index b2f59ceaa089b..a73cdd2edb51e 100644 --- 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 @@ -14,18 +14,18 @@ public final class PlacementPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"gvbbejdcng\",\"provisioningState\":\"Deleting\"},\"id\":\"akufgmjz\",\"name\":\"wr\",\"type\":\"grtwae\"}") + "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"mwsrcrgvxpvgo\",\"provisioningState\":\"Updating\"},\"id\":\"misgwbnb\",\"name\":\"e\",\"type\":\"dawkzbali\"}") .toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); - Assertions.assertEquals("gvbbejdcng", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); + Assertions.assertEquals("mwsrcrgvxpvgo", model.properties().displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyInner model = new PlacementPolicyInner().withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("gvbbejdcng")); + new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("mwsrcrgvxpvgo")); model = BinaryData.fromObject(model).toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); - Assertions.assertEquals("gvbbejdcng", model.properties().displayName()); + Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); + Assertions.assertEquals("mwsrcrgvxpvgo", 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 index 2649024e7c2cb..b1d6ade40407f 100644 --- 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 @@ -13,18 +13,18 @@ public final class PlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"kopbminrf\",\"provisioningState\":\"Canceled\"}") + "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"hakauhashsf\",\"provisioningState\":\"Building\"}") .toObject(PlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("kopbminrf", model.displayName()); + Assertions.assertEquals("hakauhashsf", model.displayName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyProperties model - = new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("kopbminrf"); + = new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("hakauhashsf"); model = BinaryData.fromObject(model).toObject(PlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("kopbminrf", model.displayName()); + Assertions.assertEquals("hakauhashsf", 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 index 89896d66e5826..25b7682321511 100644 --- 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 @@ -16,28 +16,28 @@ public final class PlacementPolicyUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdateProperties model = BinaryData.fromString( - "{\"state\":\"Enabled\",\"vmMembers\":[\"lfeadcygq\"],\"hostMembers\":[\"hejhzisx\",\"fpel\",\"lppvksrpq\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"None\"}") + "{\"state\":\"Disabled\",\"vmMembers\":[\"lrbpbewtghfgbl\",\"gw\",\"zvlvqhjkbegib\"],\"hostMembers\":[\"xiebwwaloayqcg\",\"rtzju\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}") .toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("lfeadcygq", model.vmMembers().get(0)); - Assertions.assertEquals("hejhzisx", model.hostMembers().get(0)); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("lrbpbewtghfgbl", model.vmMembers().get(0)); + Assertions.assertEquals("xiebwwaloayqcg", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); + Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PlacementPolicyUpdateProperties model - = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.ENABLED) - .withVmMembers(Arrays.asList("lfeadcygq")) - .withHostMembers(Arrays.asList("hejhzisx", "fpel", "lppvksrpq")) + = new PlacementPolicyUpdateProperties().withState(PlacementPolicyState.DISABLED) + .withVmMembers(Arrays.asList("lrbpbewtghfgbl", "gw", "zvlvqhjkbegib")) + .withHostMembers(Arrays.asList("xiebwwaloayqcg", "rtzju")) .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.NONE); + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("lfeadcygq", model.vmMembers().get(0)); - Assertions.assertEquals("hejhzisx", model.hostMembers().get(0)); + Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); + Assertions.assertEquals("lrbpbewtghfgbl", model.vmMembers().get(0)); + Assertions.assertEquals("xiebwwaloayqcg", model.hostMembers().get(0)); Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); + 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 index f5dfd57f44288..600d871dc3cc9 100644 --- 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 @@ -16,27 +16,27 @@ public final class PlacementPolicyUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PlacementPolicyUpdate model = BinaryData.fromString( - "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"msweypqwdxggicc\",\"n\",\"qhuexm\"],\"hostMembers\":[\"lstvlzywe\",\"hz\",\"ncsdtclusiyp\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}}") + "{\"properties\":{\"state\":\"Enabled\",\"vmMembers\":[\"klwndnhjdauwhv\",\"l\"],\"hostMembers\":[\"tdhxujznbmpowuwp\",\"zqlveualupjmkhf\",\"obbc\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\"}}") .toObject(PlacementPolicyUpdate.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("msweypqwdxggicc", model.vmMembers().get(0)); - Assertions.assertEquals("lstvlzywe", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); + Assertions.assertEquals("klwndnhjdauwhv", model.vmMembers().get(0)); + Assertions.assertEquals("tdhxujznbmpowuwp", 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("msweypqwdxggicc", "n", "qhuexm")) - .withHostMembers(Arrays.asList("lstvlzywe", "hz", "ncsdtclusiyp")) - .withAffinityStrength(AffinityStrength.MUST) + .withVmMembers(Arrays.asList("klwndnhjdauwhv", "l")) + .withHostMembers(Arrays.asList("tdhxujznbmpowuwp", "zqlveualupjmkhf", "obbc")) + .withAffinityStrength(AffinityStrength.SHOULD) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdate.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("msweypqwdxggicc", model.vmMembers().get(0)); - Assertions.assertEquals("lstvlzywe", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); + Assertions.assertEquals("klwndnhjdauwhv", model.vmMembers().get(0)); + Assertions.assertEquals("tdhxujznbmpowuwp", 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/PrivateCloudsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java index 145be9812bdc5..2f446791b8eed 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.privateClouds().delete("owzfttsttkt", "ahbqactxtgzuk", com.azure.core.util.Context.NONE); + manager.privateClouds().delete("gy", "wqfbylyrfgiagt", com.azure.core.util.Context.NONE); } } 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 index 607e7710d1c35..f70d02327ead1 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptCmdletInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"ujxukndxd\",\"timeout\":\"rjguufzdmsyqtf\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"String\",\"name\":\"ingamvp\",\"description\":\"o\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"qamvdkfwynwcvtbv\",\"description\":\"yhmtnvyqiat\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"zcjaesgvvsccy\",\"description\":\"g\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Bool\",\"name\":\"lvdnkfx\",\"description\":\"emdwzrmuhapfc\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"qvpsvuoymg\",\"name\":\"celve\",\"type\":\"rypqlmfeo\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"tdbhhxsrzdzu\",\"timeout\":\"rsc\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"wjmy\",\"description\":\"dsslswt\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Bool\",\"name\":\"pyqs\",\"description\":\"wab\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"h\",\"description\":\"plvwiwubmwmbes\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"tppjflcx\",\"name\":\"gaokonzmnsikv\",\"type\":\"kqze\"}") .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 index dd91bd4e542b0..c92df1128224d 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptCmdletPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"description\":\"wkyhkobopgxe\",\"timeout\":\"owepbqpcrfkb\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"dw\",\"description\":\"p\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]}") + "{\"provisioningState\":\"Failed\",\"description\":\"l\",\"timeout\":\"zxmhhvhgu\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"dagxtibqd\",\"description\":\"xwak\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"kzgxhurip\",\"description\":\"podxunkb\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"ntwlrbqtkoie\",\"description\":\"eotg\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]}") .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 index 0ce8b4364f000..626bd9e7f9252 100644 --- 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 @@ -20,7 +20,7 @@ public final class ScriptCmdletsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"vudb\",\"timeout\":\"aqdtvqecrqctmxxd\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"ytxzvtznapxbanno\",\"description\":\"oxczytp\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"vytlyokrrrouuxvn\",\"description\":\"sbcrymodizrxklo\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"kml\",\"description\":\"evfxzopjhbzxlioh\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"gxqbawpcb\",\"name\":\"nzqcy\",\"type\":\"napqo\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"of\",\"timeout\":\"vuhrylni\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Int\",\"name\":\"edm\",\"description\":\"kvnlvxbcuiiznkt\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"dibmikostbzbkiwb\",\"description\":\"n\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Int\",\"name\":\"sgcrpfbcunezzce\",\"description\":\"lfwyfwlwxjwetn\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"afzvaylptrs\",\"name\":\"qwztcmwqkc\",\"type\":\"cxwaxfewz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptCmdlet response = manager.scriptCmdlets() - .getWithResponse("lcqxypokk", "minqcym", "zng", "bdxxe", com.azure.core.util.Context.NONE) + .getWithResponse("felisdjub", "gbqi", "kxkbsazgakgacyr", "m", 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 index 7e3093b95e1e7..62816bfcdf737 100644 --- 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 @@ -21,7 +21,7 @@ public final class ScriptCmdletsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"arfdlpukhpyrnei\",\"timeout\":\"cpeogkhnmgbrou\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"fpazjzoywjxhpd\",\"description\":\"ontacnpq\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"String\",\"name\":\"rhrljyoogwxhn\",\"description\":\"uug\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"rfqkfuar\",\"name\":\"nlvhhtklnvnafvv\",\"type\":\"yfedevjbo\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"yryuzcb\",\"timeout\":\"qvx\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"xo\",\"description\":\"upeujlzqnhcvsq\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"sxgnx\",\"description\":\"qonmpqoxwdof\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"iqbi\",\"description\":\"tmwwi\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"fvwbcb\",\"description\":\"mbnkb\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"divqi\",\"name\":\"ebwtswb\",\"type\":\"uwfmduragegizvc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.scriptCmdlets() - .list("kzmkwklsnoxaxmqe", "alhhjnhgwydyynfs", "khgb", com.azure.core.util.Context.NONE); + .list("mxyasflvgsgzw", "wakoihkn", "mjblmljhlny", 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 index a924ce6c52659..4208c68360a8c 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptCmdletsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptCmdletsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"bbqwrvtldg\",\"timeout\":\"pgvmpipaslthaqfx\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"SecureString\",\"name\":\"dsrezpdrhneuyow\",\"description\":\"d\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"bi\",\"name\":\"cgpik\",\"type\":\"zimejzanlfzx\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"bzonok\",\"timeout\":\"rjqc\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"azszrnwoiindfpw\",\"description\":\"ylwbtlhflsjcdhsz\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"eljag\",\"description\":\"mqhldvrii\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"ghfkvtvsexs\",\"name\":\"wueluqhhahhxv\",\"type\":\"hmzk\"}],\"nextLink\":\"jgwwspughftq\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"t\",\"timeout\":\"aqtdoqmcbx\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"String\",\"name\":\"bhsfxob\",\"description\":\"tkblmpewww\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"vshqjohxcr\",\"description\":\"fovasr\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Float\",\"name\":\"fsubcgjbirxbpy\",\"description\":\"rfbjf\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"t\",\"name\":\"tpvjzbexilzznfqq\",\"type\":\"vwpm\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"oujmkcjhwqytj\",\"timeout\":\"bnw\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"rvnaenqpeh\",\"description\":\"doy\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"d\",\"description\":\"sl\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"String\",\"name\":\"nduhavhqlkthum\",\"description\":\"olbgycduiertgccy\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"lqlfm\",\"description\":\"n\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"swiydmcwyhzdx\",\"name\":\"sadbz\",\"type\":\"nvdfznuda\"}],\"nextLink\":\"vxzbncb\"}") .toObject(ScriptCmdletsList.class); - Assertions.assertEquals("jgwwspughftq", model.nextLink()); + Assertions.assertEquals("vxzbncb", 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 index 3546c3688a252..c6a8f9831f392 100644 --- 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 @@ -17,40 +17,41 @@ public final class ScriptExecutionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionInner model = BinaryData.fromString( - "{\"properties\":{\"scriptCmdletId\":\"wct\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"zj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"uu\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"lwg\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ytsbwtovv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gseinq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"iufxqknpir\"}],\"failureReason\":\"epttwqmsniff\",\"timeout\":\"dmqnrojlpij\",\"retention\":\"rxfrddhc\",\"submittedAt\":\"2021-06-05T19:19:34Z\",\"startedAt\":\"2021-09-16T04:19:40Z\",\"finishedAt\":\"2021-03-09T16:30:01Z\",\"provisioningState\":\"Failed\",\"output\":[\"xi\",\"tozqyzhftwesgo\"],\"namedOutputs\":{\"honnxkrlgnyhmos\":{},\"xkk\":{},\"thrrgh\":{},\"jbdhqxvc\":{}},\"information\":[\"rpdsof\",\"shrnsvbuswdvz\",\"ybycnunvj\",\"rtkfawnopq\"],\"warnings\":[\"yzirtxdyuxzejn\",\"psew\",\"ioilqukrydxtq\"],\"errors\":[\"ox\",\"rgguf\",\"yaomtb\",\"hhavgrvkffovjz\"]},\"id\":\"jbibg\",\"name\":\"mfxumvfcluyovw\",\"type\":\"nbkfezzxscy\"}") + "{\"properties\":{\"scriptCmdletId\":\"itc\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"cktqumiekkezzi\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hlyfjhdgqgg\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"bdunygaeqid\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"atpxl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rxcyjmoad\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"uvarmywdmjsjq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"jhhyxxrwlycoduhp\"}],\"failureReason\":\"kgymareqnajxqug\",\"timeout\":\"hky\",\"retention\":\"beddgssofw\",\"submittedAt\":\"2021-08-12T00:48:32Z\",\"startedAt\":\"2021-09-09T11:18:40Z\",\"finishedAt\":\"2021-02-22T22:05:21Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"i\",\"pxacqqudfn\"],\"namedOutputs\":{\"baaa\":{},\"jyvayffimrzrtuz\":{},\"ogs\":{}},\"information\":[\"evfdnwnwm\",\"wzsyyceuzs\"],\"warnings\":[\"judpfrxt\",\"thzvaytdwkqbrqu\",\"paxh\",\"xiilivpdtiirqt\"],\"errors\":[\"axoruzfgsquy\",\"xrxxlep\",\"ramxjezwlwnw\"]},\"id\":\"qlcvydy\",\"name\":\"atdooaojkniod\",\"type\":\"oo\"}") .toObject(ScriptExecutionInner.class); - Assertions.assertEquals("wct", model.scriptCmdletId()); - Assertions.assertEquals("zj", model.parameters().get(0).name()); - Assertions.assertEquals("lwg", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("epttwqmsniff", model.failureReason()); - Assertions.assertEquals("dmqnrojlpij", model.timeout()); - Assertions.assertEquals("rxfrddhc", model.retention()); - Assertions.assertEquals("xi", model.output().get(0)); + Assertions.assertEquals("itc", model.scriptCmdletId()); + Assertions.assertEquals("cktqumiekkezzi", model.parameters().get(0).name()); + Assertions.assertEquals("atpxl", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("kgymareqnajxqug", model.failureReason()); + Assertions.assertEquals("hky", model.timeout()); + Assertions.assertEquals("beddgssofw", model.retention()); + Assertions.assertEquals("i", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("wct") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("zj"), - new ScriptExecutionParameter().withName("uu"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("lwg"), - new ScriptExecutionParameter().withName("ytsbwtovv"), new ScriptExecutionParameter().withName("gseinq"), - new ScriptExecutionParameter().withName("iufxqknpir"))) - .withFailureReason("epttwqmsniff") - .withTimeout("dmqnrojlpij") - .withRetention("rxfrddhc") - .withOutput(Arrays.asList("xi", "tozqyzhftwesgo")) - .withNamedOutputs(mapOf("honnxkrlgnyhmos", new ScriptExecutionPropertiesNamedOutput(), "xkk", - new ScriptExecutionPropertiesNamedOutput(), "thrrgh", new ScriptExecutionPropertiesNamedOutput(), - "jbdhqxvc", new ScriptExecutionPropertiesNamedOutput())); + ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("itc") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("cktqumiekkezzi"), + new ScriptExecutionParameter().withName("hlyfjhdgqgg"), + new ScriptExecutionParameter().withName("bdunygaeqid"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("atpxl"), + new ScriptExecutionParameter().withName("rxcyjmoad"), + new ScriptExecutionParameter().withName("uvarmywdmjsjq"), + new ScriptExecutionParameter().withName("jhhyxxrwlycoduhp"))) + .withFailureReason("kgymareqnajxqug") + .withTimeout("hky") + .withRetention("beddgssofw") + .withOutput(Arrays.asList("i", "pxacqqudfn")) + .withNamedOutputs(mapOf("baaa", new ScriptExecutionPropertiesNamedOutput(), "jyvayffimrzrtuz", + new ScriptExecutionPropertiesNamedOutput(), "ogs", new ScriptExecutionPropertiesNamedOutput())); model = BinaryData.fromObject(model).toObject(ScriptExecutionInner.class); - Assertions.assertEquals("wct", model.scriptCmdletId()); - Assertions.assertEquals("zj", model.parameters().get(0).name()); - Assertions.assertEquals("lwg", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("epttwqmsniff", model.failureReason()); - Assertions.assertEquals("dmqnrojlpij", model.timeout()); - Assertions.assertEquals("rxfrddhc", model.retention()); - Assertions.assertEquals("xi", model.output().get(0)); + Assertions.assertEquals("itc", model.scriptCmdletId()); + Assertions.assertEquals("cktqumiekkezzi", model.parameters().get(0).name()); + Assertions.assertEquals("atpxl", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("kgymareqnajxqug", model.failureReason()); + Assertions.assertEquals("hky", model.timeout()); + Assertions.assertEquals("beddgssofw", model.retention()); + Assertions.assertEquals("i", model.output().get(0)); } // Use "Map.of" if available 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 index 40fa91549dd47..19bb6f0a086f0 100644 --- 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 @@ -12,15 +12,15 @@ public final class ScriptExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionParameter model - = BinaryData.fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"zjxvydfcea\"}") + = BinaryData.fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"sdbnwdcfhucqdpf\"}") .toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("zjxvydfcea", model.name()); + Assertions.assertEquals("sdbnwdcfhucqdpf", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionParameter model = new ScriptExecutionParameter().withName("zjxvydfcea"); + ScriptExecutionParameter model = new ScriptExecutionParameter().withName("sdbnwdcfhucqdpf"); model = BinaryData.fromObject(model).toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("zjxvydfcea", model.name()); + Assertions.assertEquals("sdbnwdcfhucqdpf", 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 index 50ea1c22d39e7..376ded2ac3994 100644 --- 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 @@ -17,39 +17,40 @@ public final class ScriptExecutionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionProperties model = BinaryData.fromString( - "{\"scriptCmdletId\":\"zdgiruj\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"omvzzbtd\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qvpn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"yujviylwdshfssn\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ye\"}],\"failureReason\":\"ymsgaojfmwnc\",\"timeout\":\"tmr\",\"retention\":\"irctymoxoftpipiw\",\"submittedAt\":\"2021-04-10T00:16:32Z\",\"startedAt\":\"2021-03-13T17:37:26Z\",\"finishedAt\":\"2021-05-14T09:28:57Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"lihhyuspskasdvlm\",\"wdgzxulucv\"],\"namedOutputs\":{\"rsre\":{},\"zvxurisjnhny\":{},\"xifqjzgxm\":{},\"hu\":{}},\"information\":[\"pcesutrg\"],\"warnings\":[\"auutpwoqhihe\",\"qg\"],\"errors\":[\"nfqn\",\"cypsxjv\",\"oimwkslirc\"]}") + "{\"scriptCmdletId\":\"wnujhemmsbvdk\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dtjinfw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lfltka\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"efkdlf\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"akggkfpag\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"owpulpq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lyls\"}],\"failureReason\":\"k\",\"timeout\":\"jnsjervtiagxsd\",\"retention\":\"uem\",\"submittedAt\":\"2021-06-09T02:50:50Z\",\"startedAt\":\"2021-10-12T12:33:37Z\",\"finishedAt\":\"2021-02-15T03:12:09Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"pnqi\"],\"namedOutputs\":{\"nvkjjxdxrbuukzcl\":{},\"wyhmlw\":{},\"aztz\":{},\"ofncckwyfzqwhxxb\":{}},\"information\":[\"a\"],\"warnings\":[\"eqz\",\"ppriol\",\"or\"],\"errors\":[\"tolmncwsobqw\"]}") .toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("zdgiruj", model.scriptCmdletId()); - Assertions.assertEquals("omvzzbtd", model.parameters().get(0).name()); - Assertions.assertEquals("ye", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("ymsgaojfmwnc", model.failureReason()); - Assertions.assertEquals("tmr", model.timeout()); - Assertions.assertEquals("irctymoxoftpipiw", model.retention()); - Assertions.assertEquals("lihhyuspskasdvlm", model.output().get(0)); + Assertions.assertEquals("wnujhemmsbvdk", model.scriptCmdletId()); + Assertions.assertEquals("dtjinfw", model.parameters().get(0).name()); + Assertions.assertEquals("efkdlf", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("k", model.failureReason()); + Assertions.assertEquals("jnsjervtiagxsd", model.timeout()); + Assertions.assertEquals("uem", model.retention()); + Assertions.assertEquals("pnqi", model.output().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("zdgiruj") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("omvzzbtd"), - new ScriptExecutionParameter().withName("qvpn"), - new ScriptExecutionParameter().withName("yujviylwdshfssn"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("ye"))) - .withFailureReason("ymsgaojfmwnc") - .withTimeout("tmr") - .withRetention("irctymoxoftpipiw") - .withOutput(Arrays.asList("lihhyuspskasdvlm", "wdgzxulucv")) - .withNamedOutputs(mapOf("rsre", new ScriptExecutionPropertiesNamedOutput(), "zvxurisjnhny", - new ScriptExecutionPropertiesNamedOutput(), "xifqjzgxm", new ScriptExecutionPropertiesNamedOutput(), - "hu", new ScriptExecutionPropertiesNamedOutput())); + ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("wnujhemmsbvdk") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("dtjinfw"), + new ScriptExecutionParameter().withName("lfltka"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("efkdlf"), + new ScriptExecutionParameter().withName("akggkfpag"), + new ScriptExecutionParameter().withName("owpulpq"), new ScriptExecutionParameter().withName("lyls"))) + .withFailureReason("k") + .withTimeout("jnsjervtiagxsd") + .withRetention("uem") + .withOutput(Arrays.asList("pnqi")) + .withNamedOutputs(mapOf("nvkjjxdxrbuukzcl", new ScriptExecutionPropertiesNamedOutput(), "wyhmlw", + new ScriptExecutionPropertiesNamedOutput(), "aztz", new ScriptExecutionPropertiesNamedOutput(), + "ofncckwyfzqwhxxb", new ScriptExecutionPropertiesNamedOutput())); model = BinaryData.fromObject(model).toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("zdgiruj", model.scriptCmdletId()); - Assertions.assertEquals("omvzzbtd", model.parameters().get(0).name()); - Assertions.assertEquals("ye", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("ymsgaojfmwnc", model.failureReason()); - Assertions.assertEquals("tmr", model.timeout()); - Assertions.assertEquals("irctymoxoftpipiw", model.retention()); - Assertions.assertEquals("lihhyuspskasdvlm", model.output().get(0)); + Assertions.assertEquals("wnujhemmsbvdk", model.scriptCmdletId()); + Assertions.assertEquals("dtjinfw", model.parameters().get(0).name()); + Assertions.assertEquals("efkdlf", model.hiddenParameters().get(0).name()); + Assertions.assertEquals("k", model.failureReason()); + Assertions.assertEquals("jnsjervtiagxsd", model.timeout()); + Assertions.assertEquals("uem", model.retention()); + Assertions.assertEquals("pnqi", model.output().get(0)); } // Use "Map.of" if available 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 index 92794a7b7f888..11b2be388a4c5 100644 --- 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 @@ -26,7 +26,7 @@ public final class ScriptExecutionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"owxwcomli\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"wvczcswkacve\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dvlvhbwrnfxtgdd\"}],\"failureReason\":\"th\",\"timeout\":\"hn\",\"retention\":\"aoyankcoeqswa\",\"submittedAt\":\"2021-01-30T05:03:50Z\",\"startedAt\":\"2021-08-12T07:23:05Z\",\"finishedAt\":\"2021-02-02T11:22:23Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"znnhd\",\"lktgjc\",\"gguxhemlwyw\"],\"namedOutputs\":{\"czg\":{},\"bukklels\":{}},\"information\":[\"lycsxz\",\"jks\",\"lsmdesqplpvmjc\"],\"warnings\":[\"wb\",\"dyvt\",\"owx\",\"gpiudeug\"],\"errors\":[\"zec\",\"axwk\",\"fykhvuhxepmru\",\"znabaobns\"]},\"id\":\"jdjltymkmvgui\",\"name\":\"ywart\",\"type\":\"pphkixkykxds\"}"; + = "{\"properties\":{\"scriptCmdletId\":\"mur\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"g\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ktvqylkmqpzoy\"}],\"failureReason\":\"fbcgwgcloxoebqin\",\"timeout\":\"ipnwj\",\"retention\":\"jqlafcbahhpzp\",\"submittedAt\":\"2021-05-12T03:58:05Z\",\"startedAt\":\"2021-01-21T09:59:18Z\",\"finishedAt\":\"2021-05-13T07:58:47Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"kmkkholvdnd\",\"iauogphuartv\",\"iukyefchnmna\",\"mnxhkxjqirwrweo\"],\"namedOutputs\":{\"fifhxwrsnew\":{},\"ozqvbubqmam\":{}},\"information\":[\"cx\",\"xz\",\"azttaboidvmfq\"],\"warnings\":[\"ubowsepdfgkm\",\"dherngbtcj\",\"ahokqtobkauxofsh\"],\"errors\":[\"wpnulaiywzejyw\",\"slwkojpl\",\"ndnpdwrpqafgfug\",\"nnfhyetefypo\"]},\"id\":\"ctfjgtixr\",\"name\":\"vzuyturmlmu\",\"type\":\"wolba\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,31 +36,30 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptExecution response = manager.scriptExecutions() - .define("b") - .withExistingPrivateCloud("hzdtxetlgydlh", "vlnnpx") - .withScriptCmdletId("q") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("arbgjekgl"), - new ScriptExecutionParameter().withName("lbyulidwcwvmze"), - new ScriptExecutionParameter().withName("jonfhjirwgdnqzbr"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("pzhz"), - new ScriptExecutionParameter().withName("tk"), - new ScriptExecutionParameter().withName("jcitdigsxcdglj"))) - .withFailureReason("keuachtomf") - .withTimeout("rytswfpf") - .withRetention("gycxnmskwhqjjys") - .withOutput(Arrays.asList("edwqslsrh", "pq")) - .withNamedOutputs(mapOf("skondcbrwimu", new ScriptExecutionPropertiesNamedOutput(), "qejo", - new ScriptExecutionPropertiesNamedOutput(), "ovyrrleaesinu", new ScriptExecutionPropertiesNamedOutput(), - "tljqobbpih", new ScriptExecutionPropertiesNamedOutput())) + .define("kqmhhaowjr") + .withExistingPrivateCloud("idibgqjxgpn", "hgovfgp") + .withScriptCmdletId("uporqzdfu") + .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("vkfvxcnqmxqpswok"), + new ScriptExecutionParameter().withName("vkhlggdhbemz"))) + .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("sz"), + new ScriptExecutionParameter().withName("wiwtglxxhl"), + new ScriptExecutionParameter().withName("fpgpicrmnzhrgm"))) + .withFailureReason("j") + .withTimeout("x") + .withRetention("qcbfrmbodths") + .withOutput(Arrays.asList("lacjfrnxo")) + .withNamedOutputs(mapOf("au", new ScriptExecutionPropertiesNamedOutput(), "lwvsgm", + new ScriptExecutionPropertiesNamedOutput(), "ohqfzizv", new ScriptExecutionPropertiesNamedOutput(), + "xmmkjs", new ScriptExecutionPropertiesNamedOutput())) .create(); - Assertions.assertEquals("owxwcomli", response.scriptCmdletId()); - Assertions.assertEquals("wvczcswkacve", response.parameters().get(0).name()); - Assertions.assertEquals("dvlvhbwrnfxtgdd", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("th", response.failureReason()); - Assertions.assertEquals("hn", response.timeout()); - Assertions.assertEquals("aoyankcoeqswa", response.retention()); - Assertions.assertEquals("znnhd", response.output().get(0)); + Assertions.assertEquals("mur", response.scriptCmdletId()); + Assertions.assertEquals("g", response.parameters().get(0).name()); + Assertions.assertEquals("ktvqylkmqpzoy", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("fbcgwgcloxoebqin", response.failureReason()); + Assertions.assertEquals("ipnwj", response.timeout()); + Assertions.assertEquals("jqlafcbahhpzp", response.retention()); + Assertions.assertEquals("kmkkholvdnd", response.output().get(0)); } // Use "Map.of" if available 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 index 7627288242c9c..759974f095eae 100644 --- 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.scriptExecutions().delete("sfuztlvtmv", "gbwidqlvh", "koveof", com.azure.core.util.Context.NONE); + manager.scriptExecutions().delete("pakdkifmjnnawt", "abpxuc", "p", 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 index bf3a5e6d77a08..d875c3480d5a8 100644 --- 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 @@ -23,7 +23,7 @@ public final class ScriptExecutionsGetExecutionLogsWithResponseMockTests { @Test public void testGetExecutionLogsWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"ikzoeovvtzejetj\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"tikyj\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"dbqzolxrzvhqjw\"}],\"failureReason\":\"htgv\",\"timeout\":\"zpcrrkolawj\",\"retention\":\"smwr\",\"submittedAt\":\"2021-09-09T22:55:06Z\",\"startedAt\":\"2021-04-12T00:09:13Z\",\"finishedAt\":\"2021-04-09T17:42:23Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"jafi\"],\"namedOutputs\":{\"guyn\":{},\"chl\":{},\"mltx\":{},\"whmozusgzvlnsnnj\":{}},\"information\":[\"afolpymwamxqzrag\",\"gdphtvdula\"],\"warnings\":[\"ejchcsrlz\",\"nmzlanru\"],\"errors\":[\"vnphc\",\"zqtpjhmq\"]},\"id\":\"v\",\"name\":\"hlaiwd\",\"type\":\"xsmlz\"}"; + = "{\"properties\":{\"scriptCmdletId\":\"pqxpx\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"cng\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"saasiixtmkzj\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"iirhgfgrwsd\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gratzvzbglbyvict\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"tbrxkjz\"}],\"failureReason\":\"gxffmshkwf\",\"timeout\":\"kgozxwop\",\"retention\":\"yd\",\"submittedAt\":\"2021-04-25T08:18:32Z\",\"startedAt\":\"2021-07-17T17:39:38Z\",\"finishedAt\":\"2021-01-06T13:56:26Z\",\"provisioningState\":\"Canceled\",\"output\":[\"biygnugjknfsmfct\",\"uxuuyilflq\",\"iquvrehm\",\"njhvsujztc\"],\"namedOutputs\":{\"qjtwhauu\":{},\"fprnjl\":{},\"tlxs\":{}},\"information\":[\"ddoui\",\"amowaziynknlqwzd\",\"piwhxqs\",\"dtmaa\"],\"warnings\":[\"huxy\",\"rjvmtygjbmzyosp\",\"p\",\"hckfkyjpmspbps\"],\"errors\":[\"ppyo\",\"tieyujtvczkcny\",\"rxmunjdxvgln\",\"vxlx\"]},\"id\":\"glqivbgkcv\",\"name\":\"hpzvuqdflvoniyp\",\"type\":\"pubcpzgpxtivhjk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,18 +33,17 @@ public void testGetExecutionLogsWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptExecution response = manager.scriptExecutions() - .getExecutionLogsWithResponse("zrvjfnmjmvlwyzgi", "lkujrllfojui", "jpu", - Arrays.asList(ScriptOutputStreamType.ERROR, ScriptOutputStreamType.ERROR, - ScriptOutputStreamType.INFORMATION), + .getExecutionLogsWithResponse("gqoweyirdhlisn", "wfl", "qmp", + Arrays.asList(ScriptOutputStreamType.OUTPUT, ScriptOutputStreamType.ERROR), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ikzoeovvtzejetj", response.scriptCmdletId()); - Assertions.assertEquals("tikyj", response.parameters().get(0).name()); - Assertions.assertEquals("dbqzolxrzvhqjw", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("htgv", response.failureReason()); - Assertions.assertEquals("zpcrrkolawj", response.timeout()); - Assertions.assertEquals("smwr", response.retention()); - Assertions.assertEquals("jafi", response.output().get(0)); + Assertions.assertEquals("pqxpx", response.scriptCmdletId()); + Assertions.assertEquals("cng", response.parameters().get(0).name()); + Assertions.assertEquals("iirhgfgrwsd", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("gxffmshkwf", response.failureReason()); + Assertions.assertEquals("kgozxwop", response.timeout()); + Assertions.assertEquals("yd", response.retention()); + Assertions.assertEquals("biygnugjknfsmfct", 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 index 0499b94a81183..2ab1d6699d502 100644 --- 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 @@ -21,7 +21,7 @@ public final class ScriptExecutionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"mzgwe\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"sxwef\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hecbvopwndyq\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"llklmtk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lowkxxpvb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"dfjmzsyzfhotlh\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"k\"}],\"failureReason\":\"ychunsjlpjrtwszh\",\"timeout\":\"vuicp\",\"retention\":\"trrmhwrb\",\"submittedAt\":\"2021-03-14T13:08:25Z\",\"startedAt\":\"2021-02-16T07:42:20Z\",\"finishedAt\":\"2021-04-11T17:40:45Z\",\"provisioningState\":\"Failed\",\"output\":[\"glrocuy\"],\"namedOutputs\":{\"hhmemhooclutnp\":{},\"memczjkmmyk\":{},\"ujxsglhsr\":{}},\"information\":[\"ejylmbkzu\",\"nigrfihotjewl\",\"xuzzjgnrefq\",\"hqo\"],\"warnings\":[\"hiqakydiwfbrk\",\"pzdqtvhcspod\",\"qaxsipietgbebjf\"],\"errors\":[\"moichdlpnfpubntn\",\"atzviqsowsaael\"]},\"id\":\"ttcjuhplrvkmjc\",\"name\":\"mjvlgfgg\",\"type\":\"vkyylizrzbjpsf\"}"; + = "{\"properties\":{\"scriptCmdletId\":\"grytfmpcyci\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"caykggnoxuz\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rksxwpndfc\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"znth\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"twk\"}],\"failureReason\":\"osrxuzvoa\",\"timeout\":\"ktcqio\",\"retention\":\"gbzahgxqdlyr\",\"submittedAt\":\"2021-02-05T18:12:47Z\",\"startedAt\":\"2021-10-26T07:29:55Z\",\"finishedAt\":\"2021-07-14T07:13:53Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"atbhjmznn\",\"s\"],\"namedOutputs\":{\"qalarvlagunbtg\":{}},\"information\":[\"wlnbm\"],\"warnings\":[\"e\",\"udzqavbp\",\"qmjxlyyzglgouwtl\"],\"errors\":[\"yuojqtobaxk\",\"eytu\",\"lbfjkwr\",\"snkq\"]},\"id\":\"syrq\",\"name\":\"njqhdenxa\",\"type\":\"l\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptExecution response = manager.scriptExecutions() - .getWithResponse("kizmdksaoafclu", "v", "xmycjimryvwgcw", com.azure.core.util.Context.NONE) + .getWithResponse("vefloccsrmozihmi", "g", "wtxxpkyjcx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mzgwe", response.scriptCmdletId()); - Assertions.assertEquals("sxwef", response.parameters().get(0).name()); - Assertions.assertEquals("llklmtk", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("ychunsjlpjrtwszh", response.failureReason()); - Assertions.assertEquals("vuicp", response.timeout()); - Assertions.assertEquals("trrmhwrb", response.retention()); - Assertions.assertEquals("glrocuy", response.output().get(0)); + Assertions.assertEquals("grytfmpcyci", response.scriptCmdletId()); + Assertions.assertEquals("caykggnoxuz", response.parameters().get(0).name()); + Assertions.assertEquals("znth", response.hiddenParameters().get(0).name()); + Assertions.assertEquals("osrxuzvoa", response.failureReason()); + Assertions.assertEquals("ktcqio", response.timeout()); + Assertions.assertEquals("gbzahgxqdlyr", response.retention()); + Assertions.assertEquals("atbhjmznn", 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 index 0df6c29a203ef..c2357e4c96892 100644 --- 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 @@ -22,7 +22,7 @@ public final class ScriptExecutionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"dmhm\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"plfmuvapckccrrvw\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"xoy\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ukphaimmoiroq\"}],\"failureReason\":\"shbraga\",\"timeout\":\"yyrmfsvbp\",\"retention\":\"bopfppdbwnup\",\"submittedAt\":\"2021-06-30T02:41:40Z\",\"startedAt\":\"2021-01-01T09:29:45Z\",\"finishedAt\":\"2021-06-18T09:33:58Z\",\"provisioningState\":\"Deleting\",\"output\":[\"aacfdmmc\"],\"namedOutputs\":{\"mehqepvufh\":{}},\"information\":[\"h\",\"whoqhnlbqnbldxe\"],\"warnings\":[\"gschorimkrsrr\"],\"errors\":[\"cso\",\"ldpuviy\",\"caab\",\"olhbhlvb\"]},\"id\":\"uqibsxtkcu\",\"name\":\"fbsfarfsiow\",\"type\":\"kjxnqpvwgfstmhq\"}]}"; + = "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"rgywwp\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"snptfujgicgaao\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"taqutdewem\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"swvr\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"unzzjgehk\"}],\"failureReason\":\"imrt\",\"timeout\":\"xokffqyin\",\"retention\":\"qepqwhixmon\",\"submittedAt\":\"2021-01-17T19:00:27Z\",\"startedAt\":\"2021-09-25T05:57:05Z\",\"finishedAt\":\"2021-03-23T03:25:57Z\",\"provisioningState\":\"Running\",\"output\":[\"clduc\",\"birdsvuwcobiegs\",\"mninwjizcilng\",\"gshejjtbxqmulux\"],\"namedOutputs\":{\"zvners\":{},\"ycucrwnamikzeb\":{},\"qbsms\":{},\"ziqgfuh\":{}},\"information\":[\"ruswhv\",\"czznvfbycjsxj\"],\"warnings\":[\"xzv\"],\"errors\":[\"mxqhndvnoamldse\",\"aohdjh\",\"flzokxco\",\"pelnjetag\"]},\"id\":\"sxoa\",\"name\":\"ftgz\",\"type\":\"npbs\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.scriptExecutions().list("yuicdhzbdy", "wwgbdv", com.azure.core.util.Context.NONE); + = manager.scriptExecutions().list("kjexfdeqvhp", "ylkkshkbffmbm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dmhm", response.iterator().next().scriptCmdletId()); - Assertions.assertEquals("plfmuvapckccrrvw", response.iterator().next().parameters().get(0).name()); - Assertions.assertEquals("xoy", response.iterator().next().hiddenParameters().get(0).name()); - Assertions.assertEquals("shbraga", response.iterator().next().failureReason()); - Assertions.assertEquals("yyrmfsvbp", response.iterator().next().timeout()); - Assertions.assertEquals("bopfppdbwnup", response.iterator().next().retention()); - Assertions.assertEquals("aacfdmmc", response.iterator().next().output().get(0)); + Assertions.assertEquals("rgywwp", response.iterator().next().scriptCmdletId()); + Assertions.assertEquals("snptfujgicgaao", response.iterator().next().parameters().get(0).name()); + Assertions.assertEquals("taqutdewem", response.iterator().next().hiddenParameters().get(0).name()); + Assertions.assertEquals("imrt", response.iterator().next().failureReason()); + Assertions.assertEquals("xokffqyin", response.iterator().next().timeout()); + Assertions.assertEquals("qepqwhixmon", response.iterator().next().retention()); + Assertions.assertEquals("clduc", 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 index ea46c5a7a1f64..648ed438566f5 100644 --- 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 @@ -12,15 +12,15 @@ public final class ScriptExecutionsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptExecutionsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"dvypgikdgsz\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"birryuzhl\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"oqrvqqaatjin\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"vgoup\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fiibfggjioolvr\"}],\"failureReason\":\"kvtkkg\",\"timeout\":\"lqwjygvjayvblm\",\"retention\":\"k\",\"submittedAt\":\"2021-12-10T06:42:49Z\",\"startedAt\":\"2020-12-21T03:49:07Z\",\"finishedAt\":\"2021-08-14T02:32:59Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"pbyrqufegxu\",\"wz\",\"bnhlmc\"],\"namedOutputs\":{\"dn\":{}},\"information\":[\"vgbmhr\",\"xkw\",\"yijejvegrhbpnaix\",\"xccbdreaxhcex\"],\"warnings\":[\"vqahqkghtpwi\",\"nhyjsv\",\"ycxzbfvoo\",\"vrvmtgjqppyost\"],\"errors\":[\"zm\"]},\"id\":\"gfipnsxk\",\"name\":\"cwaekrrjre\",\"type\":\"fxtsgum\"},{\"properties\":{\"scriptCmdletId\":\"lik\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"slol\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qpvuzlmvfelf\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"plcrpwjxeznoig\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rnjwmw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"pn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"saz\"}],\"failureReason\":\"joqkagfhsxt\",\"timeout\":\"augzxnfaazpxdtn\",\"retention\":\"mkqjj\",\"submittedAt\":\"2020-12-21T21:02:08Z\",\"startedAt\":\"2021-06-14T14:36:08Z\",\"finishedAt\":\"2021-07-12T10:16:15Z\",\"provisioningState\":\"Deleting\",\"output\":[\"uaibrebqaaysj\"],\"namedOutputs\":{\"qtnqtt\":{},\"zlwfffiakp\":{}},\"information\":[\"qmt\",\"d\",\"tmmjihyeozph\"],\"warnings\":[\"uyqncygupkvipmd\",\"cwxqu\",\"evzhfsto\"],\"errors\":[\"ojujbyp\",\"lmcuvhixb\",\"xyfwnylrcool\",\"ttpkiwkkbnujrywv\"]},\"id\":\"lbfpncurd\",\"name\":\"iwii\",\"type\":\"htywubxcbihwq\"}],\"nextLink\":\"fdntwjchrdgoih\"}") + "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"p\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"bmnzbtbhjpgl\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fgohdneuelfphs\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"yhtozfikdowwqu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"v\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"clvit\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"hqzonosggbhcoh\"}],\"failureReason\":\"dsjnka\",\"timeout\":\"jutiiswacff\",\"retention\":\"k\",\"submittedAt\":\"2021-07-11T14:50:31Z\",\"startedAt\":\"2021-04-30T08:45:02Z\",\"finishedAt\":\"2021-09-11T04:06:27Z\",\"provisioningState\":\"Deleting\",\"output\":[\"a\",\"lvpnpp\",\"uflrwd\"],\"namedOutputs\":{\"lxyjr\":{},\"sag\":{}},\"information\":[\"nihgwqapnedg\",\"bcvkcvqvpkeq\",\"cvdrhvoodsot\",\"obzdopcjwvnhdl\"],\"warnings\":[\"gx\",\"xrslpm\",\"twuoegrpkhjwni\"],\"errors\":[\"luicpdggkzzlvmbm\",\"axmodfvuef\",\"wsbpfvm\"]},\"id\":\"hrfou\",\"name\":\"ft\",\"type\":\"akcp\"},{\"properties\":{\"scriptCmdletId\":\"zvqtmnubexkp\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"mond\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mquxvypo\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"opkwhojv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ajqgxy\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mocmbqfqvmk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xozap\"}],\"failureReason\":\"elxprglyatddck\",\"timeout\":\"bcuejrjxgci\",\"retention\":\"brh\",\"submittedAt\":\"2021-06-17T17:34:16Z\",\"startedAt\":\"2021-06-01T12:21:20Z\",\"finishedAt\":\"2021-02-04T15:03:28Z\",\"provisioningState\":\"Deleting\",\"output\":[\"m\"],\"namedOutputs\":{\"rq\":{}},\"information\":[\"ahwfluszdtmhrk\",\"ofyyvoqacpi\"],\"warnings\":[\"btgiwbwoenwas\"],\"errors\":[\"dtkcnqxwbpokulp\",\"ujw\"]},\"id\":\"sipqii\",\"name\":\"byuqerpqlp\",\"type\":\"wcciuqgbdbu\"},{\"properties\":{\"scriptCmdletId\":\"vfbtkuwh\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ykojoxafnndlpic\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"koymkcd\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"h\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"pkkpw\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"q\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ovvqfovljxywsu\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"syrsndsytgadgvra\"}],\"failureReason\":\"en\",\"timeout\":\"qnzarrwl\",\"retention\":\"uijfqk\",\"submittedAt\":\"2021-06-20T18:32:46Z\",\"startedAt\":\"2021-05-07T16:01:38Z\",\"finishedAt\":\"2021-07-18T18:26:22Z\",\"provisioningState\":\"Pending\",\"output\":[\"ji\",\"wwiftohqkvpuv\",\"sgplsakn\"],\"namedOutputs\":{\"synljphuopxodl\":{},\"iyntorzihle\":{},\"sjswsrms\":{}},\"information\":[\"rpzbchckqqzqi\",\"xiy\"],\"warnings\":[\"i\",\"ynkedyatrwyhqmib\",\"yhwitsmypyynpcdp\",\"mnzgmwznmabi\"],\"errors\":[\"orgjhxbldt\",\"wwrlkdmtncv\"]},\"id\":\"otllxdyhgsyo\",\"name\":\"ogjltdtbnnhad\",\"type\":\"ocrkvcikh\"},{\"properties\":{\"scriptCmdletId\":\"amqgxqquezikyw\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"kallatmel\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"uipiccjzk\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"gvvcnayrhyr\"}],\"failureReason\":\"xmueed\",\"timeout\":\"drd\",\"retention\":\"tkwqqtchealm\",\"submittedAt\":\"2021-09-27T23:43:44Z\",\"startedAt\":\"2021-10-14T04:38:13Z\",\"finishedAt\":\"2021-04-13T10:54:30Z\",\"provisioningState\":\"Pending\",\"output\":[\"vgpiohgwxrt\",\"udxepxgyqagv\"],\"namedOutputs\":{\"npkukghimdblx\":{},\"wi\":{},\"fnjhfjxwmszkkfo\":{},\"rey\":{}},\"information\":[\"ikf\"],\"warnings\":[\"n\",\"a\"],\"errors\":[\"wczelpci\",\"elsfeaen\",\"abfatkl\"]},\"id\":\"xbjhwuaanozjosph\",\"name\":\"oulpjrv\",\"type\":\"ag\"}],\"nextLink\":\"vimjwos\"}") .toObject(ScriptExecutionsList.class); - Assertions.assertEquals("dvypgikdgsz", model.value().get(0).scriptCmdletId()); - Assertions.assertEquals("birryuzhl", model.value().get(0).parameters().get(0).name()); - Assertions.assertEquals("oqrvqqaatjin", model.value().get(0).hiddenParameters().get(0).name()); - Assertions.assertEquals("kvtkkg", model.value().get(0).failureReason()); - Assertions.assertEquals("lqwjygvjayvblm", model.value().get(0).timeout()); + Assertions.assertEquals("p", model.value().get(0).scriptCmdletId()); + Assertions.assertEquals("bmnzbtbhjpgl", model.value().get(0).parameters().get(0).name()); + Assertions.assertEquals("clvit", model.value().get(0).hiddenParameters().get(0).name()); + Assertions.assertEquals("dsjnka", model.value().get(0).failureReason()); + Assertions.assertEquals("jutiiswacff", model.value().get(0).timeout()); Assertions.assertEquals("k", model.value().get(0).retention()); - Assertions.assertEquals("pbyrqufegxu", model.value().get(0).output().get(0)); - Assertions.assertEquals("fdntwjchrdgoih", model.nextLink()); + Assertions.assertEquals("a", model.value().get(0).output().get(0)); + Assertions.assertEquals("vimjwos", model.nextLink()); } } 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 index ebf1513c85539..98978693aadd0 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptPackageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ibdeibq\",\"version\":\"qkgh\",\"company\":\"ndzwmkrefa\",\"uri\":\"jorwkqnyhgbij\"},\"id\":\"ivfxzsjabibsyst\",\"name\":\"wfsdjpvkvpbj\",\"type\":\"bkzbzkd\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ceopzfqrhhuaopp\",\"version\":\"qeqxo\",\"company\":\"dahzxctobg\",\"uri\":\"dmoizpostmg\"},\"id\":\"fbunrmfqjhhk\",\"name\":\"bpvjymjhx\",\"type\":\"j\"}") .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 index 527d80dd6da4d..1f73f547a5c3b 100644 --- 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 @@ -11,7 +11,7 @@ public final class ScriptPackagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackageProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"description\":\"abudurgk\",\"version\":\"mokzhjjklf\",\"company\":\"mouwqlgzrfzeey\",\"uri\":\"izikayuhq\"}") + "{\"provisioningState\":\"Canceled\",\"description\":\"divkrt\",\"version\":\"bxqz\",\"company\":\"zjf\",\"uri\":\"vjfdx\"}") .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 index 049876f888557..f1b33974a5d10 100644 --- 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 @@ -20,7 +20,7 @@ public final class ScriptPackagesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"oyuelyetn\",\"version\":\"bf\",\"company\":\"ggagfln\",\"uri\":\"mtrwah\"},\"id\":\"mu\",\"name\":\"ftbyrplro\",\"type\":\"kpigqfusu\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"vigorqjbttzhragl\",\"version\":\"fhonqjujeickpzvc\",\"company\":\"pmxelnwcltyje\",\"uri\":\"xxmlfmkqscazua\"},\"id\":\"tzxpuamwabzxrv\",\"name\":\"cush\",\"type\":\"phai\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ScriptPackage response = manager.scriptPackages() - .getWithResponse("lwntsjgqrs", "y", "ruuuybnch", com.azure.core.util.Context.NONE) + .getWithResponse("wcrojphslhcaw", "u", "i", 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 index a39b6199cafd8..978a6d365720e 100644 --- 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 @@ -21,7 +21,7 @@ public final class ScriptPackagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"wv\",\"version\":\"vcdlg\",\"company\":\"ucmfdj\",\"uri\":\"laxpunj\"},\"id\":\"kczvvita\",\"name\":\"gx\",\"type\":\"fcsserxhtvsox\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"eiybbabpfhvfsl\",\"version\":\"ntjlr\",\"company\":\"jkskyr\",\"uri\":\"ovzidsx\"},\"id\":\"abzmifrygznmmaxr\",\"name\":\"zkzobgopxlhslnel\",\"type\":\"ieixynllxe\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.scriptPackages().list("qxfzyjqttvwk", "qhjpenuygbqe", com.azure.core.util.Context.NONE); + = manager.scriptPackages().list("qryxyn", "nzrdpsovwxz", 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 index f57ed436104fe..b107c5926b920 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptPackagesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptPackagesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"dw\",\"version\":\"tswiby\",\"company\":\"dl\",\"uri\":\"shfwpracstwity\"},\"id\":\"evxccedcp\",\"name\":\"md\",\"type\":\"odn\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"jc\",\"version\":\"hlt\",\"company\":\"gcxn\",\"uri\":\"vwxqibyqunyo\"},\"id\":\"wlmdjrkv\",\"name\":\"g\",\"type\":\"vfvpdbodaciz\"}],\"nextLink\":\"q\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"ngmtsavjcb\",\"version\":\"xqpsrknftguv\",\"company\":\"uhprwmdyvxqt\",\"uri\":\"riwwroy\"},\"id\":\"exrmcqibycnojvk\",\"name\":\"mefqsgzvahapjyzh\",\"type\":\"vgqzcjrvxd\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"lxkvu\",\"version\":\"hzovawjvzunlut\",\"company\":\"n\",\"uri\":\"nxipeil\"},\"id\":\"zuaejxd\",\"name\":\"ltskzbbtd\",\"type\":\"umveekgpwozuhkf\"},{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"ofd\",\"version\":\"uusdttouwa\",\"company\":\"ekqvkeln\",\"uri\":\"vbxwyjsflhh\"},\"id\":\"aln\",\"name\":\"ixisxyawjoy\",\"type\":\"qcslyjpkiid\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"nelixhnrztfo\",\"version\":\"bnxknalaulppg\",\"company\":\"tpnapnyiropuhpig\",\"uri\":\"gylgqgitxmedjvcs\"},\"id\":\"n\",\"name\":\"wwncwzzhxgk\",\"type\":\"rmgucnap\"}],\"nextLink\":\"eoellwptfdygp\"}") .toObject(ScriptPackagesList.class); - Assertions.assertEquals("q", model.nextLink()); + Assertions.assertEquals("eoellwptfdygp", 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 index 3ae8c767b79ca..15351aeb1b8ad 100644 --- 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 @@ -12,8 +12,8 @@ public final class ScriptParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptParameter model = BinaryData.fromString( - "{\"type\":\"Int\",\"name\":\"tjsyin\",\"description\":\"fq\",\"visibility\":\"Visible\",\"optional\":\"Required\"}") + "{\"type\":\"String\",\"name\":\"lauwzizxbmpgcjef\",\"description\":\"muvp\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}") .toObject(ScriptParameter.class); - Assertions.assertEquals("tjsyin", model.name()); + Assertions.assertEquals("lauwzizxbmpgcjef", 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 index 032f311acefa7..41b0ace68d201 100644 --- 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 @@ -11,19 +11,19 @@ public final class ScriptSecureStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScriptSecureStringExecutionParameter model = BinaryData - .fromString("{\"type\":\"SecureValue\",\"secureValue\":\"lhvygdyftu\",\"name\":\"rtwnawjslbi\"}") - .toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("rtwnawjslbi", model.name()); - Assertions.assertEquals("lhvygdyftu", model.secureValue()); + ScriptSecureStringExecutionParameter model + = BinaryData.fromString("{\"type\":\"SecureValue\",\"secureValue\":\"glsbjjc\",\"name\":\"nvxbvt\"}") + .toObject(ScriptSecureStringExecutionParameter.class); + Assertions.assertEquals("nvxbvt", model.name()); + Assertions.assertEquals("glsbjjc", model.secureValue()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScriptSecureStringExecutionParameter model - = new ScriptSecureStringExecutionParameter().withName("rtwnawjslbi").withSecureValue("lhvygdyftu"); + = new ScriptSecureStringExecutionParameter().withName("nvxbvt").withSecureValue("glsbjjc"); model = BinaryData.fromObject(model).toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("rtwnawjslbi", model.name()); - Assertions.assertEquals("lhvygdyftu", model.secureValue()); + Assertions.assertEquals("nvxbvt", model.name()); + Assertions.assertEquals("glsbjjc", 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 index 7f091137fd91d..9dd63f31474d0 100644 --- 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 @@ -12,18 +12,17 @@ public final class ScriptStringExecutionParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptStringExecutionParameter model - = BinaryData.fromString("{\"type\":\"Value\",\"value\":\"ojgcyzt\",\"name\":\"fmznba\"}") + = BinaryData.fromString("{\"type\":\"Value\",\"value\":\"dut\",\"name\":\"cormr\"}") .toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("fmznba", model.name()); - Assertions.assertEquals("ojgcyzt", model.value()); + Assertions.assertEquals("cormr", model.name()); + Assertions.assertEquals("dut", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptStringExecutionParameter model - = new ScriptStringExecutionParameter().withName("fmznba").withValue("ojgcyzt"); + ScriptStringExecutionParameter model = new ScriptStringExecutionParameter().withName("cormr").withValue("dut"); model = BinaryData.fromObject(model).toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("fmznba", model.name()); - Assertions.assertEquals("ojgcyzt", model.value()); + Assertions.assertEquals("cormr", model.name()); + Assertions.assertEquals("dut", model.value()); } } 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 index 1d156729303d0..5fc63066e5f3a 100644 --- 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 @@ -11,7 +11,7 @@ public final class VirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"v\",\"moRefId\":\"pzfoqoui\",\"folderPath\":\"bxarzgszufoxci\",\"restrictMovement\":\"Enabled\"},\"id\":\"doamciodhkha\",\"name\":\"xkhnzbonlwnto\",\"type\":\"gokdwbwhks\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xv\",\"moRefId\":\"u\",\"folderPath\":\"pz\",\"restrictMovement\":\"Disabled\"},\"id\":\"dzhlrq\",\"name\":\"bh\",\"type\":\"kfrlhrxsbky\"}") .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 index 862c0d7469fd4..dc545be2675b6 100644 --- 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 @@ -11,7 +11,7 @@ public final class VirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"displayName\":\"rvexztvb\",\"moRefId\":\"gsfraoyzkoow\",\"folderPath\":\"mnguxawqaldsyu\",\"restrictMovement\":\"Disabled\"}") + "{\"provisioningState\":\"Succeeded\",\"displayName\":\"anuzbpzkafkuw\",\"moRefId\":\"rnwb\",\"folderPath\":\"hhseyv\",\"restrictMovement\":\"Disabled\"}") .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 index ea199a37c62ba..38137b2b78ded 100644 --- 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 @@ -12,16 +12,16 @@ public final class VirtualMachineRestrictMovementTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Enabled\"}") + VirtualMachineRestrictMovement model = BinaryData.fromString("{\"restrictMovement\":\"Disabled\"}") .toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, model.restrictMovement()); + Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VirtualMachineRestrictMovement model - = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED); + = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.DISABLED); model = BinaryData.fromObject(model).toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, model.restrictMovement()); + Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java index f60ca505da8be..6f67a1b45def2 100644 --- 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 @@ -20,7 +20,7 @@ public final class VirtualMachinesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"au\",\"moRefId\":\"opionszon\",\"folderPath\":\"ngajinnixjawrtmj\",\"restrictMovement\":\"Enabled\"},\"id\":\"ccxlzhcoxovnek\",\"name\":\"enlusfn\",\"type\":\"dtjxtxrdcqt\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"muapcvhdbevw\",\"moRefId\":\"xeyskonqzinkfkbg\",\"folderPath\":\"bowxe\",\"restrictMovement\":\"Enabled\"},\"id\":\"jmygvk\",\"name\":\"qkjjeokbz\",\"type\":\"fezrx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); VirtualMachine response = manager.virtualMachines() - .getWithResponse("fugsnnfhyetefy", "oc", "ctfjgtixr", "vzuyturmlmu", com.azure.core.util.Context.NONE) + .getWithResponse("bcysih", "gqcwdhohsdtmc", "zsu", "cohdx", 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 index 02d306b728712..7e994a9b99348 100644 --- 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 @@ -21,7 +21,7 @@ public final class VirtualMachinesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"hokq\",\"moRefId\":\"bkau\",\"folderPath\":\"fshfph\",\"restrictMovement\":\"Disabled\"},\"id\":\"lai\",\"name\":\"wzejywhslw\",\"type\":\"ojpllndnpdwrpqaf\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"oudorhcgyyp\",\"moRefId\":\"twypundmbxh\",\"folderPath\":\"cmjkavlgorbmftpm\",\"restrictMovement\":\"Disabled\"},\"id\":\"jltfvnzcyjtotpv\",\"name\":\"pvpbdbzqgqqiheds\",\"type\":\"qwthmky\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.virtualMachines() - .list("taboidvmf", "hppubowsepdfgkmt", "herngb", com.azure.core.util.Context.NONE); + .list("fuxtyasiibmiybnn", "stgnl", "hnmgixhcm", 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 index 9eece92dc090f..39d6765a9f00c 100644 --- 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 @@ -12,8 +12,8 @@ public final class VirtualMachinesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"f\",\"moRefId\":\"eyvpnqicvinvkj\",\"folderPath\":\"dxrbuukzcle\",\"restrictMovement\":\"Disabled\"},\"id\":\"lw\",\"name\":\"aztz\",\"type\":\"ofncckwyfzqwhxxb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"zfeqztppri\",\"moRefId\":\"xorjaltolmncwsob\",\"folderPath\":\"csdbnwdcfhuc\",\"restrictMovement\":\"Disabled\"},\"id\":\"uvglsbjjcanvx\",\"name\":\"vtvudutncormr\",\"type\":\"xqtvcofu\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"gj\",\"moRefId\":\"gdknnqv\",\"folderPath\":\"znqntoru\",\"restrictMovement\":\"Disabled\"},\"id\":\"a\",\"name\":\"mkycgra\",\"type\":\"wjue\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ruvdmov\",\"moRefId\":\"zlxwabmqoefkifr\",\"folderPath\":\"puqujmqlgkfbtn\",\"restrictMovement\":\"Enabled\"},\"id\":\"n\",\"name\":\"bjcntujitc\",\"type\":\"ed\"}],\"nextLink\":\"wwa\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"bbovplwzbhvgyugu\",\"moRefId\":\"vmkfssxqu\",\"folderPath\":\"fpl\",\"restrictMovement\":\"Disabled\"},\"id\":\"xnkjzkdesl\",\"name\":\"vlopwiyighx\",\"type\":\"kdwzbaiuebbaumny\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"eojnabc\",\"moRefId\":\"smtxpsieb\",\"folderPath\":\"hvpesapskrdqm\",\"restrictMovement\":\"Disabled\"},\"id\":\"htldwk\",\"name\":\"zxuutkncwscwsvl\",\"type\":\"otogtwrupqs\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"cykvceo\",\"moRefId\":\"ilovnot\",\"folderPath\":\"jfcn\",\"restrictMovement\":\"Enabled\"},\"id\":\"nxdhbt\",\"name\":\"kphywpnvjto\",\"type\":\"nermcl\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"oxuscrpabgyepsbj\",\"moRefId\":\"zq\",\"folderPath\":\"xywpmueefjzwfqkq\",\"restrictMovement\":\"Enabled\"},\"id\":\"suyonobglaocq\",\"name\":\"tcc\",\"type\":\"g\"}],\"nextLink\":\"dxyt\"}") .toObject(VirtualMachinesList.class); - Assertions.assertEquals("wwa", model.nextLink()); + Assertions.assertEquals("dxyt", 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 index cf5482ae4d22e..1e66b68afba4a 100644 --- 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 @@ -17,13 +17,13 @@ public final class VmHostPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmHostPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmHost\",\"vmMembers\":[\"icslfaoq\",\"piyylhalnswhccsp\"],\"hostMembers\":[\"aivwitqscywu\",\"gwol\"],\"affinityType\":\"Affinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"ai\",\"provisioningState\":\"Succeeded\"}") + "{\"type\":\"VmHost\",\"vmMembers\":[\"uojgj\",\"wjue\",\"otwmcdyt\"],\"hostMembers\":[\"wit\"],\"affinityType\":\"AntiAffinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"gxhnisk\",\"provisioningState\":\"Failed\"}") .toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("ai", model.displayName()); - Assertions.assertEquals("icslfaoq", model.vmMembers().get(0)); - Assertions.assertEquals("aivwitqscywu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); + Assertions.assertEquals("gxhnisk", model.displayName()); + Assertions.assertEquals("uojgj", model.vmMembers().get(0)); + Assertions.assertEquals("wit", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } @@ -32,18 +32,18 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { VmHostPlacementPolicyProperties model = new VmHostPlacementPolicyProperties().withState(PlacementPolicyState.DISABLED) - .withDisplayName("ai") - .withVmMembers(Arrays.asList("icslfaoq", "piyylhalnswhccsp")) - .withHostMembers(Arrays.asList("aivwitqscywu", "gwol")) - .withAffinityType(AffinityType.AFFINITY) + .withDisplayName("gxhnisk") + .withVmMembers(Arrays.asList("uojgj", "wjue", "otwmcdyt")) + .withHostMembers(Arrays.asList("wit")) + .withAffinityType(AffinityType.ANTI_AFFINITY) .withAffinityStrength(AffinityStrength.SHOULD) .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); model = BinaryData.fromObject(model).toObject(VmHostPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("ai", model.displayName()); - Assertions.assertEquals("icslfaoq", model.vmMembers().get(0)); - Assertions.assertEquals("aivwitqscywu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); + Assertions.assertEquals("gxhnisk", model.displayName()); + Assertions.assertEquals("uojgj", model.vmMembers().get(0)); + Assertions.assertEquals("wit", model.hostMembers().get(0)); + Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java index 80c50dd45481f..9dfee0659c2ee 100644 --- 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 @@ -15,24 +15,24 @@ public final class VmPlacementPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VmPlacementPolicyProperties model = BinaryData.fromString( - "{\"type\":\"VmVm\",\"vmMembers\":[\"uhhziuiefozbhdm\",\"mlmz\"],\"affinityType\":\"Affinity\",\"state\":\"Enabled\",\"displayName\":\"rmaequ\",\"provisioningState\":\"Deleting\"}") + "{\"type\":\"VmVm\",\"vmMembers\":[\"owzxcu\",\"i\",\"jooxdjebw\"],\"affinityType\":\"Affinity\",\"state\":\"Enabled\",\"displayName\":\"fvovbvmeuecivy\",\"provisioningState\":\"Failed\"}") .toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("rmaequ", model.displayName()); - Assertions.assertEquals("uhhziuiefozbhdm", model.vmMembers().get(0)); + Assertions.assertEquals("fvovbvmeuecivy", model.displayName()); + Assertions.assertEquals("owzxcu", model.vmMembers().get(0)); Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VmPlacementPolicyProperties model = new VmPlacementPolicyProperties().withState(PlacementPolicyState.ENABLED) - .withDisplayName("rmaequ") - .withVmMembers(Arrays.asList("uhhziuiefozbhdm", "mlmz")) + .withDisplayName("fvovbvmeuecivy") + .withVmMembers(Arrays.asList("owzxcu", "i", "jooxdjebw")) .withAffinityType(AffinityType.AFFINITY); model = BinaryData.fromObject(model).toObject(VmPlacementPolicyProperties.class); Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("rmaequ", model.displayName()); - Assertions.assertEquals("uhhziuiefozbhdm", model.vmMembers().get(0)); + Assertions.assertEquals("fvovbvmeuecivy", model.displayName()); + Assertions.assertEquals("owzxcu", model.vmMembers().get(0)); Assertions.assertEquals(AffinityType.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 index b0e37493d43aa..0613cdd311b82 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkDhcpEntityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpEntity model = BinaryData.fromString( - "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"kv\",\"segments\":[\"lmqkrhahvlj\",\"ahaquh\"],\"provisioningState\":\"Failed\",\"revision\":4716171323603349027}") + "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"rv\",\"segments\":[\"pmfi\",\"bfggjioolvr\",\"x\"],\"provisioningState\":\"Building\",\"revision\":201556653544263409}") .toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("kv", model.displayName()); - Assertions.assertEquals(4716171323603349027L, model.revision()); + Assertions.assertEquals("rv", model.displayName()); + Assertions.assertEquals(201556653544263409L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkDhcpEntity model - = new WorkloadNetworkDhcpEntity().withDisplayName("kv").withRevision(4716171323603349027L); + = new WorkloadNetworkDhcpEntity().withDisplayName("rv").withRevision(201556653544263409L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("kv", model.displayName()); - Assertions.assertEquals(4716171323603349027L, model.revision()); + Assertions.assertEquals("rv", model.displayName()); + Assertions.assertEquals(201556653544263409L, 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 index 5f5137d2db097..8c319f9f5f17e 100644 --- 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 @@ -13,18 +13,18 @@ public final class WorkloadNetworkDhcpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpInner model = BinaryData.fromString( - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"uwbc\",\"segments\":[\"bmehh\"],\"provisioningState\":\"Deleting\",\"revision\":2958870513291350994},\"id\":\"rts\",\"name\":\"hspkdeemao\",\"type\":\"mx\"}") + "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"tjsyin\",\"segments\":[\"qatmtdhtmdvy\"],\"provisioningState\":\"Succeeded\",\"revision\":7953248130446233855},\"id\":\"zywkb\",\"name\":\"rryuzhlhkjo\",\"type\":\"rvqqaatj\"}") .toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("uwbc", model.properties().displayName()); - Assertions.assertEquals(2958870513291350994L, model.properties().revision()); + Assertions.assertEquals("tjsyin", model.properties().displayName()); + Assertions.assertEquals(7953248130446233855L, model.properties().revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner() - .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("uwbc").withRevision(2958870513291350994L)); + WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner().withProperties( + new WorkloadNetworkDhcpEntity().withDisplayName("tjsyin").withRevision(7953248130446233855L)); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("uwbc", model.properties().displayName()); - Assertions.assertEquals(2958870513291350994L, model.properties().revision()); + Assertions.assertEquals("tjsyin", model.properties().displayName()); + Assertions.assertEquals(7953248130446233855L, 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 index 2524648dd187c..f28a48bc3a12b 100644 --- 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 @@ -12,10 +12,10 @@ public final class WorkloadNetworkDhcpListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"mgyudxytlmoyrxv\",\"segments\":[\"dw\"],\"provisioningState\":\"Building\",\"revision\":6478150774243714531},\"id\":\"zhlrqjb\",\"name\":\"ck\",\"type\":\"rlhrxs\"}],\"nextLink\":\"yvpycanuzbpzk\"}") + "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"xu\",\"segments\":[\"dwzrmuh\",\"pfcqdp\",\"qxqvpsvuoymgc\",\"elvezrypq\"],\"provisioningState\":\"Deleting\",\"revision\":6554810180988949657},\"id\":\"rqwky\",\"name\":\"kobopgxed\",\"type\":\"owepbqpcrfkb\"}],\"nextLink\":\"csnjvcdwxlpqekft\"}") .toObject(WorkloadNetworkDhcpList.class); - Assertions.assertEquals("mgyudxytlmoyrxv", model.value().get(0).properties().displayName()); - Assertions.assertEquals(6478150774243714531L, model.value().get(0).properties().revision()); - Assertions.assertEquals("yvpycanuzbpzk", model.nextLink()); + Assertions.assertEquals("xu", model.value().get(0).properties().displayName()); + Assertions.assertEquals(6554810180988949657L, model.value().get(0).properties().revision()); + Assertions.assertEquals("csnjvcdwxlpqekft", 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 index ae22f0c35bcd6..451801be224b2 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkDhcpRelayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpRelay model = BinaryData.fromString( - "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"isgwbnbbeldawkz\",\"ali\"],\"displayName\":\"rqhakauha\",\"segments\":[\"fwxosowzxcu\",\"i\",\"jooxdjebw\"],\"provisioningState\":\"Succeeded\",\"revision\":7246200145127571189}") + "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"tlpdn\",\"itvgbmhrixkwm\",\"ijejvegrhbpn\"],\"displayName\":\"xexccbdreaxhcexd\",\"segments\":[\"qahqkghtpwijn\",\"yjsvfyc\",\"z\"],\"provisioningState\":\"Building\",\"revision\":7035584365835539552}") .toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("rqhakauha", model.displayName()); - Assertions.assertEquals(7246200145127571189L, model.revision()); - Assertions.assertEquals("isgwbnbbeldawkz", model.serverAddresses().get(0)); + Assertions.assertEquals("xexccbdreaxhcexd", model.displayName()); + Assertions.assertEquals(7035584365835539552L, model.revision()); + Assertions.assertEquals("tlpdn", model.serverAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("rqhakauha") - .withRevision(7246200145127571189L) - .withServerAddresses(Arrays.asList("isgwbnbbeldawkz", "ali")); + WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("xexccbdreaxhcexd") + .withRevision(7035584365835539552L) + .withServerAddresses(Arrays.asList("tlpdn", "itvgbmhrixkwm", "ijejvegrhbpn")); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("rqhakauha", model.displayName()); - Assertions.assertEquals(7246200145127571189L, model.revision()); - Assertions.assertEquals("isgwbnbbeldawkz", model.serverAddresses().get(0)); + Assertions.assertEquals("xexccbdreaxhcexd", model.displayName()); + Assertions.assertEquals(7035584365835539552L, model.revision()); + Assertions.assertEquals("tlpdn", 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 index 8517c0d6855b9..efb6b0ce98137 100644 --- 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 @@ -12,24 +12,24 @@ public final class WorkloadNetworkDhcpServerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDhcpServer model = BinaryData.fromString( - "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"laexqp\",\"leaseTime\":3403871146459803360,\"displayName\":\"ws\",\"segments\":[\"gvxp\"],\"provisioningState\":\"Deleting\",\"revision\":7205793596406177755}") + "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"lqwjygvjayvblm\",\"leaseTime\":593391508400046676,\"displayName\":\"hbxvvyhgsopbyrqu\",\"segments\":[\"xuvw\"],\"provisioningState\":\"Failed\",\"revision\":8014747037216452315}") .toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("ws", model.displayName()); - Assertions.assertEquals(7205793596406177755L, model.revision()); - Assertions.assertEquals("laexqp", model.serverAddress()); - Assertions.assertEquals(3403871146459803360L, model.leaseTime()); + Assertions.assertEquals("hbxvvyhgsopbyrqu", model.displayName()); + Assertions.assertEquals(8014747037216452315L, model.revision()); + Assertions.assertEquals("lqwjygvjayvblm", model.serverAddress()); + Assertions.assertEquals(593391508400046676L, model.leaseTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("ws") - .withRevision(7205793596406177755L) - .withServerAddress("laexqp") - .withLeaseTime(3403871146459803360L); + WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("hbxvvyhgsopbyrqu") + .withRevision(8014747037216452315L) + .withServerAddress("lqwjygvjayvblm") + .withLeaseTime(593391508400046676L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("ws", model.displayName()); - Assertions.assertEquals(7205793596406177755L, model.revision()); - Assertions.assertEquals("laexqp", model.serverAddress()); - Assertions.assertEquals(3403871146459803360L, model.leaseTime()); + Assertions.assertEquals("hbxvvyhgsopbyrqu", model.displayName()); + Assertions.assertEquals(8014747037216452315L, model.revision()); + Assertions.assertEquals("lqwjygvjayvblm", model.serverAddress()); + Assertions.assertEquals(593391508400046676L, 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 index da403e9b2681e..5ddcd297d33cf 100644 --- 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 @@ -14,30 +14,30 @@ public final class WorkloadNetworkDnsServiceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"utiiswacf\",\"dnsServiceIp\":\"dkzzewkfvhqcrail\",\"defaultDnsZone\":\"n\",\"fqdnZones\":[\"uflrwd\",\"hdlxyjrxsagafcn\",\"hgw\"],\"logLevel\":\"WARNING\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3702419407947008695},\"id\":\"kcvqvpke\",\"name\":\"dcvd\",\"type\":\"hvoodsotbobzd\"}") + "{\"properties\":{\"displayName\":\"ywjhhgdnhx\",\"dnsServiceIp\":\"ivfomiloxgg\",\"defaultDnsZone\":\"fi\",\"fqdnZones\":[\"ieuzaofjchvcyyy\",\"fgdo\",\"cubiipuipw\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":3925666504611058153},\"id\":\"izsh\",\"name\":\"vcimpev\",\"type\":\"gmblrri\"}") .toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("utiiswacf", model.displayName()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.dnsServiceIp()); - Assertions.assertEquals("n", model.defaultDnsZone()); - Assertions.assertEquals("uflrwd", model.fqdnZones().get(0)); + Assertions.assertEquals("ywjhhgdnhx", model.displayName()); + Assertions.assertEquals("ivfomiloxgg", model.dnsServiceIp()); + Assertions.assertEquals("fi", model.defaultDnsZone()); + Assertions.assertEquals("ieuzaofjchvcyyy", model.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(3702419407947008695L, model.revision()); + Assertions.assertEquals(3925666504611058153L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("utiiswacf") - .withDnsServiceIp("dkzzewkfvhqcrail") - .withDefaultDnsZone("n") - .withFqdnZones(Arrays.asList("uflrwd", "hdlxyjrxsagafcn", "hgw")) + WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("ywjhhgdnhx") + .withDnsServiceIp("ivfomiloxgg") + .withDefaultDnsZone("fi") + .withFqdnZones(Arrays.asList("ieuzaofjchvcyyy", "fgdo", "cubiipuipw")) .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(3702419407947008695L); + .withRevision(3925666504611058153L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("utiiswacf", model.displayName()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.dnsServiceIp()); - Assertions.assertEquals("n", model.defaultDnsZone()); - Assertions.assertEquals("uflrwd", model.fqdnZones().get(0)); + Assertions.assertEquals("ywjhhgdnhx", model.displayName()); + Assertions.assertEquals("ivfomiloxgg", model.dnsServiceIp()); + Assertions.assertEquals("fi", model.defaultDnsZone()); + Assertions.assertEquals("ieuzaofjchvcyyy", model.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(3702419407947008695L, model.revision()); + Assertions.assertEquals(3925666504611058153L, 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 index 18344793c00e5..5a115f87d50f1 100644 --- 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 @@ -14,30 +14,31 @@ public final class WorkloadNetworkDnsServicePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServiceProperties model = BinaryData.fromString( - "{\"displayName\":\"cjwvn\",\"dnsServiceIp\":\"ld\",\"defaultDnsZone\":\"gx\",\"fqdnZones\":[\"slpmutwuo\",\"grpkhjwniyqs\",\"uicpd\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":2377355799268639179}") + "{\"displayName\":\"ywdxsmic\",\"dnsServiceIp\":\"rwfscjfnynszquj\",\"defaultDnsZone\":\"dvoqyt\",\"fqdnZones\":[\"owbb\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":805790317647492283}") .toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("cjwvn", model.displayName()); - Assertions.assertEquals("ld", model.dnsServiceIp()); - Assertions.assertEquals("gx", model.defaultDnsZone()); - Assertions.assertEquals("slpmutwuo", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(2377355799268639179L, model.revision()); + Assertions.assertEquals("ywdxsmic", model.displayName()); + Assertions.assertEquals("rwfscjfnynszquj", model.dnsServiceIp()); + Assertions.assertEquals("dvoqyt", model.defaultDnsZone()); + Assertions.assertEquals("owbb", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); + Assertions.assertEquals(805790317647492283L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("cjwvn") - .withDnsServiceIp("ld") - .withDefaultDnsZone("gx") - .withFqdnZones(Arrays.asList("slpmutwuo", "grpkhjwniyqs", "uicpd")) - .withLogLevel(DnsServiceLogLevelEnum.DEBUG) - .withRevision(2377355799268639179L); + WorkloadNetworkDnsServiceProperties model + = new WorkloadNetworkDnsServiceProperties().withDisplayName("ywdxsmic") + .withDnsServiceIp("rwfscjfnynszquj") + .withDefaultDnsZone("dvoqyt") + .withFqdnZones(Arrays.asList("owbb")) + .withLogLevel(DnsServiceLogLevelEnum.ERROR) + .withRevision(805790317647492283L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("cjwvn", model.displayName()); - Assertions.assertEquals("ld", model.dnsServiceIp()); - Assertions.assertEquals("gx", model.defaultDnsZone()); - Assertions.assertEquals("slpmutwuo", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(2377355799268639179L, model.revision()); + Assertions.assertEquals("ywdxsmic", model.displayName()); + Assertions.assertEquals("rwfscjfnynszquj", model.dnsServiceIp()); + Assertions.assertEquals("dvoqyt", model.defaultDnsZone()); + Assertions.assertEquals("owbb", model.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.logLevel()); + Assertions.assertEquals(805790317647492283L, 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 index 6b536cdc00c87..349b7cd8f0798 100644 --- 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 @@ -13,14 +13,14 @@ public final class WorkloadNetworkDnsServicesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsServicesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"xe\",\"dnsServiceIp\":\"nzbtbhj\",\"defaultDnsZone\":\"lkfg\",\"fqdnZones\":[\"neuelfphsdyhtoz\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":5092229497552336172},\"id\":\"xzxcl\",\"name\":\"ithhqzon\",\"type\":\"sg\"}],\"nextLink\":\"hcohfwdsjnk\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"qybaryeua\",\"dnsServiceIp\":\"kq\",\"defaultDnsZone\":\"qgzsles\",\"fqdnZones\":[\"hernntiewdjc\",\"bquwrbehw\",\"gohbuffkmrq\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":3657364039140978355},\"id\":\"futacoebjvewzc\",\"name\":\"znmwcp\",\"type\":\"guaadraufactkahz\"},{\"properties\":{\"displayName\":\"jjziuxxpsh\",\"dnsServiceIp\":\"e\",\"defaultDnsZone\":\"lfg\",\"fqdnZones\":[\"ubkwdle\",\"rds\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":5977101318302182370},\"id\":\"hminyflnorwmduv\",\"name\":\"pklvxw\",\"type\":\"ygdxpgpqchis\"},{\"properties\":{\"displayName\":\"nnbj\",\"dnsServiceIp\":\"xgibbda\",\"defaultDnsZone\":\"onfo\",\"fqdnZones\":[\"orsukokwbqp\"],\"logLevel\":\"DEBUG\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":7056990023571937899},\"id\":\"r\",\"name\":\"hw\",\"type\":\"soldweyuqdunv\"}],\"nextLink\":\"nrwrbiork\"}") .toObject(WorkloadNetworkDnsServicesList.class); - Assertions.assertEquals("xe", model.value().get(0).displayName()); - Assertions.assertEquals("nzbtbhj", model.value().get(0).dnsServiceIp()); - Assertions.assertEquals("lkfg", model.value().get(0).defaultDnsZone()); - Assertions.assertEquals("neuelfphsdyhtoz", model.value().get(0).fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.value().get(0).logLevel()); - Assertions.assertEquals(5092229497552336172L, model.value().get(0).revision()); - Assertions.assertEquals("hcohfwdsjnk", model.nextLink()); + Assertions.assertEquals("qybaryeua", model.value().get(0).displayName()); + Assertions.assertEquals("kq", model.value().get(0).dnsServiceIp()); + Assertions.assertEquals("qgzsles", model.value().get(0).defaultDnsZone()); + Assertions.assertEquals("hernntiewdjc", model.value().get(0).fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, model.value().get(0).logLevel()); + Assertions.assertEquals(3657364039140978355L, model.value().get(0).revision()); + Assertions.assertEquals("nrwrbiork", 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 index 595d674a2b4b8..5e9d3120f54ce 100644 --- 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 @@ -13,30 +13,30 @@ public final class WorkloadNetworkDnsZoneInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"smypyynpc\",\"domain\":[\"mnzgmwznmabi\",\"nsorgjhxbldt\",\"wwrlkdmtncv\",\"kotl\"],\"dnsServerIps\":[\"yhgsy\"],\"sourceIp\":\"ogjltdtbnnhad\",\"dnsServices\":2230966046874594524,\"provisioningState\":\"Canceled\",\"revision\":5398551830021510565},\"id\":\"nvpamq\",\"name\":\"x\",\"type\":\"queziky\"}") + "{\"properties\":{\"displayName\":\"il\",\"domain\":[\"wt\",\"gkxnyedabg\"],\"dnsServerIps\":[\"dtj\",\"ewbcihxuuw\",\"c\"],\"sourceIp\":\"xccybvpa\",\"dnsServices\":6238077672035548376,\"provisioningState\":\"Succeeded\",\"revision\":1791393814695153018},\"id\":\"wjplma\",\"name\":\"stcyohpfkyrkdbd\",\"type\":\"iogsjkmnwq\"}") .toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("smypyynpc", model.displayName()); - Assertions.assertEquals("mnzgmwznmabi", model.domain().get(0)); - Assertions.assertEquals("yhgsy", model.dnsServerIps().get(0)); - Assertions.assertEquals("ogjltdtbnnhad", model.sourceIp()); - Assertions.assertEquals(2230966046874594524L, model.dnsServices()); - Assertions.assertEquals(5398551830021510565L, model.revision()); + Assertions.assertEquals("il", model.displayName()); + Assertions.assertEquals("wt", model.domain().get(0)); + Assertions.assertEquals("dtj", model.dnsServerIps().get(0)); + Assertions.assertEquals("xccybvpa", model.sourceIp()); + Assertions.assertEquals(6238077672035548376L, model.dnsServices()); + Assertions.assertEquals(1791393814695153018L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("smypyynpc") - .withDomain(Arrays.asList("mnzgmwznmabi", "nsorgjhxbldt", "wwrlkdmtncv", "kotl")) - .withDnsServerIps(Arrays.asList("yhgsy")) - .withSourceIp("ogjltdtbnnhad") - .withDnsServices(2230966046874594524L) - .withRevision(5398551830021510565L); + WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("il") + .withDomain(Arrays.asList("wt", "gkxnyedabg")) + .withDnsServerIps(Arrays.asList("dtj", "ewbcihxuuw", "c")) + .withSourceIp("xccybvpa") + .withDnsServices(6238077672035548376L) + .withRevision(1791393814695153018L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("smypyynpc", model.displayName()); - Assertions.assertEquals("mnzgmwznmabi", model.domain().get(0)); - Assertions.assertEquals("yhgsy", model.dnsServerIps().get(0)); - Assertions.assertEquals("ogjltdtbnnhad", model.sourceIp()); - Assertions.assertEquals(2230966046874594524L, model.dnsServices()); - Assertions.assertEquals(5398551830021510565L, model.revision()); + Assertions.assertEquals("il", model.displayName()); + Assertions.assertEquals("wt", model.domain().get(0)); + Assertions.assertEquals("dtj", model.dnsServerIps().get(0)); + Assertions.assertEquals("xccybvpa", model.sourceIp()); + Assertions.assertEquals(6238077672035548376L, model.dnsServices()); + Assertions.assertEquals(1791393814695153018L, 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 index 024e18631d993..6fbcf6f68e10f 100644 --- 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 @@ -13,30 +13,31 @@ public final class WorkloadNetworkDnsZonePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZoneProperties model = BinaryData.fromString( - "{\"displayName\":\"gxk\",\"domain\":[\"atmelwui\"],\"dnsServerIps\":[\"cjzkzivgvvcna\",\"rhyrnxxmueed\",\"drd\"],\"sourceIp\":\"tkwqqtchealm\",\"dnsServices\":2875480604821792642,\"provisioningState\":\"Canceled\",\"revision\":2951445315314991952}") + "{\"displayName\":\"obaiyhddviaceg\",\"domain\":[\"ntfpmvmemfnc\"],\"dnsServerIps\":[\"vvbalx\"],\"sourceIp\":\"lchpodbzevwrdn\",\"dnsServices\":4609142412513709253,\"provisioningState\":\"Canceled\",\"revision\":9047416798509661707}") .toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("gxk", model.displayName()); - Assertions.assertEquals("atmelwui", model.domain().get(0)); - Assertions.assertEquals("cjzkzivgvvcna", model.dnsServerIps().get(0)); - Assertions.assertEquals("tkwqqtchealm", model.sourceIp()); - Assertions.assertEquals(2875480604821792642L, model.dnsServices()); - Assertions.assertEquals(2951445315314991952L, model.revision()); + Assertions.assertEquals("obaiyhddviaceg", model.displayName()); + Assertions.assertEquals("ntfpmvmemfnc", model.domain().get(0)); + Assertions.assertEquals("vvbalx", model.dnsServerIps().get(0)); + Assertions.assertEquals("lchpodbzevwrdn", model.sourceIp()); + Assertions.assertEquals(4609142412513709253L, model.dnsServices()); + Assertions.assertEquals(9047416798509661707L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("gxk") - .withDomain(Arrays.asList("atmelwui")) - .withDnsServerIps(Arrays.asList("cjzkzivgvvcna", "rhyrnxxmueed", "drd")) - .withSourceIp("tkwqqtchealm") - .withDnsServices(2875480604821792642L) - .withRevision(2951445315314991952L); + WorkloadNetworkDnsZoneProperties model + = new WorkloadNetworkDnsZoneProperties().withDisplayName("obaiyhddviaceg") + .withDomain(Arrays.asList("ntfpmvmemfnc")) + .withDnsServerIps(Arrays.asList("vvbalx")) + .withSourceIp("lchpodbzevwrdn") + .withDnsServices(4609142412513709253L) + .withRevision(9047416798509661707L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("gxk", model.displayName()); - Assertions.assertEquals("atmelwui", model.domain().get(0)); - Assertions.assertEquals("cjzkzivgvvcna", model.dnsServerIps().get(0)); - Assertions.assertEquals("tkwqqtchealm", model.sourceIp()); - Assertions.assertEquals(2875480604821792642L, model.dnsServices()); - Assertions.assertEquals(2951445315314991952L, model.revision()); + Assertions.assertEquals("obaiyhddviaceg", model.displayName()); + Assertions.assertEquals("ntfpmvmemfnc", model.domain().get(0)); + Assertions.assertEquals("vvbalx", model.dnsServerIps().get(0)); + Assertions.assertEquals("lchpodbzevwrdn", model.sourceIp()); + Assertions.assertEquals(4609142412513709253L, model.dnsServices()); + Assertions.assertEquals(9047416798509661707L, 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 index e774e2d7a96ba..5c13c35f14019 100644 --- 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 @@ -12,14 +12,14 @@ public final class WorkloadNetworkDnsZonesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkDnsZonesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"modfvuefywsbpfvm\",\"domain\":[\"rfouyftaakcpw\",\"yzvqt\"],\"dnsServerIps\":[\"bexkpzksmondj\"],\"sourceIp\":\"uxvypomgkopkwh\",\"dnsServices\":47183864428618035,\"provisioningState\":\"Canceled\",\"revision\":6027886219408436897},\"id\":\"smocmbq\",\"name\":\"qvmkcxo\",\"type\":\"apvhelxprgly\"},{\"properties\":{\"displayName\":\"dckcbc\",\"domain\":[\"rjxgciqib\",\"hos\",\"sdqrhzoymibmrq\",\"ibahwflus\"],\"dnsServerIps\":[\"mhrkwofyyvoqacp\",\"expbtg\",\"wbwo\",\"nwashrtd\"],\"sourceIp\":\"cnqxwbpokulpi\",\"dnsServices\":6830630218833714201,\"provisioningState\":\"Deleting\",\"revision\":1202571290361403211},\"id\":\"iobyu\",\"name\":\"erpqlpqwcciuqg\",\"type\":\"dbutauvfbtkuwhh\"},{\"properties\":{\"displayName\":\"k\",\"domain\":[\"xafnndlpichko\",\"mkcdyhbpkkpwdre\"],\"dnsServerIps\":[\"vvqfovljxyws\",\"w\",\"yrs\",\"dsytgadgvr\"],\"sourceIp\":\"aeneqnzarrwl\",\"dnsServices\":6003700384655384876,\"provisioningState\":\"Updating\",\"revision\":1802422075284970664},\"id\":\"e\",\"name\":\"iipfpubj\",\"type\":\"bwwift\"},{\"properties\":{\"displayName\":\"kvpuvksgplsaknyn\",\"domain\":[\"n\"],\"dnsServerIps\":[\"huopxodlqiynto\"],\"sourceIp\":\"ihleos\",\"dnsServices\":1042560535262747024,\"provisioningState\":\"Failed\",\"revision\":9060898955426619734},\"id\":\"rpzbchckqqzqi\",\"name\":\"xiy\",\"type\":\"uiizynke\"}],\"nextLink\":\"atrwyhqmibzyh\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"oismsksbpimlqol\",\"domain\":[\"cgxxlxs\",\"fgcviz\",\"zdwlvwlyoupfgfb\",\"jub\"],\"dnsServerIps\":[\"gkfmins\",\"owzfttsttkt\"],\"sourceIp\":\"hbq\",\"dnsServices\":2084936073486724926,\"provisioningState\":\"Updating\",\"revision\":5228889169279168273},\"id\":\"itmmqtgqqqxh\",\"name\":\"n\",\"type\":\"rxcpjuisavo\"},{\"properties\":{\"displayName\":\"zfvazi\",\"domain\":[\"frqttbajlkatnw\"],\"dnsServerIps\":[\"opidkqqfkuv\",\"cxkdmligovi\"],\"sourceIp\":\"xk\",\"dnsServices\":5344178861543099367,\"provisioningState\":\"Deleting\",\"revision\":7839348907850790126},\"id\":\"cbgoor\",\"name\":\"te\",\"type\":\"ybfhjxa\"}],\"nextLink\":\"vjgsl\"}") .toObject(WorkloadNetworkDnsZonesList.class); - Assertions.assertEquals("modfvuefywsbpfvm", model.value().get(0).displayName()); - Assertions.assertEquals("rfouyftaakcpw", model.value().get(0).domain().get(0)); - Assertions.assertEquals("bexkpzksmondj", model.value().get(0).dnsServerIps().get(0)); - Assertions.assertEquals("uxvypomgkopkwh", model.value().get(0).sourceIp()); - Assertions.assertEquals(47183864428618035L, model.value().get(0).dnsServices()); - Assertions.assertEquals(6027886219408436897L, model.value().get(0).revision()); - Assertions.assertEquals("atrwyhqmibzyh", model.nextLink()); + Assertions.assertEquals("oismsksbpimlqol", model.value().get(0).displayName()); + Assertions.assertEquals("cgxxlxs", model.value().get(0).domain().get(0)); + Assertions.assertEquals("gkfmins", model.value().get(0).dnsServerIps().get(0)); + Assertions.assertEquals("hbq", model.value().get(0).sourceIp()); + Assertions.assertEquals(2084936073486724926L, model.value().get(0).dnsServices()); + Assertions.assertEquals(5228889169279168273L, model.value().get(0).revision()); + Assertions.assertEquals("vjgsl", 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 index c2f559508cd7a..9d1591a3d226a 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkGatewayInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"auwhvylwzbtdhx\",\"path\":\"znbmpowuwprzq\"},\"id\":\"eualupjmkhf\",\"name\":\"obbc\",\"type\":\"wsrtjriplrbpbe\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xhojuj\",\"path\":\"pelmcuvhixbjxyf\"},\"id\":\"yl\",\"name\":\"coolsttpkiwkkb\",\"type\":\"ujrywvtyl\"}") .toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("auwhvylwzbtdhx", model.displayName()); + Assertions.assertEquals("xhojuj", 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 index d263d1eb89651..ab9ae6c6763d0 100644 --- 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 @@ -12,9 +12,9 @@ public final class WorkloadNetworkGatewayListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkGatewayList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"meue\",\"path\":\"vyhzceuojgjrwj\"},\"id\":\"iotwmcdytdxwit\",\"name\":\"nrjawgqwg\",\"type\":\"hniskxfbkpyc\"}],\"nextLink\":\"lwn\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"gjqppy\",\"path\":\"tronzmyhgfi\"},\"id\":\"sxkm\",\"name\":\"waekrrjreafxtsgu\",\"type\":\"hjglikk\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"lbqpvuzlmvfelf\",\"path\":\"gplcrpwjxeznoigb\"},\"id\":\"jwmwkpnbs\",\"name\":\"zejjoqk\",\"type\":\"gfhsxttaugzxn\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"xdtnkdmkqjjlw\",\"path\":\"nvrk\"},\"id\":\"ou\",\"name\":\"ibreb\",\"type\":\"aays\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"tnqttezlwfffiak\",\"path\":\"pqqmted\"},\"id\":\"mmji\",\"name\":\"yeozphvwauyqncy\",\"type\":\"upkvipmdsc\"}],\"nextLink\":\"qupevzh\"}") .toObject(WorkloadNetworkGatewayList.class); - Assertions.assertEquals("meue", model.value().get(0).displayName()); - Assertions.assertEquals("lwn", model.nextLink()); + Assertions.assertEquals("gjqppy", model.value().get(0).displayName()); + Assertions.assertEquals("qupevzh", 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 index 8dcb6adc036ab..c753364b64811 100644 --- 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 @@ -11,9 +11,9 @@ public final class WorkloadNetworkGatewayPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkGatewayProperties model - = BinaryData.fromString("{\"provisioningState\":\"Updating\",\"displayName\":\"fgb\",\"path\":\"gw\"}") - .toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("fgb", model.displayName()); + WorkloadNetworkGatewayProperties model = BinaryData + .fromString("{\"provisioningState\":\"Building\",\"displayName\":\"curdoiwiitht\",\"path\":\"ubxcbihw\"}") + .toObject(WorkloadNetworkGatewayProperties.class); + Assertions.assertEquals("curdoiwiitht", 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 index 012f68835bfe6..f5c9499b60b69 100644 --- 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 @@ -11,7 +11,7 @@ public final class WorkloadNetworkInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"nehmpvecx\",\"name\":\"odebfqkkrbmpu\",\"type\":\"gr\"}") + "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"sdsttwvog\",\"name\":\"bbejdcngqqm\",\"type\":\"akufgmjz\"}") .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 index abe447675fb70..6a0984ab5e757 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"xzpuzycisp\",\"name\":\"qzahmgkbrp\",\"type\":\"y\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"uqqkpik\",\"name\":\"drgvtqagn\",\"type\":\"uynhijg\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"siarbutrcvpn\",\"name\":\"zzmhjrunmpxttd\",\"type\":\"hrbnlankxmyskpbh\"}],\"nextLink\":\"btkcxywnytnrsyn\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\"},\"id\":\"bt\",\"name\":\"gsfraoyzkoow\",\"type\":\"lmnguxaw\"},{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"yuuximerqfobwyzn\",\"name\":\"bykutw\",\"type\":\"fhpagmhrskdsnf\"}],\"nextLink\":\"doakgtdlmkkzevdl\"}") .toObject(WorkloadNetworkList.class); - Assertions.assertEquals("btkcxywnytnrsyn", model.nextLink()); + Assertions.assertEquals("doakgtdlmkkzevdl", 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 index ba2f8da9bad0b..4be2e2b56f488 100644 --- 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 @@ -13,27 +13,27 @@ public final class WorkloadNetworkPortMirroringInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"xknalaulppg\",\"direction\":\"INGRESS\",\"source\":\"napnyiropuhpigv\",\"destination\":\"ylgqgitxmedjvcsl\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":1214544725492398973},\"id\":\"zhxgktrmgucn\",\"name\":\"pkteo\",\"type\":\"llwptfdy\"}") + "{\"properties\":{\"displayName\":\"ojlpijnkrxf\",\"direction\":\"EGRESS\",\"source\":\"c\",\"destination\":\"tizzronasxif\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":319144288054659459},\"id\":\"wesgogczh\",\"name\":\"nnxk\",\"type\":\"lgnyhmo\"}") .toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("xknalaulppg", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("napnyiropuhpigv", model.source()); - Assertions.assertEquals("ylgqgitxmedjvcsl", model.destination()); - Assertions.assertEquals(1214544725492398973L, model.revision()); + Assertions.assertEquals("ojlpijnkrxf", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); + Assertions.assertEquals("c", model.source()); + Assertions.assertEquals("tizzronasxif", model.destination()); + Assertions.assertEquals(319144288054659459L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("xknalaulppg") - .withDirection(PortMirroringDirectionEnum.INGRESS) - .withSource("napnyiropuhpigv") - .withDestination("ylgqgitxmedjvcsl") - .withRevision(1214544725492398973L); + WorkloadNetworkPortMirroringInner model = new WorkloadNetworkPortMirroringInner().withDisplayName("ojlpijnkrxf") + .withDirection(PortMirroringDirectionEnum.EGRESS) + .withSource("c") + .withDestination("tizzronasxif") + .withRevision(319144288054659459L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("xknalaulppg", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("napnyiropuhpigv", model.source()); - Assertions.assertEquals("ylgqgitxmedjvcsl", model.destination()); - Assertions.assertEquals(1214544725492398973L, model.revision()); + Assertions.assertEquals("ojlpijnkrxf", model.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.direction()); + Assertions.assertEquals("c", model.source()); + Assertions.assertEquals("tizzronasxif", model.destination()); + Assertions.assertEquals(319144288054659459L, 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 index dc6928bc6a1bd..c9d9728a5899e 100644 --- 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 @@ -13,13 +13,13 @@ public final class WorkloadNetworkPortMirroringListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"v\",\"direction\":\"EGRESS\",\"source\":\"begibtnmxiebwwa\",\"destination\":\"ayqcgw\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":4790866258005538380},\"id\":\"zmh\",\"name\":\"xongmtsavjcbpwxq\",\"type\":\"srknftguv\"},{\"properties\":{\"displayName\":\"hprwmdyv\",\"direction\":\"INGRESS\",\"source\":\"yriwwroyqb\",\"destination\":\"rmcqiby\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":6160997583833316786},\"id\":\"fqsgzvahapjy\",\"name\":\"hpvgqz\",\"type\":\"j\"},{\"properties\":{\"displayName\":\"djzlmwlx\",\"direction\":\"EGRESS\",\"source\":\"fhzovawjvzunluth\",\"destination\":\"prnxipeil\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":7642090703106785822},\"id\":\"ultskzbbtdz\",\"name\":\"mv\",\"type\":\"ekg\"},{\"properties\":{\"displayName\":\"zuhkfpbsjyof\",\"direction\":\"INGRESS\",\"source\":\"us\",\"destination\":\"touwaboekqv\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":2434745920403430654},\"id\":\"wyjsflhhcaalnjix\",\"name\":\"sxyawjoyaqcs\",\"type\":\"yjpkiidzyexz\"}],\"nextLink\":\"lixhnrztfol\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"dntwjchrdgo\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"mwctondzjluudfd\",\"destination\":\"gg\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":5516945390083190100},\"id\":\"tgseinqfiufxqkn\",\"name\":\"irgne\",\"type\":\"ttwqmsni\"}],\"nextLink\":\"cdm\"}") .toObject(WorkloadNetworkPortMirroringList.class); - Assertions.assertEquals("v", model.value().get(0).displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.value().get(0).direction()); - Assertions.assertEquals("begibtnmxiebwwa", model.value().get(0).source()); - Assertions.assertEquals("ayqcgw", model.value().get(0).destination()); - Assertions.assertEquals(4790866258005538380L, model.value().get(0).revision()); - Assertions.assertEquals("lixhnrztfol", model.nextLink()); + Assertions.assertEquals("dntwjchrdgo", model.value().get(0).displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.value().get(0).direction()); + Assertions.assertEquals("mwctondzjluudfd", model.value().get(0).source()); + Assertions.assertEquals("gg", model.value().get(0).destination()); + Assertions.assertEquals(5516945390083190100L, model.value().get(0).revision()); + Assertions.assertEquals("cdm", 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 index 62efeb475301b..9102d8a114889 100644 --- 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 @@ -13,28 +13,28 @@ public final class WorkloadNetworkPortMirroringPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPortMirroringProperties model = BinaryData.fromString( - "{\"displayName\":\"fqbuaceopzf\",\"direction\":\"INGRESS\",\"source\":\"uaopppcqeq\",\"destination\":\"lzdahzxctobgbkdm\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":753837388632017239}") + "{\"displayName\":\"xkk\",\"direction\":\"INGRESS\",\"source\":\"rghxjb\",\"destination\":\"qxvcxgfrpdsofb\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":20984502868975858}") .toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("fqbuaceopzf", model.displayName()); + Assertions.assertEquals("xkk", model.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("uaopppcqeq", model.source()); - Assertions.assertEquals("lzdahzxctobgbkdm", model.destination()); - Assertions.assertEquals(753837388632017239L, model.revision()); + Assertions.assertEquals("rghxjb", model.source()); + Assertions.assertEquals("qxvcxgfrpdsofb", model.destination()); + Assertions.assertEquals(20984502868975858L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkloadNetworkPortMirroringProperties model - = new WorkloadNetworkPortMirroringProperties().withDisplayName("fqbuaceopzf") + = new WorkloadNetworkPortMirroringProperties().withDisplayName("xkk") .withDirection(PortMirroringDirectionEnum.INGRESS) - .withSource("uaopppcqeq") - .withDestination("lzdahzxctobgbkdm") - .withRevision(753837388632017239L); + .withSource("rghxjb") + .withDestination("qxvcxgfrpdsofb") + .withRevision(20984502868975858L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("fqbuaceopzf", model.displayName()); + Assertions.assertEquals("xkk", model.displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, model.direction()); - Assertions.assertEquals("uaopppcqeq", model.source()); - Assertions.assertEquals("lzdahzxctobgbkdm", model.destination()); - Assertions.assertEquals(753837388632017239L, model.revision()); + Assertions.assertEquals("rghxjb", model.source()); + Assertions.assertEquals("qxvcxgfrpdsofb", model.destination()); + Assertions.assertEquals(20984502868975858L, model.revision()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java index 1284594ed1830..1294038584249 100644 --- 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 @@ -12,10 +12,10 @@ public final class WorkloadNetworkPublicIPsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIPsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"gpiohgwxrtfudxe\",\"numberOfPublicIPs\":6514858021429691884,\"publicIPBlock\":\"agvrvmnpkuk\",\"provisioningState\":\"Building\"},\"id\":\"dblx\",\"name\":\"wi\",\"type\":\"fnjhfjxwmszkkfo\"}],\"nextLink\":\"eyfkzikfja\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"myst\",\"numberOfPublicIPs\":885610274962208064,\"publicIPBlock\":\"pfcvlerchpqbmfp\",\"provisioningState\":\"Updating\"},\"id\":\"widf\",\"name\":\"xsspuunnoxyhk\",\"type\":\"g\"},{\"properties\":{\"displayName\":\"rihpfhoq\",\"numberOfPublicIPs\":1011085759791678741,\"publicIPBlock\":\"dao\",\"provisioningState\":\"Updating\"},\"id\":\"l\",\"name\":\"jxxkzbrmsgei\",\"type\":\"siykzkdncjdxonbz\"}],\"nextLink\":\"gculap\"}") .toObject(WorkloadNetworkPublicIPsList.class); - Assertions.assertEquals("gpiohgwxrtfudxe", model.value().get(0).displayName()); - Assertions.assertEquals(6514858021429691884L, model.value().get(0).numberOfPublicIPs()); - Assertions.assertEquals("eyfkzikfja", model.nextLink()); + Assertions.assertEquals("myst", model.value().get(0).displayName()); + Assertions.assertEquals(885610274962208064L, model.value().get(0).numberOfPublicIPs()); + Assertions.assertEquals("gculap", 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 index eae414653df60..c5cda7b61762f 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"a\",\"numberOfPublicIPs\":2753110503115800438,\"publicIPBlock\":\"zel\",\"provisioningState\":\"Canceled\"},\"id\":\"elsfeaen\",\"name\":\"abfatkl\",\"type\":\"dxbjhwuaanozj\"}") + "{\"properties\":{\"displayName\":\"rpgogtqxep\",\"numberOfPublicIPs\":4258812781218679511,\"publicIPBlock\":\"uajlyj\",\"provisioningState\":\"Building\"},\"id\":\"fqzhv\",\"name\":\"cib\",\"type\":\"fmo\"}") .toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("a", model.displayName()); - Assertions.assertEquals(2753110503115800438L, model.numberOfPublicIPs()); + Assertions.assertEquals("rpgogtqxep", model.displayName()); + Assertions.assertEquals(4258812781218679511L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpInner model - = new WorkloadNetworkPublicIpInner().withDisplayName("a").withNumberOfPublicIPs(2753110503115800438L); + WorkloadNetworkPublicIpInner model = new WorkloadNetworkPublicIpInner().withDisplayName("rpgogtqxep") + .withNumberOfPublicIPs(4258812781218679511L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("a", model.displayName()); - Assertions.assertEquals(2753110503115800438L, model.numberOfPublicIPs()); + Assertions.assertEquals("rpgogtqxep", model.displayName()); + Assertions.assertEquals(4258812781218679511L, 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 index ec8cfb0dbb53f..e12a3097dfba5 100644 --- 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 @@ -12,18 +12,18 @@ public final class WorkloadNetworkPublicIpPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkPublicIpProperties model = BinaryData.fromString( - "{\"displayName\":\"ph\",\"numberOfPublicIPs\":5037944209655699604,\"publicIPBlock\":\"jrvxaglrv\",\"provisioningState\":\"Canceled\"}") + "{\"displayName\":\"xrkjpvdw\",\"numberOfPublicIPs\":4789424331234549662,\"publicIPBlock\":\"ivwzjbhyzs\",\"provisioningState\":\"Updating\"}") .toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("ph", model.displayName()); - Assertions.assertEquals(5037944209655699604L, model.numberOfPublicIPs()); + Assertions.assertEquals("xrkjpvdw", model.displayName()); + Assertions.assertEquals(4789424331234549662L, model.numberOfPublicIPs()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkPublicIpProperties model - = new WorkloadNetworkPublicIpProperties().withDisplayName("ph").withNumberOfPublicIPs(5037944209655699604L); + WorkloadNetworkPublicIpProperties model = new WorkloadNetworkPublicIpProperties().withDisplayName("xrkjpvdw") + .withNumberOfPublicIPs(4789424331234549662L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("ph", model.displayName()); - Assertions.assertEquals(5037944209655699604L, model.numberOfPublicIPs()); + Assertions.assertEquals("xrkjpvdw", model.displayName()); + Assertions.assertEquals(4789424331234549662L, 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 index 49a43344844b9..d2062517029df 100644 --- 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 @@ -14,28 +14,27 @@ public final class WorkloadNetworkSegmentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"iuebbaumny\",\"connectedGateway\":\"ped\",\"subnet\":{\"dhcpRanges\":[\"a\",\"ckhsmtxpsieb\",\"fhvpesaps\"],\"gatewayAddress\":\"dqmh\"},\"portVif\":[{\"portName\":\"tldwkyzxuutk\"},{\"portName\":\"ws\"},{\"portName\":\"svlxotogtwrup\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":896120017372838413},\"id\":\"kvceoveilovnotyf\",\"name\":\"fcnj\",\"type\":\"k\"}") + "{\"properties\":{\"displayName\":\"twbdsrezpdrhn\",\"connectedGateway\":\"yowqkdwytisibir\",\"subnet\":{\"dhcpRanges\":[\"kpzi\",\"ejzanlfz\",\"iavrm\"],\"gatewayAddress\":\"onok\"},\"portVif\":[{\"portName\":\"q\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2813820823921531110},\"id\":\"azszrnwoiindfpw\",\"name\":\"jylwbtlhflsj\",\"type\":\"dhszfjv\"}") .toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("iuebbaumny", model.displayName()); - Assertions.assertEquals("ped", model.connectedGateway()); - Assertions.assertEquals("a", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("dqmh", model.subnet().gatewayAddress()); - Assertions.assertEquals(896120017372838413L, model.revision()); + Assertions.assertEquals("twbdsrezpdrhn", model.displayName()); + Assertions.assertEquals("yowqkdwytisibir", model.connectedGateway()); + Assertions.assertEquals("kpzi", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("onok", model.subnet().gatewayAddress()); + Assertions.assertEquals(2813820823921531110L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("iuebbaumny") - .withConnectedGateway("ped") - .withSubnet( - new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("a", "ckhsmtxpsieb", "fhvpesaps")) - .withGatewayAddress("dqmh")) - .withRevision(896120017372838413L); + WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("twbdsrezpdrhn") + .withConnectedGateway("yowqkdwytisibir") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("kpzi", "ejzanlfz", "iavrm")) + .withGatewayAddress("onok")) + .withRevision(2813820823921531110L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("iuebbaumny", model.displayName()); - Assertions.assertEquals("ped", model.connectedGateway()); - Assertions.assertEquals("a", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("dqmh", model.subnet().gatewayAddress()); - Assertions.assertEquals(896120017372838413L, model.revision()); + Assertions.assertEquals("twbdsrezpdrhn", model.displayName()); + Assertions.assertEquals("yowqkdwytisibir", model.connectedGateway()); + Assertions.assertEquals("kpzi", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("onok", model.subnet().gatewayAddress()); + Assertions.assertEquals(2813820823921531110L, 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 index cc647a81f2d17..e8b62179f2fb8 100644 --- 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 @@ -12,7 +12,7 @@ public final class WorkloadNetworkSegmentPortVifTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentPortVif model - = BinaryData.fromString("{\"portName\":\"nobglaocq\"}").toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("nobglaocq", model.portName()); + = BinaryData.fromString("{\"portName\":\"yajguqfhwygzlv\"}").toObject(WorkloadNetworkSegmentPortVif.class); + Assertions.assertEquals("yajguqfhwygzlv", 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 index 4ad02aec5b62d..01443c72ec230 100644 --- 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 @@ -14,27 +14,28 @@ public final class WorkloadNetworkSegmentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentProperties model = BinaryData.fromString( - "{\"displayName\":\"x\",\"connectedGateway\":\"bttk\",\"subnet\":{\"dhcpRanges\":[\"pnvjtoqnermclf\"],\"gatewayAddress\":\"phoxus\"},\"portVif\":[{\"portName\":\"bgyepsbj\"},{\"portName\":\"zq\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":5351409570335896037}") + "{\"displayName\":\"gofel\",\"connectedGateway\":\"grqmqhldvrii\",\"subnet\":{\"dhcpRanges\":[\"al\",\"hfkvtvsexsowuel\",\"qhhahhxvrhmzkwpj\",\"wws\"],\"gatewayAddress\":\"ghftqsxhqxujxuk\"},\"portVif\":[{\"portName\":\"igrjguufzdm\"},{\"portName\":\"qtfihwhbotzinga\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":3853655697248732253}") .toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("x", model.displayName()); - Assertions.assertEquals("bttk", model.connectedGateway()); - Assertions.assertEquals("pnvjtoqnermclf", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("phoxus", model.subnet().gatewayAddress()); - Assertions.assertEquals(5351409570335896037L, model.revision()); + Assertions.assertEquals("gofel", model.displayName()); + Assertions.assertEquals("grqmqhldvrii", model.connectedGateway()); + Assertions.assertEquals("al", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("ghftqsxhqxujxuk", model.subnet().gatewayAddress()); + Assertions.assertEquals(3853655697248732253L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("x") - .withConnectedGateway("bttk") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("pnvjtoqnermclf")) - .withGatewayAddress("phoxus")) - .withRevision(5351409570335896037L); + WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("gofel") + .withConnectedGateway("grqmqhldvrii") + .withSubnet(new WorkloadNetworkSegmentSubnet() + .withDhcpRanges(Arrays.asList("al", "hfkvtvsexsowuel", "qhhahhxvrhmzkwpj", "wws")) + .withGatewayAddress("ghftqsxhqxujxuk")) + .withRevision(3853655697248732253L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("x", model.displayName()); - Assertions.assertEquals("bttk", model.connectedGateway()); - Assertions.assertEquals("pnvjtoqnermclf", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("phoxus", model.subnet().gatewayAddress()); - Assertions.assertEquals(5351409570335896037L, model.revision()); + Assertions.assertEquals("gofel", model.displayName()); + Assertions.assertEquals("grqmqhldvrii", model.connectedGateway()); + Assertions.assertEquals("al", model.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("ghftqsxhqxujxuk", model.subnet().gatewayAddress()); + Assertions.assertEquals(3853655697248732253L, 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 index 7370e0bf9ca90..2133394c7181a 100644 --- 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 @@ -12,19 +12,20 @@ public final class WorkloadNetworkSegmentSubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkloadNetworkSegmentSubnet model - = BinaryData.fromString("{\"dhcpRanges\":[\"fjz\"],\"gatewayAddress\":\"qkqujidsu\"}") - .toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("fjz", model.dhcpRanges().get(0)); - Assertions.assertEquals("qkqujidsu", model.gatewayAddress()); + WorkloadNetworkSegmentSubnet model = BinaryData.fromString( + "{\"dhcpRanges\":[\"udphqamvdkfwyn\",\"cvtbv\",\"ayhmtnvyqiatkz\",\"pcnp\"],\"gatewayAddress\":\"cjaesgvvs\"}") + .toObject(WorkloadNetworkSegmentSubnet.class); + Assertions.assertEquals("udphqamvdkfwyn", model.dhcpRanges().get(0)); + Assertions.assertEquals("cjaesgvvs", model.gatewayAddress()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkSegmentSubnet model - = new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("fjz")).withGatewayAddress("qkqujidsu"); + WorkloadNetworkSegmentSubnet model = new WorkloadNetworkSegmentSubnet() + .withDhcpRanges(Arrays.asList("udphqamvdkfwyn", "cvtbv", "ayhmtnvyqiatkz", "pcnp")) + .withGatewayAddress("cjaesgvvs"); model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("fjz", model.dhcpRanges().get(0)); - Assertions.assertEquals("qkqujidsu", model.gatewayAddress()); + Assertions.assertEquals("udphqamvdkfwyn", model.dhcpRanges().get(0)); + Assertions.assertEquals("cjaesgvvs", 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 index e0d5505ca2cad..0f49df96e10b3 100644 --- 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 @@ -12,13 +12,13 @@ public final class WorkloadNetworkSegmentsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkSegmentsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"ybyxc\",\"connectedGateway\":\"clha\",\"subnet\":{\"dhcpRanges\":[\"abphlw\",\"qlfktsths\",\"cocmnyyaztt\"],\"gatewayAddress\":\"wwrq\"},\"portVif\":[{\"portName\":\"ckzywbiexzfeyue\"},{\"portName\":\"ibx\"},{\"portName\":\"wbhqwal\"},{\"portName\":\"zyoxaepdkzjan\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":3067424612233139925},\"id\":\"v\",\"name\":\"bniwdj\",\"type\":\"wz\"},{\"properties\":{\"displayName\":\"bpg\",\"connectedGateway\":\"ytxhp\",\"subnet\":{\"dhcpRanges\":[\"pfza\",\"glcuhxwtctyqi\",\"lbbovplw\"],\"gatewayAddress\":\"hvgyuguosvmk\"},\"portVif\":[{\"portName\":\"qukkfp\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":6280051526633281163},\"id\":\"zkd\",\"name\":\"slpvlop\",\"type\":\"i\"}],\"nextLink\":\"ghxpkdw\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"twaenuuzko\",\"connectedGateway\":\"minrfdw\",\"subnet\":{\"dhcpRanges\":[\"hziuiefozbhdms\",\"l\"],\"gatewayAddress\":\"qhoftrmaequiah\"},\"portVif\":[{\"portName\":\"lfaoqzpiyylhaln\"},{\"portName\":\"hc\"},{\"portName\":\"ph\"},{\"portName\":\"ivwitqscywugg\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":6648537753700098134},\"id\":\"emh\",\"name\":\"i\",\"type\":\"sbrgz\"},{\"properties\":{\"displayName\":\"swe\",\"connectedGateway\":\"qwdxggicc\",\"subnet\":{\"dhcpRanges\":[\"huexmk\",\"tlstvlzywem\"],\"gatewayAddress\":\"rncsdtclu\"},\"portVif\":[{\"portName\":\"bsfgytguslfea\"},{\"portName\":\"ygqukyhejh\"},{\"portName\":\"sx\"},{\"portName\":\"pelol\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":8128051497759597763},\"id\":\"ujzra\",\"name\":\"htwdwrftswibyrcd\",\"type\":\"bhshfwpracstwity\"},{\"properties\":{\"displayName\":\"vxccedcp\",\"connectedGateway\":\"dyodnwzxltj\",\"subnet\":{\"dhcpRanges\":[\"ltiugcxnavv\"],\"gatewayAddress\":\"qiby\"},\"portVif\":[{\"portName\":\"owx\"},{\"portName\":\"mdjrkvfgbvfvp\"},{\"portName\":\"odacizs\"},{\"portName\":\"lhkrribdeibqipqk\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":4034217572792949127},\"id\":\"krefajpjo\",\"name\":\"wkqnyhg\",\"type\":\"ij\"},{\"properties\":{\"displayName\":\"vfxzsjab\",\"connectedGateway\":\"systawfsdjp\",\"subnet\":{\"dhcpRanges\":[\"bjxbkzbzk\"],\"gatewayAddress\":\"ncj\"},\"portVif\":[{\"portName\":\"urgkakmokzhjjk\"},{\"portName\":\"fhmouwq\"},{\"portName\":\"zrfze\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":7551956675766407600},\"id\":\"yuhqlbjbsybbqwrv\",\"name\":\"ldgmfpgvmpip\",\"type\":\"slthaq\"}],\"nextLink\":\"ss\"}") .toObject(WorkloadNetworkSegmentsList.class); - Assertions.assertEquals("ybyxc", model.value().get(0).displayName()); - Assertions.assertEquals("clha", model.value().get(0).connectedGateway()); - Assertions.assertEquals("abphlw", model.value().get(0).subnet().dhcpRanges().get(0)); - Assertions.assertEquals("wwrq", model.value().get(0).subnet().gatewayAddress()); - Assertions.assertEquals(3067424612233139925L, model.value().get(0).revision()); - Assertions.assertEquals("ghxpkdw", model.nextLink()); + Assertions.assertEquals("twaenuuzko", model.value().get(0).displayName()); + Assertions.assertEquals("minrfdw", model.value().get(0).connectedGateway()); + Assertions.assertEquals("hziuiefozbhdms", model.value().get(0).subnet().dhcpRanges().get(0)); + Assertions.assertEquals("qhoftrmaequiah", model.value().get(0).subnet().gatewayAddress()); + Assertions.assertEquals(6648537753700098134L, model.value().get(0).revision()); + Assertions.assertEquals("ss", 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 index d59b437cb8cf1..27fdc501eba14 100644 --- 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 @@ -13,21 +13,21 @@ public final class WorkloadNetworkVMGroupInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"fqqnvwpmqtaruo\",\"members\":[\"kcjhwqytjrybnwj\",\"wgdrjervnaenqp\",\"hin\",\"oygmift\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":1265885080326792756},\"id\":\"nayqi\",\"name\":\"ynduha\",\"type\":\"hqlkthumaqo\"}") + "{\"properties\":{\"displayName\":\"umrtwnawjsl\",\"members\":[\"kojgcyzts\",\"mznbaeqphch\",\"nrnrp\",\"ehuwrykqgaifmvik\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":8629783382496754434},\"id\":\"jdz\",\"name\":\"xcv\",\"type\":\"srhnjivo\"}") .toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("fqqnvwpmqtaruo", model.displayName()); - Assertions.assertEquals("kcjhwqytjrybnwj", model.members().get(0)); - Assertions.assertEquals(1265885080326792756L, model.revision()); + Assertions.assertEquals("umrtwnawjsl", model.displayName()); + Assertions.assertEquals("kojgcyzts", model.members().get(0)); + Assertions.assertEquals(8629783382496754434L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("fqqnvwpmqtaruo") - .withMembers(Arrays.asList("kcjhwqytjrybnwj", "wgdrjervnaenqp", "hin", "oygmift")) - .withRevision(1265885080326792756L); + WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("umrtwnawjsl") + .withMembers(Arrays.asList("kojgcyzts", "mznbaeqphch", "nrnrp", "ehuwrykqgaifmvik")) + .withRevision(8629783382496754434L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("fqqnvwpmqtaruo", model.displayName()); - Assertions.assertEquals("kcjhwqytjrybnwj", model.members().get(0)); - Assertions.assertEquals(1265885080326792756L, model.revision()); + Assertions.assertEquals("umrtwnawjsl", model.displayName()); + Assertions.assertEquals("kojgcyzts", model.members().get(0)); + Assertions.assertEquals(8629783382496754434L, 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 index dfed30858cd42..eefcd87ba814b 100644 --- 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 @@ -13,21 +13,22 @@ public final class WorkloadNetworkVMGroupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupProperties model = BinaryData.fromString( - "{\"displayName\":\"gycdu\",\"members\":[\"tgccymvaolpss\"],\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":940610692718193227}") + "{\"displayName\":\"tnovqfzgemjdftul\",\"members\":[\"duceamtmc\",\"u\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":708418830447367497}") .toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("gycdu", model.displayName()); - Assertions.assertEquals("tgccymvaolpss", model.members().get(0)); - Assertions.assertEquals(940610692718193227L, model.revision()); + Assertions.assertEquals("tnovqfzgemjdftul", model.displayName()); + Assertions.assertEquals("duceamtmc", model.members().get(0)); + Assertions.assertEquals(708418830447367497L, model.revision()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("gycdu") - .withMembers(Arrays.asList("tgccymvaolpss")) - .withRevision(940610692718193227L); + WorkloadNetworkVMGroupProperties model + = new WorkloadNetworkVMGroupProperties().withDisplayName("tnovqfzgemjdftul") + .withMembers(Arrays.asList("duceamtmc", "u")) + .withRevision(708418830447367497L); model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("gycdu", model.displayName()); - Assertions.assertEquals("tgccymvaolpss", model.members().get(0)); - Assertions.assertEquals(940610692718193227L, model.revision()); + Assertions.assertEquals("tnovqfzgemjdftul", model.displayName()); + Assertions.assertEquals("duceamtmc", model.members().get(0)); + Assertions.assertEquals(708418830447367497L, 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 index 2f8d1b6195561..1924248c3d56f 100644 --- 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 @@ -12,11 +12,11 @@ public final class WorkloadNetworkVMGroupsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVMGroupsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"fbunrmfqjhhk\",\"members\":[\"vjymjhxxjyngud\",\"vkr\",\"swbxqz\",\"szjfauvjfdxxivet\"],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":3137986994872936614},\"id\":\"qmcbxvwvxyslqbhs\",\"name\":\"xoblytkbl\",\"type\":\"pe\"},{\"properties\":{\"displayName\":\"fbkrvrnsvs\",\"members\":[\"ohxcrsbfova\",\"rruvwbhsq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":2319304863641210663},\"id\":\"rxbpyb\",\"name\":\"rfbjf\",\"type\":\"twss\"}],\"nextLink\":\"ftpvjzbexil\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"vz\",\"members\":[\"ycnunvjsrtk\",\"awnopqgikyzirtxd\",\"uxzejntpsew\",\"ioilqukrydxtq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":5252415972799158831},\"id\":\"ufhyaomtbgh\",\"name\":\"avgrvkffovjz\",\"type\":\"pjbi\"},{\"properties\":{\"displayName\":\"mfxumvfcluyovw\",\"members\":[\"kfezzxscyhwz\",\"g\",\"rujbzbomvzzbtdc\",\"vp\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":4156012930167419412},\"id\":\"wdsh\",\"name\":\"ssnrbgye\",\"type\":\"rymsgaojfmw\"},{\"properties\":{\"displayName\":\"tmr\",\"members\":[\"rctym\",\"xoftpipiwyczu\",\"xacpqjli\",\"hyus\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":5972606310193139455},\"id\":\"fwdgzxulucvp\",\"name\":\"mrsreuzvxurisjnh\",\"type\":\"ytxifqjzgxmrh\"},{\"properties\":{\"displayName\":\"wp\",\"members\":[\"utr\",\"jupauut\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2623463508515246746},\"id\":\"qg\",\"name\":\"zpnfqntcypsxj\",\"type\":\"foimwkslircizjxv\"}],\"nextLink\":\"fceacvlhvygd\"}") .toObject(WorkloadNetworkVMGroupsList.class); - Assertions.assertEquals("fbunrmfqjhhk", model.value().get(0).displayName()); - Assertions.assertEquals("vjymjhxxjyngud", model.value().get(0).members().get(0)); - Assertions.assertEquals(3137986994872936614L, model.value().get(0).revision()); - Assertions.assertEquals("ftpvjzbexil", model.nextLink()); + Assertions.assertEquals("vz", model.value().get(0).displayName()); + Assertions.assertEquals("ycnunvjsrtk", model.value().get(0).members().get(0)); + Assertions.assertEquals(5252415972799158831L, model.value().get(0).revision()); + Assertions.assertEquals("fceacvlhvygd", 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 index a167d2907bd09..efc1e08f2c55a 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachineInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"xunkbebxmubyynt\",\"vmType\":\"SERVICE\"},\"id\":\"qtkoievs\",\"name\":\"otgqrlltmu\",\"type\":\"lauwzizxbmpgcjef\"}") + "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"txhwgfws\",\"vmType\":\"EDGE\"},\"id\":\"coezbrhubskh\",\"name\":\"dyg\",\"type\":\"ookk\"}") .toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("xunkbebxmubyynt", model.displayName()); + Assertions.assertEquals("txhwgfws", 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 index a87f6c2b74998..8b4e138445626 100644 --- 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 @@ -12,8 +12,8 @@ public final class WorkloadNetworkVirtualMachinePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachineProperties model = BinaryData - .fromString("{\"provisioningState\":\"Building\",\"displayName\":\"vpbttd\",\"vmType\":\"REGULAR\"}") + .fromString("{\"provisioningState\":\"Failed\",\"displayName\":\"bvleorfmluiqtqzf\",\"vmType\":\"EDGE\"}") .toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("vpbttd", model.displayName()); + Assertions.assertEquals("bvleorfmluiqtqzf", 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 index ab236e256490a..4ef437d6a5754 100644 --- 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 @@ -12,9 +12,9 @@ public final class WorkloadNetworkVirtualMachinesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadNetworkVirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"pswiydmcwyh\",\"vmType\":\"EDGE\"},\"id\":\"sadbz\",\"name\":\"nvdfznuda\",\"type\":\"dvxzbncblylpst\"},{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"srzdzucerscdn\",\"vmType\":\"EDGE\"},\"id\":\"fiwjmygtdssls\",\"name\":\"tmweriofzpyq\",\"type\":\"emwabnet\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"h\",\"vmType\":\"SERVICE\"},\"id\":\"vwiwubmwmbesld\",\"name\":\"k\",\"type\":\"wtppjflcxogaoko\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ikvmkqzeqqk\",\"vmType\":\"EDGE\"},\"id\":\"zxmhhvhgu\",\"name\":\"eodkwobda\",\"type\":\"xtibqdxbxwakbog\"}],\"nextLink\":\"ndlkzgxhurip\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"ssxmojms\",\"vmType\":\"REGULAR\"},\"id\":\"prvkwcfzqljyxgtc\",\"name\":\"heyd\",\"type\":\"sdshmkxmaehvb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"pltfnhtba\",\"vmType\":\"EDGE\"},\"id\":\"ywrckp\",\"name\":\"kl\",\"type\":\"hpluodpvruudlg\"},{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"ostgkts\",\"vmType\":\"EDGE\"},\"id\":\"eclze\",\"name\":\"qbcvhzlhplod\",\"type\":\"kdl\"}],\"nextLink\":\"qfbumlkxtrqjf\"}") .toObject(WorkloadNetworkVirtualMachinesList.class); - Assertions.assertEquals("pswiydmcwyh", model.value().get(0).displayName()); - Assertions.assertEquals("ndlkzgxhurip", model.nextLink()); + Assertions.assertEquals("ssxmojms", model.value().get(0).displayName()); + Assertions.assertEquals("qfbumlkxtrqjf", 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 index c29ddab9b2146..81abc9e056cd0 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDhcpMockTests { @Test public void testCreateDhcp() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"dbxiqx\",\"segments\":[\"qbi\"],\"provisioningState\":\"Succeeded\",\"revision\":8599129879041195157},\"id\":\"nhe\",\"name\":\"f\",\"type\":\"pofvwb\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"yrrueqth\",\"segments\":[\"nmbscbbx\",\"gdhxi\",\"d\",\"opedbwdpyqyybxub\"],\"provisioningState\":\"Succeeded\",\"revision\":4019284152093809147},\"id\":\"qwremjel\",\"name\":\"qacigeleo\",\"type\":\"d\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testCreateDhcp() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDhcp response = manager.workloadNetworks() - .defineDhcp("gzwywak") - .withExistingPrivateCloud("s", "sphaivmxyasflvg") + .defineDhcp("a") + .withExistingWorkloadNetwork("urnnqbnqbpiz", "qltgrd", "gypxrxvbfihwuhvc") .withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("knsmjblmljhlnymz").withRevision(2855783179854311369L)) + new WorkloadNetworkDhcpEntity().withDisplayName("bxrblmliowxihspn").withRevision(5731341152723748479L)) .create(); - Assertions.assertEquals("dbxiqx", response.properties().displayName()); - Assertions.assertEquals(8599129879041195157L, response.properties().revision()); + Assertions.assertEquals("yrrueqth", response.properties().displayName()); + Assertions.assertEquals(4019284152093809147L, 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 index ec2dc3ae5e397..b7976d21a479f 100644 --- 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateDnsServiceMockTests { @Test public void testCreateDnsService() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"lzok\",\"dnsServiceIp\":\"ox\",\"defaultDnsZone\":\"lnjetaglt\",\"fqdnZones\":[\"atftgzpnpbsw\",\"e\",\"loccsrmozihm\",\"pgawtxxpkyjcxcjx\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":7160892458188162484},\"id\":\"lrmcaykg\",\"name\":\"noxuztrksx\",\"type\":\"pndfcpfnznt\"}"; + = "{\"properties\":{\"displayName\":\"pzgsk\",\"dnsServiceIp\":\"fhfv\",\"defaultDnsZone\":\"mknbnxwcdommpv\",\"fqdnZones\":[\"wzfgbrttuiaclkie\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":3380169612516312887},\"id\":\"fyut\",\"name\":\"diygbpvnwswmtxky\",\"type\":\"twwgzwx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,21 @@ public void testCreateDnsService() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsService response = manager.workloadNetworks() - .defineDnsService("jizcilnghgs") - .withExistingPrivateCloud("xgvelfclduccbird", "vuwcobiegstmnin") - .withDisplayName("jtbxqmuluxlx") - .withDnsServiceIp("vnersbycucrw") - .withDefaultDnsZone("mikzeb") - .withFqdnZones(Arrays.asList("smswziqgfuh", "kzruswh", "hczznvf")) - .withLogLevel(DnsServiceLogLevelEnum.ERROR) - .withRevision(2787720683354183168L) + .defineDnsService("lexwhcbjp") + .withExistingWorkloadNetwork("eksgbuxantuygd", "gaqi", "irpiwrqofulopmj") + .withDisplayName("e") + .withDnsServiceIp("uuuercta") + .withDefaultDnsZone("yintqpbrlcy") + .withFqdnZones(Arrays.asList("czkgofxyfsrucvcr", "pcjttbstvjeaqn", "mvvfko", "mlghktuidvrmazlp")) + .withLogLevel(DnsServiceLogLevelEnum.DEBUG) + .withRevision(8682161930744530375L) .create(); - Assertions.assertEquals("lzok", response.displayName()); - Assertions.assertEquals("ox", response.dnsServiceIp()); - Assertions.assertEquals("lnjetaglt", response.defaultDnsZone()); - Assertions.assertEquals("atftgzpnpbsw", response.fqdnZones().get(0)); + Assertions.assertEquals("pzgsk", response.displayName()); + Assertions.assertEquals("fhfv", response.dnsServiceIp()); + Assertions.assertEquals("mknbnxwcdommpv", response.defaultDnsZone()); + Assertions.assertEquals("wzfgbrttuiaclkie", response.fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.logLevel()); - Assertions.assertEquals(7160892458188162484L, response.revision()); + Assertions.assertEquals(3380169612516312887L, 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 index c94613fc5951e..5cd00e3fbbc55 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateDnsZoneMockTests { @Test public void testCreateDnsZone() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"kpak\",\"domain\":[\"fmjnnawtqa\",\"pxuckpggq\"],\"dnsServerIps\":[\"yirdhlisngwflqq\",\"pizruwnpqxpxiw\",\"cng\"],\"sourceIp\":\"aas\",\"dnsServices\":4326560645886577311,\"provisioningState\":\"Succeeded\",\"revision\":6093602471363921614},\"id\":\"viirhgfgrws\",\"name\":\"pgratzvzbglbyvi\",\"type\":\"tctbrxkjzwrgxffm\"}"; + = "{\"properties\":{\"displayName\":\"hihpvecmsl\",\"domain\":[\"lyjxltbsjus\"],\"dnsServerIps\":[\"f\",\"igctmgxuupbezq\",\"cydrtceukdqkk\"],\"sourceIp\":\"hztgeqmgqzgwld\",\"dnsServices\":122850686234484480,\"provisioningState\":\"Succeeded\",\"revision\":6090826264173048120},\"id\":\"fehuwaoaguhi\",\"name\":\"qllizstac\",\"type\":\"jvhrweft\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,21 +32,21 @@ public void testCreateDnsZone() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsZone response = manager.workloadNetworks() - .defineDnsZone("smgbzahgxqdl") - .withExistingPrivateCloud("jtwkjaos", "xuzvoamktcqi") - .withDisplayName("ltlaprltzkatbhj") - .withDomain(Arrays.asList("nbsoqeqalarv", "agunbtgfebw", "nbmhyree")) - .withDnsServerIps(Arrays.asList("qavbpdqmj", "lyyzglgouwtlmjj", "uojqt")) - .withSourceIp("axkjeytunlbfjk") - .withDnsServices(830794053618499369L) - .withRevision(3923529219175299110L) + .defineDnsZone("oqqtl") + .withExistingWorkloadNetwork("l", "ecvo", "ygzyvneezaifght") + .withDisplayName("zbkr") + .withDomain(Arrays.asList("javfqn", "hnqoewdo")) + .withDnsServerIps(Arrays.asList("etesypvidbztjhqt", "b")) + .withSourceIp("nynkbwet") + .withDnsServices(6087710670618433080L) + .withRevision(481993562254393755L) .create(); - Assertions.assertEquals("kpak", response.displayName()); - Assertions.assertEquals("fmjnnawtqa", response.domain().get(0)); - Assertions.assertEquals("yirdhlisngwflqq", response.dnsServerIps().get(0)); - Assertions.assertEquals("aas", response.sourceIp()); - Assertions.assertEquals(4326560645886577311L, response.dnsServices()); - Assertions.assertEquals(6093602471363921614L, response.revision()); + Assertions.assertEquals("hihpvecmsl", response.displayName()); + Assertions.assertEquals("lyjxltbsjus", response.domain().get(0)); + Assertions.assertEquals("f", response.dnsServerIps().get(0)); + Assertions.assertEquals("hztgeqmgqzgwld", response.sourceIp()); + Assertions.assertEquals(122850686234484480L, response.dnsServices()); + Assertions.assertEquals(6090826264173048120L, 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 index c5efa2d3bd6d4..2dcbc01eaefd9 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreatePortMirroringMockTests { @Test public void testCreatePortMirroring() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"l\",\"direction\":\"INGRESS\",\"source\":\"uiiznktwfansnvpd\",\"destination\":\"mik\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":2416325783439778913},\"id\":\"buqny\",\"name\":\"phzfylsgcrp\",\"type\":\"bcunezzceze\"}"; + = "{\"properties\":{\"displayName\":\"sgnzxojpslsvjgpl\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"qwoyxqvapco\",\"destination\":\"oucqpqojx\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":3808472804617069453},\"id\":\"zbenribc\",\"name\":\"wetzqddtjwfljh\",\"type\":\"namtuatmzw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,19 +32,19 @@ public void testCreatePortMirroring() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPortMirroring response = manager.workloadNetworks() - .definePortMirroring("duragegizvc") - .withExistingPrivateCloud("blembnkbwvqvxkd", "vqihebwtswbzuwf") - .withDisplayName("lisdjubggbq") - .withDirection(PortMirroringDirectionEnum.INGRESS) - .withSource("kbsazgak") - .withDestination("cyrcmjdmspo") - .withRevision(2234682115333576707L) + .definePortMirroring("eakxcptsoqfyi") + .withExistingWorkloadNetwork("vqvwzkjopwbe", "nrlkwzdqy", "x") + .withDisplayName("qc") + .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) + .withSource("tzrazisgyk") + .withDestination("emv") + .withRevision(4183468401672567495L) .create(); - Assertions.assertEquals("l", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.direction()); - Assertions.assertEquals("uiiznktwfansnvpd", response.source()); - Assertions.assertEquals("mik", response.destination()); - Assertions.assertEquals(2416325783439778913L, response.revision()); + Assertions.assertEquals("sgnzxojpslsvjgpl", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.direction()); + Assertions.assertEquals("qwoyxqvapco", response.source()); + Assertions.assertEquals("oucqpqojx", response.destination()); + Assertions.assertEquals(3808472804617069453L, 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 index 390d4cd7e9496..d99812ee13060 100644 --- 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 @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworksCreatePublicIPMockTests { +public final class WorkloadNetworksCreatePublicIpMockTests { @Test - public void testCreatePublicIP() throws Exception { + public void testCreatePublicIp() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"nfprnjletlxs\",\"numberOfPublicIPs\":8927877098345650470,\"publicIPBlock\":\"ou\",\"provisioningState\":\"Succeeded\"},\"id\":\"owa\",\"name\":\"iynknlq\",\"type\":\"zdvpiw\"}"; + = "{\"properties\":{\"displayName\":\"hntasfaymx\",\"numberOfPublicIPs\":8670362255944644435,\"publicIPBlock\":\"ealbmqkyo\",\"provisioningState\":\"Succeeded\"},\"id\":\"fkmbtsuahxsgxj\",\"name\":\"mmzrrscub\",\"type\":\"wsdrnpxqwodif\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testCreatePublicIP() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPublicIp response = manager.workloadNetworks() - .definePublicIP("yg") - .withExistingPrivateCloud("hkwfbkgozxwop", "bydpizqaclnapxb") - .withDisplayName("j") - .withNumberOfPublicIPs(5251325077784054834L) + .definePublicIp("pydjfboc") + .withExistingWorkloadNetwork("wqejpmvsse", "aepwamcxtcz", "upeuknijduyye") + .withDisplayName("hulrtywikdmhla") + .withNumberOfPublicIPs(8589946500530915839L) .create(); - Assertions.assertEquals("nfprnjletlxs", response.displayName()); - Assertions.assertEquals(8927877098345650470L, response.numberOfPublicIPs()); + Assertions.assertEquals("hntasfaymx", response.displayName()); + Assertions.assertEquals(8670362255944644435L, response.numberOfPublicIPs()); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java index 6f4fd56ecc7a7..815e9842ad484 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java +++ b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentMockTests.java @@ -23,7 +23,7 @@ public final class WorkloadNetworksCreateSegmentMockTests { @Test public void testCreateSegment() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"hslhca\",\"connectedGateway\":\"u\",\"subnet\":{\"dhcpRanges\":[\"wfmvigorqjbt\",\"zhraglkafh\",\"n\"],\"gatewayAddress\":\"ujeickp\"},\"portVif\":[{\"portName\":\"opmx\"},{\"portName\":\"nwcl\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":6137899211514369318},\"id\":\"lfmk\",\"name\":\"scazuawxtzxpu\",\"type\":\"mwabzxrvxc\"}"; + = "{\"properties\":{\"displayName\":\"ylhk\",\"connectedGateway\":\"nsghp\",\"subnet\":{\"dhcpRanges\":[\"hdrwjjkh\",\"yomacluzvxnqm\"],\"gatewayAddress\":\"pqpdfwmkoisqc\"},\"portVif\":[{\"portName\":\"xuifmcsypobkdqz\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":4296638133304358080},\"id\":\"gtrczzydmxzjijpv\",\"name\":\"aurkihcirlde\",\"type\":\"xrdcoxnbkkja\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,19 +33,19 @@ public void testCreateSegment() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkSegment response = manager.workloadNetworks() - .defineSegment("jqg") - .withExistingPrivateCloud("svtui", "zh") - .withDisplayName("hm") - .withConnectedGateway("qryxyn") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("dpsovwxznptgo")) - .withGatewayAddress("ybbabpfhvfsl")) - .withRevision(4417408561997868139L) + .defineSegment("nuilee") + .withExistingWorkloadNetwork("byephmgt", "ljvrcmyfqipgxhnp", "myqwcab") + .withDisplayName("wlpaugmrmfjlrxwt") + .withConnectedGateway("ukhfkvc") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("moaedsxj", "uivedwcgyeewxeiq")) + .withGatewayAddress("smgomguaml")) + .withRevision(7283254554944912845L) .create(); - Assertions.assertEquals("hslhca", response.displayName()); - Assertions.assertEquals("u", response.connectedGateway()); - Assertions.assertEquals("wfmvigorqjbt", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("ujeickp", response.subnet().gatewayAddress()); - Assertions.assertEquals(6137899211514369318L, response.revision()); + Assertions.assertEquals("ylhk", response.displayName()); + Assertions.assertEquals("nsghp", response.connectedGateway()); + Assertions.assertEquals("hdrwjjkh", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("pqpdfwmkoisqc", response.subnet().gatewayAddress()); + Assertions.assertEquals(4296638133304358080L, 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 index af5cd18a29fa3..3c42d01dae3ee 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksCreateVMGroupMockTests { @Test public void testCreateVMGroup() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"jgehkf\",\"members\":[\"rtixokff\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":3258323746921369776},\"id\":\"qwhix\",\"name\":\"onsts\",\"type\":\"i\"}"; + = "{\"properties\":{\"displayName\":\"xne\",\"members\":[\"mtodl\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":5140968994172392364},\"id\":\"voavyunssxl\",\"name\":\"hi\",\"type\":\"egjlgvvpa\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testCreateVMGroup() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVMGroup response = manager.workloadNetworks() - .defineVMGroup("zvaylptrsqqw") - .withExistingPrivateCloud("fwyfwlwxjwet", "psihcla") - .withDisplayName("mwqkchcxwaxf") - .withMembers(Arrays.asList("jkjexf", "eqvhpsylkk", "hkbffmbm")) - .withRevision(3427888664971158449L) + .defineVMGroup("ebwgga") + .withExistingWorkloadNetwork("jj", "cqtjzmi", "vgbgatzuuvbxng") + .withDisplayName("zlswvajqf") + .withMembers(Arrays.asList("x")) + .withRevision(5388655277273530028L) .create(); - Assertions.assertEquals("jgehkf", response.displayName()); - Assertions.assertEquals("rtixokff", response.members().get(0)); - Assertions.assertEquals(3258323746921369776L, response.revision()); + Assertions.assertEquals("xne", response.displayName()); + Assertions.assertEquals("mtodl", response.members().get(0)); + Assertions.assertEquals(5140968994172392364L, 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 index a9a0375eb34e2..3a30d2448da8a 100644 --- 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 @@ -27,7 +27,7 @@ public void testDeleteDhcp() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deleteDhcp("rjeuut", "wxezwzhok", "bwnhhtql", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDhcp("fyuicdh", "bd", "bwwg", "d", 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 index 87fb33766e600..ac0a20a24aaa6 100644 --- 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 @@ -27,7 +27,7 @@ public void testDeleteDnsService() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deleteDnsService("nlj", "nmgixh", "mavmq", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDnsService("rhpw", "gddeimaw", "o", 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 index 492355d3d9b5b..3d21d6cfcfaa7 100644 --- 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 @@ -28,7 +28,7 @@ public void testDeleteDnsZone() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworks() - .deleteDnsZone("la", "utmzlbiojlvfhrbb", "neqvcwwyyurmo", com.azure.core.util.Context.NONE); + .deleteDnsZone("xepmrut", "nabaobnslujd", "ltymkmvguihywart", 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 index 3689ba659b2bd..d6779a0a2dc35 100644 --- 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 @@ -28,7 +28,7 @@ public void testDeletePortMirroring() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworks() - .deletePortMirroring("os", "sjuivfcdisyir", "xzhczexrxz", com.azure.core.util.Context.NONE); + .deletePortMirroring("jk", "mykyujxsglhs", "rryejylmbkzudnig", 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 index 2313f42a67c09..d42953b4f39cc 100644 --- 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 @@ -15,9 +15,9 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworksDeletePublicIPMockTests { +public final class WorkloadNetworksDeletePublicIpMockTests { @Test - public void testDeletePublicIP() throws Exception { + public void testDeletePublicIp() throws Exception { String responseStr = "{}"; HttpClient httpClient @@ -28,7 +28,7 @@ public void testDeletePublicIP() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworks() - .deletePublicIP("qwazlnqnmcjngzq", "qxtbjwgnyf", "sf", com.azure.core.util.Context.NONE); + .deletePublicIp("kdfrdbiqmrjgeihf", "lg", "wfiwzcxmj", 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 index fa8572ae49f59..16ff836de5078 100644 --- 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 @@ -27,7 +27,8 @@ public void testDeleteSegment() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.workloadNetworks().deleteSegment("ecdmdqbwpy", "q", "gsfjac", com.azure.core.util.Context.NONE); + manager.workloadNetworks() + .deleteSegment("lontacnpq", "tehtuevrhrljyoog", "xh", "sd", 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 index 67255e3815704..ed2b6851a15d0 100644 --- 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 @@ -28,7 +28,7 @@ public void testDeleteVMGroup() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.workloadNetworks() - .deleteVMGroup("cwyhahno", "drkywuhps", "fuurutlwexx", com.azure.core.util.Context.NONE); + .deleteVMGroup("jpu", "yjucejikzoeo", "vtzejetjklnti", 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 index 0849623f708fe..da529d0314514 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetDhcpWithResponseMockTests { @Test public void testGetDhcpWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ycy\",\"segments\":[\"lxgccknfnwmbtm\"],\"provisioningState\":\"Building\",\"revision\":4849320902219836691},\"id\":\"ttzaefed\",\"name\":\"ihchrphkmcrjdqn\",\"type\":\"dfzpbgtgkylkdg\"}"; + = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"bdxnaz\",\"segments\":[\"mlmvevfxzo\"],\"provisioningState\":\"Failed\",\"revision\":5810389304186982523},\"id\":\"iohrdddtf\",\"name\":\"xqbawpc\",\"type\":\"bnzqcyknapq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetDhcpWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDhcp response = manager.workloadNetworks() - .getDhcpWithResponse("a", "xulcdisdos", "jbjsvgjrwh", com.azure.core.util.Context.NONE) + .getDhcpWithResponse("tlyo", "rrrouuxvnsa", "bcrymodizrx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ycy", response.properties().displayName()); - Assertions.assertEquals(4849320902219836691L, response.properties().revision()); + Assertions.assertEquals("bdxnaz", response.properties().displayName()); + Assertions.assertEquals(5810389304186982523L, 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 index c5bc3cfcec852..ca1c2948b6dda 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksGetDnsServiceWithResponseMockTests { @Test public void testGetDnsServiceWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"acevehjkuyx\",\"dnsServiceIp\":\"fgaoq\",\"defaultDnsZone\":\"faey\",\"fqdnZones\":[\"mfgvxirpghriypo\"],\"logLevel\":\"FATAL\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":1589497887711034264},\"id\":\"lpyznuciqdsmexi\",\"name\":\"tdfuxt\",\"type\":\"asiibmiybnnust\"}"; + = "{\"properties\":{\"displayName\":\"josovyrrl\",\"dnsServiceIp\":\"esi\",\"defaultDnsZone\":\"qtljqobbpihehc\",\"fqdnZones\":[\"bmrqbrjbbmp\",\"dlvykfrex\",\"rseqwjksghudgz\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":5826744192154517263},\"id\":\"jkxibda\",\"name\":\"hrkmdyomkxfbvfbh\",\"type\":\"y\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,15 @@ public void testGetDnsServiceWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsService response = manager.workloadNetworks() - .getDnsServiceWithResponse("tnluankrr", "xeeebtijvacvbmqz", "qqxlajr", com.azure.core.util.Context.NONE) + .getDnsServiceWithResponse("dgycxnmskwhqjjy", "lurlpshhkvp", "dwqslsrhmpqvw", "skondcbrwimu", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("acevehjkuyx", response.displayName()); - Assertions.assertEquals("fgaoq", response.dnsServiceIp()); - Assertions.assertEquals("faey", response.defaultDnsZone()); - Assertions.assertEquals("mfgvxirpghriypo", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.logLevel()); - Assertions.assertEquals(1589497887711034264L, response.revision()); + Assertions.assertEquals("josovyrrl", response.displayName()); + Assertions.assertEquals("esi", response.dnsServiceIp()); + Assertions.assertEquals("qtljqobbpihehc", response.defaultDnsZone()); + Assertions.assertEquals("bmrqbrjbbmp", response.fqdnZones().get(0)); + Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, response.logLevel()); + Assertions.assertEquals(5826744192154517263L, 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 index 8362170793534..9ea857d15c706 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetDnsZoneWithResponseMockTests { @Test public void testGetDnsZoneWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"xeyskonqzinkfkbg\",\"domain\":[\"owxeqocljmy\",\"vkzqk\"],\"dnsServerIps\":[\"okbzef\",\"zrxcczurt\"],\"sourceIp\":\"ipqxbkwvzgnzv\",\"dnsServices\":8865201443625196451,\"provisioningState\":\"Updating\",\"revision\":8445410138304519082},\"id\":\"pnodawopqhe\",\"name\":\"jptmcgsbost\",\"type\":\"eln\"}"; + = "{\"properties\":{\"displayName\":\"klelssxb\",\"domain\":[\"sxz\"],\"dnsServerIps\":[\"srlsmd\"],\"sourceIp\":\"qplpvmjc\",\"dnsServices\":5106286966538490293,\"provisioningState\":\"Failed\",\"revision\":7484843776826385857},\"id\":\"eowxvgpi\",\"name\":\"deugf\",\"type\":\"xzecpaxwkufykhvu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testGetDnsZoneWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkDnsZone response = manager.workloadNetworks() - .getDnsZoneWithResponse("cohdx", "zlmcmuapcvhdb", "v", com.azure.core.util.Context.NONE) + .getDnsZoneWithResponse("ktgj", "sggux", "eml", "ywaeeczgf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xeyskonqzinkfkbg", response.displayName()); - Assertions.assertEquals("owxeqocljmy", response.domain().get(0)); - Assertions.assertEquals("okbzef", response.dnsServerIps().get(0)); - Assertions.assertEquals("ipqxbkwvzgnzv", response.sourceIp()); - Assertions.assertEquals(8865201443625196451L, response.dnsServices()); - Assertions.assertEquals(8445410138304519082L, response.revision()); + 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/WorkloadNetworksGetGatewayWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java index b731274ab87d8..2ce3a981ff75f 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetGatewayWithResponseMockTests { @Test public void testGetGatewayWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"ibph\",\"path\":\"zmizakakan\"},\"id\":\"p\",\"name\":\"n\",\"type\":\"zhajoylhjlmuo\"}"; + = "{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"oucs\",\"path\":\"ldpuviy\"},\"id\":\"aabeolhbhlvbmxuq\",\"name\":\"bsxtkcudfbsfarfs\",\"type\":\"owlkjxnqpv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,10 @@ public void testGetGatewayWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkGateway response = manager.workloadNetworks() - .getGatewayWithResponse("qtgdqohmcwsl", "riz", "tpwb", com.azure.core.util.Context.NONE) + .getGatewayWithResponse("jcaacfdmmcpugm", "hqepvufhbzehewh", "qhnlbqnbld", "eaclgschorimk", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ibph", response.displayName()); + Assertions.assertEquals("oucs", 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 index 6676affc033ed..fd65c44a700aa 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksGetPortMirroringWithResponseMockTests { @Test public void testGetPortMirroringWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"bu\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"xebeybpmz\",\"destination\":\"rtffyaqitmh\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":1147864952141338837},\"id\":\"seufuqy\",\"name\":\"xpdlcgqlsis\",\"type\":\"jqfrddgamquh\"}"; + = "{\"properties\":{\"displayName\":\"vuicp\",\"direction\":\"EGRESS\",\"source\":\"rmhw\",\"destination\":\"fdpyflubh\",\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":8847370311593118177},\"id\":\"zlwhhmemhooclu\",\"name\":\"n\",\"type\":\"qmemc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetPortMirroringWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPortMirroring response = manager.workloadNetworks() - .getPortMirroringWithResponse("yijddtvqcttad", "jaeukmrsieekpn", "zaapmudqmeqwi", + .getPortMirroringWithResponse("mtkhlowkxxpvbr", "fjmzsyzfho", "lhikcyychunsj", "pjrtws", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bu", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.direction()); - Assertions.assertEquals("xebeybpmz", response.source()); - Assertions.assertEquals("rtffyaqitmh", response.destination()); - Assertions.assertEquals(1147864952141338837L, response.revision()); + Assertions.assertEquals("vuicp", response.displayName()); + Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); + Assertions.assertEquals("rmhw", response.source()); + Assertions.assertEquals("fdpyflubh", response.destination()); + Assertions.assertEquals(8847370311593118177L, 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 index 137474ea5bff7..ef67773d57b7e 100644 --- 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 @@ -17,11 +17,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworksGetPublicIPWithResponseMockTests { +public final class WorkloadNetworksGetPublicIpWithResponseMockTests { @Test - public void testGetPublicIPWithResponse() throws Exception { + public void testGetPublicIpWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"dcdab\",\"numberOfPublicIPs\":8090697821679343432,\"publicIPBlock\":\"yawbzasqbu\",\"provisioningState\":\"Updating\"},\"id\":\"kyexaoguyaipi\",\"name\":\"sdaultxij\",\"type\":\"um\"}"; + = "{\"properties\":{\"displayName\":\"pivlsbbjpm\",\"numberOfPublicIPs\":2333317127183841178,\"publicIPBlock\":\"ifoxxkubvphav\",\"provisioningState\":\"Succeeded\"},\"id\":\"rbqgvgov\",\"name\":\"bbttefjo\",\"type\":\"nssqyzqed\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,11 @@ public void testGetPublicIPWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkPublicIp response = manager.workloadNetworks() - .getPublicIPWithResponse("ex", "kmfx", "pjwogqqno", com.azure.core.util.Context.NONE) + .getPublicIpWithResponse("wdtgukranblw", "hqlkccuzgygqwaho", "ulwgniiprglvawuw", "d", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dcdab", response.displayName()); - Assertions.assertEquals(8090697821679343432L, response.numberOfPublicIPs()); + Assertions.assertEquals("pivlsbbjpm", response.displayName()); + Assertions.assertEquals(2333317127183841178L, 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 index 11eb745d8adea..d88f84c1ce456 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetSegmentWithResponseMockTests { @Test public void testGetSegmentWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"erteeammxqiekk\",\"connectedGateway\":\"ddrtkgdojb\",\"subnet\":{\"dhcpRanges\":[\"vrefdeesv\"],\"gatewayAddress\":\"uij\"},\"portVif\":[{\"portName\":\"s\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":4136420798110514219},\"id\":\"awddjibab\",\"name\":\"vit\",\"type\":\"tvtzeexavoxtfg\"}"; + = "{\"properties\":{\"displayName\":\"mkwkl\",\"connectedGateway\":\"oxaxm\",\"subnet\":{\"dhcpRanges\":[\"lhhjnh\",\"wy\",\"yynfsvkhgbv\",\"ta\"],\"gatewayAddress\":\"rfdl\"},\"portVif\":[{\"portName\":\"py\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":6610220677789785913},\"id\":\"ogkhnmgbr\",\"name\":\"uxddbhfh\",\"type\":\"fpazjzoywjxhpd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,14 @@ public void testGetSegmentWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkSegment response = manager.workloadNetworks() - .getSegmentWithResponse("svxeizzgwklnsr", "ffeycx", "ktp", com.azure.core.util.Context.NONE) + .getSegmentWithResponse("etndnbfqyggagf", "nlgmtrwahzjmu", "ftbyrplro", "kpigqfusu", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("erteeammxqiekk", response.displayName()); - Assertions.assertEquals("ddrtkgdojb", response.connectedGateway()); - Assertions.assertEquals("vrefdeesv", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("uij", response.subnet().gatewayAddress()); - Assertions.assertEquals(4136420798110514219L, response.revision()); + Assertions.assertEquals("mkwkl", response.displayName()); + Assertions.assertEquals("oxaxm", response.connectedGateway()); + Assertions.assertEquals("lhhjnh", response.subnet().dhcpRanges().get(0)); + Assertions.assertEquals("rfdl", response.subnet().gatewayAddress()); + Assertions.assertEquals(6610220677789785913L, 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 index a2a416b7b7fec..7dba8d84d8aa2 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetVMGroupWithResponseMockTests { @Test public void testGetVMGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"uuwwltv\",\"members\":[\"ctzenkeifzzhmkd\",\"svflyhbxcudch\",\"gsrboldforobw\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":6875255372638477871},\"id\":\"ovvacqpbt\",\"name\":\"odxeszabbela\",\"type\":\"umuaslzkwrrwoycq\"}"; + = "{\"properties\":{\"displayName\":\"fxsfuztlvtmv\",\"members\":[\"w\",\"dqlvhukoveof\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":5825441126962062555},\"id\":\"mvl\",\"name\":\"yzgib\",\"type\":\"kujrllfojui\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetVMGroupWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVMGroup response = manager.workloadNetworks() - .getVMGroupWithResponse("lvidizozs", "bccxjmonfdgn", "n", com.azure.core.util.Context.NONE) + .getVMGroupWithResponse("plrvkmjcwmjvlg", "ggcvk", "y", "izrzb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("uuwwltv", response.displayName()); - Assertions.assertEquals("ctzenkeifzzhmkd", response.members().get(0)); - Assertions.assertEquals(6875255372638477871L, response.revision()); + Assertions.assertEquals("fxsfuztlvtmv", response.displayName()); + Assertions.assertEquals("w", response.members().get(0)); + Assertions.assertEquals(5825441126962062555L, 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 index d4c6863087bad..e6f1aa02c54fa 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksGetVirtualMachineWithResponseMockTests { @Test public void testGetVirtualMachineWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"dyfpchrqbnj\",\"vmType\":\"REGULAR\"},\"id\":\"egy\",\"name\":\"cw\",\"type\":\"oxjumvqqo\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"csrlzknmzl\",\"vmType\":\"SERVICE\"},\"id\":\"pdwvnphcn\",\"name\":\"q\",\"type\":\"pjhmqrhvthl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetVirtualMachineWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetworkVirtualMachine response = manager.workloadNetworks() - .getVirtualMachineWithResponse("ttexoqqpwcyyufmh", "uncuw", "qspkcdqzhlctd", + .getVirtualMachineWithResponse("gzvlnsnn", "zfpafolpymwamxqz", "agpgdph", "vdulajv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dyfpchrqbnj", response.displayName()); + Assertions.assertEquals("csrlzknmzl", 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 index e2bd5a1187dfe..15790d2d04796 100644 --- 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 @@ -20,7 +20,7 @@ public final class WorkloadNetworksGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"pmyyefrpmpdnqq\",\"name\":\"ka\",\"type\":\"ao\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"ysidfvclgl\",\"name\":\"n\",\"type\":\"uijtkbu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); WorkloadNetwork response = manager.workloadNetworks() - .getWithResponse("vcpwpgclrc", "vtsoxf", com.azure.core.util.Context.NONE) + .getWithResponse("c", "jurbuhhlkyqltqsr", "gtuwkff", 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 index 31561d1835e2c..cfb414071c2dc 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListDhcpMockTests { @Test public void testListDhcp() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"sirudhzmmesckdlp\",\"segments\":[\"rcxfailcfxwmdb\",\"xdfgsftufqobr\",\"lnacgcc\",\"knh\"],\"provisioningState\":\"Succeeded\",\"revision\":589895181395208986},\"id\":\"nrzvuljraaer\",\"name\":\"nok\",\"type\":\"gukkjqnvbroy\"}]}"; + = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"y\",\"segments\":[\"khminqcymc\",\"ngnbdxxew\",\"ninvudbchaqdt\",\"qecrqctmxx\"],\"provisioningState\":\"Failed\",\"revision\":8298485303331231105},\"id\":\"huytxzvtzn\",\"name\":\"pxbannovvoxc\",\"type\":\"ytprwnwvroev\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testListDhcp() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworks().listDhcp("slhhxudbxv", "d", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listDhcp("ugwbsreurfqkf", "arenlvhhtklnvnaf", "vkyfedevjbosl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sirudhzmmesckdlp", response.iterator().next().properties().displayName()); - Assertions.assertEquals(589895181395208986L, response.iterator().next().properties().revision()); + Assertions.assertEquals("y", response.iterator().next().properties().displayName()); + Assertions.assertEquals(8298485303331231105L, 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 index ea6c126886246..569dd7f137262 100644 --- 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksListDnsServicesMockTests { @Test public void testListDnsServices() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"uojrngiflr\",\"dnsServiceIp\":\"asccbiui\",\"defaultDnsZone\":\"dlyjdf\",\"fqdnZones\":[\"kyoqufdv\",\"uzslzojhpctfnmdx\",\"tngfdgugeyzihgr\",\"yui\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":1993582902542449094},\"id\":\"jee\",\"name\":\"yhyhsgzfczb\",\"type\":\"omfgbeglqgleohib\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"ybafiq\",\"dnsServiceIp\":\"aarbgjekg\",\"defaultDnsZone\":\"lbyulidwcwvmze\",\"fqdnZones\":[\"nfhjirwgdnqzbr\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":1634752705437108290},\"id\":\"jcitdigsxcdglj\",\"name\":\"lkeuac\",\"type\":\"tomflrytswfpf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testListDnsServices() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworks().listDnsServices("ihrraiouaub", "jtlo", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listDnsServices("iwdcxsmlzzhzd", "xetlgydlhqv", "n", com.azure.core.util.Context.NONE); - Assertions.assertEquals("uojrngiflr", response.iterator().next().displayName()); - Assertions.assertEquals("asccbiui", response.iterator().next().dnsServiceIp()); - Assertions.assertEquals("dlyjdf", response.iterator().next().defaultDnsZone()); - Assertions.assertEquals("kyoqufdv", response.iterator().next().fqdnZones().get(0)); + Assertions.assertEquals("ybafiq", response.iterator().next().displayName()); + Assertions.assertEquals("aarbgjekg", response.iterator().next().dnsServiceIp()); + Assertions.assertEquals("lbyulidwcwvmze", response.iterator().next().defaultDnsZone()); + Assertions.assertEquals("nfhjirwgdnqzbr", response.iterator().next().fqdnZones().get(0)); Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.iterator().next().logLevel()); - Assertions.assertEquals(1993582902542449094L, response.iterator().next().revision()); + Assertions.assertEquals(1634752705437108290L, 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 index ae462ada475dc..2d5f64efeb206 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListDnsZonesMockTests { @Test public void testListDnsZones() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"gcmjkavl\",\"domain\":[\"bmftpmdt\"],\"dnsServerIps\":[\"ltfvnz\",\"yj\",\"otp\",\"opv\"],\"sourceIp\":\"dbzqgqqihed\",\"dnsServices\":7204032751679115216,\"provisioningState\":\"Failed\",\"revision\":1811434069334068168},\"id\":\"bcysih\",\"name\":\"gqcwdhohsdtmc\",\"type\":\"zsu\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"twvc\",\"domain\":[\"wka\",\"ve\"],\"dnsServerIps\":[\"dvlvhbwrnfxtgdd\"],\"sourceIp\":\"th\",\"dnsServices\":319815820315480755,\"provisioningState\":\"Updating\",\"revision\":4507134734871641065},\"id\":\"kcoeqswank\",\"name\":\"t\",\"type\":\"tmhdroznnhdr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testListDnsZones() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworks().listDnsZones("oudorhcgyyp", "otwypundmb", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listDnsZones("gkkumuikjcj", "aztb", "snsqowxwcoml", com.azure.core.util.Context.NONE); - Assertions.assertEquals("gcmjkavl", response.iterator().next().displayName()); - Assertions.assertEquals("bmftpmdt", response.iterator().next().domain().get(0)); - Assertions.assertEquals("ltfvnz", response.iterator().next().dnsServerIps().get(0)); - Assertions.assertEquals("dbzqgqqihed", response.iterator().next().sourceIp()); - Assertions.assertEquals(7204032751679115216L, response.iterator().next().dnsServices()); - Assertions.assertEquals(1811434069334068168L, response.iterator().next().revision()); + Assertions.assertEquals("twvc", response.iterator().next().displayName()); + Assertions.assertEquals("wka", response.iterator().next().domain().get(0)); + Assertions.assertEquals("dvlvhbwrnfxtgdd", response.iterator().next().dnsServerIps().get(0)); + Assertions.assertEquals("th", response.iterator().next().sourceIp()); + Assertions.assertEquals(319815820315480755L, response.iterator().next().dnsServices()); + Assertions.assertEquals(4507134734871641065L, 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 index 9d81e912cff7f..3d7858ee4aabe 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListGatewaysMockTests { @Test public void testListGateways() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"afidltugsres\",\"path\":\"ssjhoiftxfkf\"},\"id\":\"gpr\",\"name\":\"ptil\",\"type\":\"ucb\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"yukphaimmoiroq\",\"path\":\"shbraga\"},\"id\":\"yrmfsvbpav\",\"name\":\"opfppdbwnupgah\",\"type\":\"kuma\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListGateways() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworks().listGateways("ehgpp", "pifhpfeoajvgcxtx", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listGateways("ibidmhmwffp", "fmuvapckccr", "vwe", com.azure.core.util.Context.NONE); - Assertions.assertEquals("afidltugsres", response.iterator().next().displayName()); + Assertions.assertEquals("yukphaimmoiroq", 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 index b22e288cdd161..15f5cebd68825 100644 --- 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 @@ -21,7 +21,7 @@ public final class WorkloadNetworksListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"kxlzyqdrfeg\",\"name\":\"ealzxwhcansymoyq\",\"type\":\"lwigdivbkbx\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"cjkgdirazftxej\",\"name\":\"ab\",\"type\":\"dujtmvcope\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().list("vmm", "npqfrtqlkzmeg", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().list("tdtpdelqacslmo", "oebn", 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 index 29fe67b6717e0..25ca3976156a2 100644 --- 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 @@ -23,7 +23,7 @@ public final class WorkloadNetworksListPortMirroringMockTests { @Test public void testListPortMirroring() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"vasylwxdzau\",\"direction\":\"INGRESS\",\"source\":\"ohguuf\",\"destination\":\"boyjathwt\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":7359436654104402484},\"id\":\"dxmeb\",\"name\":\"jscjpahl\",\"type\":\"veabfqxnmwmqtib\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"oafcluqvox\",\"direction\":\"INGRESS\",\"source\":\"im\",\"destination\":\"vwg\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":3665873837701448622},\"id\":\"esyds\",\"name\":\"wefohecbvo\",\"type\":\"wndyqleallk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testListPortMirroring() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().listPortMirroring("xprimrsop", "eecjmeis", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listPortMirroring("gf", "tmhqykiz", "d", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vasylwxdzau", response.iterator().next().displayName()); + Assertions.assertEquals("oafcluqvox", response.iterator().next().displayName()); Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.iterator().next().direction()); - Assertions.assertEquals("ohguuf", response.iterator().next().source()); - Assertions.assertEquals("boyjathwt", response.iterator().next().destination()); - Assertions.assertEquals(7359436654104402484L, response.iterator().next().revision()); + Assertions.assertEquals("im", response.iterator().next().source()); + Assertions.assertEquals("vwg", response.iterator().next().destination()); + Assertions.assertEquals(3665873837701448622L, 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 index 0742933babc0e..4f99313c8a9c4 100644 --- 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 @@ -18,11 +18,11 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class WorkloadNetworksListPublicIPsMockTests { +public final class WorkloadNetworksListPublicIpsMockTests { @Test - public void testListPublicIPs() throws Exception { + public void testListPublicIps() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"yzejnhlbk\",\"numberOfPublicIPs\":72002495094677042,\"publicIPBlock\":\"piljhahzvech\",\"provisioningState\":\"Failed\"},\"id\":\"wieholewjwiu\",\"name\":\"bwefqsfapaqtfer\",\"type\":\"q\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"flrmymyi\",\"numberOfPublicIPs\":5842475212910239296,\"publicIPBlock\":\"riswslmiiio\",\"provisioningState\":\"Canceled\"},\"id\":\"gxuugqkctotio\",\"name\":\"l\",\"type\":\"teqdptj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testListPublicIPs() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.workloadNetworks().listPublicIPs("hppr", "rsnm", com.azure.core.util.Context.NONE); + PagedIterable response = manager.workloadNetworks() + .listPublicIps("pphkixkykxds", "j", "emmucfxh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yzejnhlbk", response.iterator().next().displayName()); - Assertions.assertEquals(72002495094677042L, response.iterator().next().numberOfPublicIPs()); + Assertions.assertEquals("flrmymyi", response.iterator().next().displayName()); + Assertions.assertEquals(5842475212910239296L, 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 index 07aa48edd3ffc..63f5287ffacb1 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListSegmentsMockTests { @Test public void testListSegments() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"kjsqzhzbezkgi\",\"connectedGateway\":\"idxas\",\"subnet\":{\"dhcpRanges\":[\"yvvjskgfmo\",\"wa\",\"pqg\",\"tjeaahhvjhh\"],\"gatewayAddress\":\"kzyb\"},\"portVif\":[{\"portName\":\"dj\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":8248669428764587059},\"id\":\"evblbje\",\"name\":\"nljlageuaulx\",\"type\":\"nsmjbnkppxynen\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"xfz\",\"connectedGateway\":\"qttv\",\"subnet\":{\"dhcpRanges\":[\"hjpenuygbq\",\"qqekewvnqvcdlgu\",\"ucmfdj\"],\"gatewayAddress\":\"laxpunj\"},\"portVif\":[{\"portName\":\"zvvitacgxmfcs\"},{\"portName\":\"rxhtvso\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":1003428665455506608},\"id\":\"qrsxyp\",\"name\":\"uuuybnchrsziz\",\"type\":\"yuel\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testListSegments() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().listSegments("omfaj", "wasqvdaeyyg", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listSegments("qogsfikayian", "haru", "t", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kjsqzhzbezkgi", response.iterator().next().displayName()); - Assertions.assertEquals("idxas", response.iterator().next().connectedGateway()); - Assertions.assertEquals("yvvjskgfmo", response.iterator().next().subnet().dhcpRanges().get(0)); - Assertions.assertEquals("kzyb", response.iterator().next().subnet().gatewayAddress()); - Assertions.assertEquals(8248669428764587059L, response.iterator().next().revision()); + Assertions.assertEquals("xfz", response.iterator().next().displayName()); + Assertions.assertEquals("qttv", response.iterator().next().connectedGateway()); + Assertions.assertEquals("hjpenuygbq", response.iterator().next().subnet().dhcpRanges().get(0)); + Assertions.assertEquals("laxpunj", response.iterator().next().subnet().gatewayAddress()); + Assertions.assertEquals(1003428665455506608L, 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 index 9b63368eafb34..8b164c9c6b1d6 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListVMGroupsMockTests { @Test public void testListVMGroups() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"lnzonzlrpiqywn\",\"members\":[\"tszcofizehtdhgb\",\"k\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":5299106895755673529},\"id\":\"rvzmlovuana\",\"name\":\"hcxlpm\",\"type\":\"erbdk\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"toihiqakydi\",\"members\":[\"rkwpzdqtvhcspod\",\"qaxsipietgbebjf\",\"lbmoichd\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":688095426662916630},\"id\":\"nbatzvi\",\"name\":\"sowsaael\",\"type\":\"attcju\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListVMGroups() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.workloadNetworks().listVMGroups("ujrtrhqvwr", "vk", com.azure.core.util.Context.NONE); + = manager.workloadNetworks().listVMGroups("fihotj", "wlpxuzzjg", "refqy", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lnzonzlrpiqywn", response.iterator().next().displayName()); - Assertions.assertEquals("tszcofizehtdhgb", response.iterator().next().members().get(0)); - Assertions.assertEquals(5299106895755673529L, response.iterator().next().revision()); + Assertions.assertEquals("toihiqakydi", response.iterator().next().displayName()); + Assertions.assertEquals("rkwpzdqtvhcspod", response.iterator().next().members().get(0)); + Assertions.assertEquals(688095426662916630L, 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 index 035035102ee25..a57b56c80a252 100644 --- 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 @@ -22,7 +22,7 @@ public final class WorkloadNetworksListVirtualMachinesMockTests { @Test public void testListVirtualMachines() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"chzyvlixqnrk\",\"vmType\":\"REGULAR\"},\"id\":\"ibn\",\"name\":\"mysu\",\"type\":\"swqrntvlwijp\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"displayName\":\"lawjmjsmwrok\",\"vmType\":\"EDGE\"},\"id\":\"zzzwy\",\"name\":\"afitlhguynuchlg\",\"type\":\"ltxdwhmozu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testListVirtualMachines() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.workloadNetworks() - .listVirtualMachines("lalniex", "srzpgepqtybbww", com.azure.core.util.Context.NONE); + .listVirtualMachines("yjuzkdb", "zolxrzvhqjwtr", "tgvgzp", com.azure.core.util.Context.NONE); - Assertions.assertEquals("chzyvlixqnrk", response.iterator().next().displayName()); + Assertions.assertEquals("lawjmjsmwrok", response.iterator().next().displayName()); } }